欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python實(shí)現(xiàn)外賣信息管理系統(tǒng)

 更新時(shí)間:2018年01月11日 09:26:18   作者:雙安  
這篇文章主要為大家詳細(xì)介紹了python實(shí)現(xiàn)外賣信息管理系統(tǒng),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文為大家分享了python實(shí)現(xiàn)外賣信息管理系統(tǒng)的具體代碼,供大家參考,具體內(nèi)容如下

一、需求分析

需求分析包含如下:

1、問(wèn)題描述

以外賣信息系統(tǒng)管理員身份登陸該系統(tǒng),實(shí)現(xiàn)對(duì)店鋪信息、派送員信息、客服人員信息、訂單信息、配送信息等進(jìn)行有條件查詢以及信息的錄入、修改、刪除等功能。

2、系統(tǒng)功能描述

(1)信息錄入:使用wxpython設(shè)計(jì)排版編寫(xiě)窗口界面,給出錄入信息的接口,通過(guò)python語(yǔ)句實(shí)現(xiàn)與數(shù)據(jù)庫(kù)的連接,從而向數(shù)據(jù)庫(kù)中插入相應(yīng)數(shù)據(jù)。

(2)信息修改:使用wxpython設(shè)計(jì)排版編寫(xiě)窗口界面,給出修改信息的接口,通過(guò)python語(yǔ)句實(shí)現(xiàn)與數(shù)據(jù)庫(kù)的連接,從而修改數(shù)據(jù)庫(kù)中相應(yīng)數(shù)據(jù)。

(3)信息查詢:在窗口界面中,通過(guò)響應(yīng)的按鈕觸發(fā),實(shí)現(xiàn)與數(shù)據(jù)庫(kù)的連接查詢,得到所有在線店鋪信息。

(4)數(shù)據(jù)統(tǒng)計(jì):在數(shù)據(jù)庫(kù)中編寫(xiě)相應(yīng)的存儲(chǔ)過(guò)程,輸入店鋪名稱即可select其所管理的派送員和客服人員。

3、系統(tǒng)功能模塊圖

二、概念結(jié)構(gòu)設(shè)計(jì)

系統(tǒng)整體的E-R模型:

三、邏輯結(jié)構(gòu)設(shè)計(jì)

本系統(tǒng)所用到的表結(jié)構(gòu)以及其聯(lián)系:

1、店鋪基本信息foodshop表

 

主鍵:shop_name

2、客服基本信息server表

主鍵:server_id

外鍵:shopname_shop_name

參考表:shopname 參考屬性:shop_name

3、派送員基本信息courier表

 

主鍵:courier_id

外鍵:shopname_shop_name

參考表:shopname 參考屬性:shop_name

4、學(xué)生基本信息student表

 

主鍵:student_phone

5、訂單基本信息book表

 

主鍵:(student_phone,server_id)

外鍵:student_phone,參考表student,參考屬性student_phone

外鍵:server_id,參考表server,參考屬性server_id

6、配送基本信息delivery表

主鍵:(student_phone,courier_id)

外鍵:student_phone,參考表student,參考屬性student_phone

外鍵:courier_id,參考表courier,參考屬性courier_id

四、具體實(shí)現(xiàn)

登陸界面:

附上源代碼:

# coding:utf8

###########################################################################
## Python code generated with wxFormBuilder (version Jun 17 2015)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################

import wx #導(dǎo)入wxpyhton,pyhton自帶的GUI庫(kù)
#import wx.xrc

import pymysql #用于操作數(shù)據(jù)庫(kù)
import sys
reload(sys)
sys.setdefaultencoding('utf8')

###########################################################################
## Class MyFrame1
###########################################################################

#建一個(gè)窗口類MyFrame1繼承wx.Frame
class MyFrame1(wx.Frame):
 def __init__(self, parent):
 #Wx.Frame (parent, id, title, pos, size, style, name)
 wx.Frame.__init__(self, parent, id=wx.ID_ANY, title=u"外賣信息管理系統(tǒng)", pos=wx.DefaultPosition, size=wx.Size(610, 400),
    style=wx.DEFAULT_FRAME_STYLE | wx.TAB_TRAVERSAL)
 self.Center() #居中顯示

 # 小構(gòu)件,如按鈕,文本框等被放置在面板窗口。 wx.Panel類通常是被放在一個(gè)wxFrame對(duì)象中。這個(gè)類也繼承自wxWindow類。
 self.m_panel1 = wx.Panel(self)
 # 標(biāo)簽,一行或多行的只讀文本,Wx.StaticText(parent, id, label, position, size, style)
 self.m_staticText1 = wx.StaticText(self.m_panel1, wx.ID_ANY, u"關(guān)于店鋪:", (20, 20))
 self.m_button1 = wx.Button(self.m_panel1, wx.ID_ANY, u"店鋪信息", (130, 20), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button2 = wx.Button(self.m_panel1, wx.ID_ANY, u"店鋪上架", (250, 20), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button3 = wx.Button(self.m_panel1, wx.ID_ANY, u"店鋪下架", (370, 20), wx.DefaultSize,
     style=wx.BORDER_MASK)

 self.m_staticText2 = wx.StaticText(self.m_panel1, wx.ID_ANY, u"關(guān)于派送員:", (20, 90))
 self.m_button4 = wx.Button(self.m_panel1, wx.ID_ANY, u"派送員信息", (130, 90), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button5 = wx.Button(self.m_panel1, wx.ID_ANY, u"聘請(qǐng)派送員", (250, 90), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button6 = wx.Button(self.m_panel1, wx.ID_ANY, u"解雇派送員", (370, 90), wx.DefaultSize,
     style=wx.BORDER_MASK)

 self.m_staticText3 = wx.StaticText(self.m_panel1, wx.ID_ANY, u"關(guān)于客服人員:", (20, 160))
 self.m_button7 = wx.Button(self.m_panel1, wx.ID_ANY, u"客服人員信息", (130, 160), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button8 = wx.Button(self.m_panel1, wx.ID_ANY, u"聘請(qǐng)客服人員", (250, 160), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button9 = wx.Button(self.m_panel1, wx.ID_ANY, u"解雇客服人員", (370, 160), wx.DefaultSize,
     style=wx.BORDER_MASK)

 self.m_staticText4 = wx.StaticText(self.m_panel1, wx.ID_ANY, u"關(guān)于訂單:", (20, 230))
 self.m_button10 = wx.Button(self.m_panel1, wx.ID_ANY, u"訂單信息", (130, 230), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button11 = wx.Button(self.m_panel1, wx.ID_ANY, u"學(xué)生訂餐", (250, 230), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button12 = wx.Button(self.m_panel1, wx.ID_ANY, u"取消訂單", (370, 230), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button13 = wx.Button(self.m_panel1, wx.ID_ANY, u"修改訂單", (490, 230), wx.DefaultSize,
     style=wx.BORDER_MASK)

 self.m_staticText5 = wx.StaticText(self.m_panel1, wx.ID_ANY, u"關(guān)于物流:", (20, 300))
 self.m_button14 = wx.Button(self.m_panel1, wx.ID_ANY, u"配送信息", (130, 300), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button15 = wx.Button(self.m_panel1, wx.ID_ANY, u"安排配送", (250, 300), wx.DefaultSize,
     style=wx.BORDER_MASK)
 self.m_button16 = wx.Button(self.m_panel1, wx.ID_ANY, u"取消配送", (370, 300), wx.DefaultSize,
     style=wx.BORDER_MASK)


 #按鈕綁定對(duì)話框的彈出
 #在創(chuàng)建應(yīng)用程序時(shí),Bind函數(shù)可以將按鈕的動(dòng)作與特定的函數(shù)綁定,當(dāng)按鈕上有動(dòng)作時(shí),這個(gè)函數(shù)就會(huì)啟動(dòng),從而處理響應(yīng)的事件。
 #個(gè)Button被單擊發(fā)生了EVT_BUTTON事件
 self.m_button1.Bind(wx.EVT_BUTTON, MyDialog11(None).OnClick)
 self.m_button2.Bind(wx.EVT_BUTTON, MyDialog12(None).OnClick)
 self.m_button3.Bind(wx.EVT_BUTTON, MyDialog13(None).OnClick)
 self.m_button4.Bind(wx.EVT_BUTTON, MyDialog21(None).OnClick)
 self.m_button5.Bind(wx.EVT_BUTTON, MyDialog22(None).OnClick)
 self.m_button6.Bind(wx.EVT_BUTTON, MyDialog23(None).OnClick)
 self.m_button7.Bind(wx.EVT_BUTTON, MyDialog31(None).OnClick)
 self.m_button8.Bind(wx.EVT_BUTTON, MyDialog32(None).OnClick)
 self.m_button9.Bind(wx.EVT_BUTTON, MyDialog33(None).OnClick)
 self.m_button10.Bind(wx.EVT_BUTTON, MyDialog41(None).OnClick)
 self.m_button11.Bind(wx.EVT_BUTTON, MyDialog42(None).OnClick)
 self.m_button12.Bind(wx.EVT_BUTTON, MyDialog43(None).OnClick)
 self.m_button13.Bind(wx.EVT_BUTTON, MyDialog44(None).OnClick)
 self.m_button14.Bind(wx.EVT_BUTTON, MyDialog51(None).OnClick)
 self.m_button15.Bind(wx.EVT_BUTTON, MyDialog52(None).OnClick)
 self.m_button16.Bind(wx.EVT_BUTTON, MyDialog53(None).OnClick)

 #設(shè)置按鈕的背景顏色
 self.m_button1.SetBackgroundColour('#0a74f7')
 self.m_button1.SetForegroundColour('white')
 self.m_button2.SetBackgroundColour('#0a74f7')
 self.m_button2.SetForegroundColour('white')
 self.m_button3.SetBackgroundColour('#0a74f7')
 self.m_button3.SetForegroundColour('white')

 self.m_button4.SetBackgroundColour('#238E23')
 self.m_button4.SetForegroundColour('white')
 self.m_button5.SetBackgroundColour('#238E23')
 self.m_button5.SetForegroundColour('white')
 self.m_button6.SetBackgroundColour('#238E23')
 self.m_button6.SetForegroundColour('white')

 self.m_button7.SetBackgroundColour('#6F4242')
 self.m_button7.SetForegroundColour('white')
 self.m_button8.SetBackgroundColour('#6F4242')
 self.m_button8.SetForegroundColour('white')
 self.m_button9.SetBackgroundColour('#6F4242')
 self.m_button9.SetForegroundColour('white')

 self.m_button10.SetBackgroundColour('#8E6B23')
 self.m_button10.SetForegroundColour('white')
 self.m_button11.SetBackgroundColour('#8E6B23')
 self.m_button11.SetForegroundColour('white')
 self.m_button12.SetBackgroundColour('#8E6B23')
 self.m_button12.SetForegroundColour('white')
 self.m_button13.SetBackgroundColour('#8E6B23')
 self.m_button13.SetForegroundColour('white')

 self.m_button14.SetBackgroundColour('#545454')
 self.m_button14.SetForegroundColour('white')
 self.m_button15.SetBackgroundColour('#545454')
 self.m_button15.SetForegroundColour('white')
 self.m_button16.SetBackgroundColour('#545454')
 self.m_button16.SetForegroundColour('white')

 self.m_panel1.SetBackgroundColour('white') #設(shè)置面板的背景顏色


###########################################################################
## Class MyDialog11
###########################################################################

#一個(gè)對(duì)話框的類繼承wx.Dialog
class MyDialog11(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"店鋪信息", pos=wx.DefaultPosition, size=wx.Size(302, 362),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "店鋪名稱", (20, 20))
 wx.StaticText(self.panel, -1, "月銷量", (80, 20))

 def OnClick(self, event):

 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()
 try:
  sql = "select * from foodshop"
  cursor.execute(sql)
  rs = cursor.fetchall()
  h = 30
  for row in rs:
  h = h + 20
  shop_name = row[0]
  salenum = row[1] #注意數(shù)據(jù)庫(kù)中的數(shù)據(jù)為數(shù)字 int 類型時(shí)的讀取方式 id = '%d' % i[0]
  wx.StaticText(self.panel, -1, shop_name, (20, h))
  wx.StaticText(self.panel, -1, salenum, (80, h))
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()

 self.ShowModal()


###########################################################################
## Class MyDialog12
###########################################################################

class MyDialog12(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"店鋪上架", pos=wx.DefaultPosition, size=wx.Size(302, 250),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入店鋪名稱:", (20, 20))
 # 可編輯文本框的創(chuàng)建使用wx.TextCtrl,默認(rèn)情況下,文本框只能編輯一行文字(無(wú)論文字多長(zhǎng)均不換行)
 self.t1 = wx.TextCtrl(self.panel, pos=(130, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入月銷量:", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(130, 80), size=(120, 25))


 def OnClick(self, e):
 dialog12 = MyDialog12(None)
 btn = wx.Button(parent=dialog12.panel, label="上架", pos=(20, 150), size=(100, 45), style=wx.BORDER_MASK)
 btn.Bind(wx.EVT_BUTTON, dialog12.insert)
 dialog12.ShowModal()

 def insert(self, event):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 shop_name = self.t1.GetValue().encode('utf8') #注意GetValue()獲取的是unicode編碼,
 salenum = self.t2.GetValue().encode('utf8') #你使用的#coding=utf8,那就對(duì)獲取的數(shù)據(jù).encode('utf8')重新編碼
 data = (shop_name, salenum)

 try:
  sql = "insert into foodshop values (%s,%s)"
  cursor.execute(sql, data)
  conn.commit() #提交給后臺(tái)數(shù)據(jù)庫(kù)
  dial = wx.MessageDialog(None, '成功上架!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的消息框, 語(yǔ)法是(self, 框中內(nèi)容, 框標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()

###########################################################################
## Class MyDialog13
###########################################################################

class MyDialog13(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"店鋪下架", pos=wx.DefaultPosition, size=wx.Size(200, 200),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "店鋪名稱:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(20, 50), size=(120, 25))


 def OnClick(self, e):
 dialog13 = MyDialog13(None)
 btn = wx.Button(parent=dialog13.panel, label="下架", pos=(20, 90), size=(90, 40))
 btn.Bind(wx.EVT_BUTTON, dialog13.delete)
 dialog13.ShowModal()

 def delete(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 shop_name = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼
 try:
  sql = "delete from foodshop where shop_name=%s"
  cursor.execute(sql, shop_name)
  conn.commit()
  dial = wx.MessageDialog(None, '成功下架!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()

###########################################################################
## Class MyDialog21
###########################################################################

class MyDialog21(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"派送員信息", pos=wx.DefaultPosition, size=wx.Size(400, 415),
    style=wx.DEFAULT_DIALOG_STYLE)

 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "店鋪名稱:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(90, 20), size=(120, 25))
 #btn = wx.Button(parent=self.panel, label="查詢", pos=(240, 20), size=(70, 25))
 #btn.Bind(wx.EVT_BUTTON, self.find)
 wx.StaticText(self.panel, -1, "派送員編號(hào)", (20, 60))
 wx.StaticText(self.panel, -1, "派送員姓名", (120, 60))
 wx.StaticText(self.panel, -1, "派送員電話", (220, 60))

 def OnClick(self, event):
 dialog21 = MyDialog21(None)
 btn = wx.Button(parent=dialog21.panel, label="查詢", pos=(240, 20), size=(70, 25))
 btn.Bind(wx.EVT_BUTTON, dialog21.find)
 dialog21.ShowModal()

 def find(self, event):
 '''
 if self.t1.GetValue() == '肯德基':
  wx.StaticText(self.panel, -1, '派送員編號(hào)', (20, h))
  wx.StaticText(self.panel, -1, '派送員姓名', (120, h))
 '''
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()
 try:
  sql = "select * from courier"
  cursor.execute(sql)
  rs = cursor.fetchall()
  h = 80
  for row in rs:
  if row[3] == self.t1.GetValue():
   h = h + 20
   courier_id = row[0]
   courier_name = row[1]
   courier_phone = row[2]
   wx.StaticText(self.panel, -1, courier_id, (20, h))
   wx.StaticText(self.panel, -1, courier_name, (120, h))
   wx.StaticText(self.panel, -1, courier_phone, (220, h))
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog22
###########################################################################

class MyDialog22(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"聘請(qǐng)派送員", pos=wx.DefaultPosition, size=wx.Size(400, 350),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入店鋪名稱:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(140, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入派送員編號(hào):", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(140, 80), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入派送員姓名:", (20, 140))
 self.t3 = wx.TextCtrl(self.panel, pos=(140, 140), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入派送員電話:", (20, 200))
 self.t4 = wx.TextCtrl(self.panel, pos=(140, 200), size=(120, 25))

 def OnClick(self, e):
 dialog22 = MyDialog22(None)
 btn = wx.Button(parent=dialog22.panel, label="聘請(qǐng)", pos=(20, 250), size=(100, 45))
 btn.Bind(wx.EVT_BUTTON, dialog22.insert)
 dialog22.ShowModal()

 def insert(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 shop_name = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼,
 courier_id = self.t2.GetValue().encode('utf8') # 你使用的#coding=utf8,那就對(duì)獲取的數(shù)據(jù).encode('utf8')
 courier_name = self.t3.GetValue().encode('utf8')
 courier_phone = self.t4.GetValue().encode('utf8')

 data = (courier_id, courier_name, courier_phone, shop_name)

 try:
  sql = "insert into courier values (%s,%s,%s,%s)"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功聘請(qǐng)派送員!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog23
###########################################################################

class MyDialog23(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"解雇派送員", pos=wx.DefaultPosition, size=wx.Size(200, 200),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "派送員編號(hào):", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(20, 50), size=(120, 25))

 def OnClick(self, e):
 dialog23 = MyDialog23(None)
 btn = wx.Button(parent=dialog23.panel, label="解雇", pos=(20, 90), size=(90, 40))
 btn.Bind(wx.EVT_BUTTON, dialog23.delete)
 dialog23.ShowModal()

 def delete(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 courier_id = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼
 try:
  sql = "delete from courier where courier_id=%s"
  cursor.execute(sql, courier_id)
  conn.commit()
  dial = wx.MessageDialog(None, '成功解雇派送員!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog31
###########################################################################

class MyDialog31(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"客服人員信息", pos=wx.DefaultPosition, size=wx.Size(400, 401),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "店鋪名稱:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(90, 20), size=(120, 25))
 # btn = wx.Button(parent=self.panel, label="查詢", pos=(240, 20), size=(70, 25))
 # btn.Bind(wx.EVT_BUTTON, self.find)
 wx.StaticText(self.panel, -1, "客服人員編號(hào)", (20, 60))
 wx.StaticText(self.panel, -1, "客服人員姓名", (120, 60))

 def OnClick(self, e):
 dialog31 = MyDialog31(None)
 btn = wx.Button(parent=dialog31.panel, label="查詢", pos=(240, 20), size=(70, 25))
 btn.Bind(wx.EVT_BUTTON, dialog31.find)
 dialog31.ShowModal()

 def find(self, event):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()
 try:
  sql = "select * from server"
  cursor.execute(sql)
  rs = cursor.fetchall()
  h = 80
  for row in rs:
  if row[2] == self.t1.GetValue():
   h = h + 20
   server_id = row[0]
   server_name = row[1]
   wx.StaticText(self.panel, -1, server_id, (20, h))
   wx.StaticText(self.panel, -1, server_name, (120, h))
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog32
###########################################################################

class MyDialog32(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"聘請(qǐng)客服人員", pos=wx.DefaultPosition, size=wx.Size(400, 300),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入店鋪名稱:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(160, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入客服人員編號(hào):", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(160, 80), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入客服人員姓名:", (20, 140))
 self.t3 = wx.TextCtrl(self.panel, pos=(160, 140), size=(120, 25))


 def OnClick(self, e):
 dialog32 = MyDialog32(None)
 btn = wx.Button(parent=dialog32.panel, label="聘請(qǐng)", pos=(20, 200), size=(100, 45))
 btn.Bind(wx.EVT_BUTTON, dialog32.insert)
 dialog32.ShowModal()

 def insert(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 shop_name = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼,
 server_id = self.t2.GetValue().encode('utf8') # 你使用的#coding=utf8,那就對(duì)獲取的數(shù)據(jù).encode('utf8')
 server_name = self.t3.GetValue().encode('utf8')

 data = (server_id, server_name, shop_name)

 try:
  sql = "insert into server values(%s,%s,%s)"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功聘請(qǐng)客服!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog33
###########################################################################

class MyDialog33(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"解雇客服人員", pos=wx.DefaultPosition, size=wx.Size(200, 200),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "客服人員編號(hào):", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(20, 50), size=(120, 25))

 def OnClick(self, e):
 dialog33 = MyDialog33(None)
 btn = wx.Button(parent=dialog33.panel, label="解雇", pos=(20, 90), size=(90, 40))
 btn.Bind(wx.EVT_BUTTON, dialog33.delete)
 dialog33.ShowModal()

 def delete(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 server_id = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼
 try:
  sql = "delete from server where server_id=%s"
  cursor.execute(sql, server_id)
  conn.commit()
  dial = wx.MessageDialog(None, '成功解雇客服!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog41
###########################################################################

class MyDialog41(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"訂單信息", pos=wx.DefaultPosition, size=wx.Size(500, 400),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "買家電話:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(90, 20), size=(120, 25))
 # btn = wx.Button(parent=self.panel, label="查詢", pos=(240, 20), size=(70, 25))
 # btn.Bind(wx.EVT_BUTTON, self.find)
 wx.StaticText(self.panel, -1, "客服人員編號(hào)", (20, 60))
 wx.StaticText(self.panel, -1, "訂單編號(hào)", (120, 60))
 wx.StaticText(self.panel, -1, "訂單金額", (220, 60))
 wx.StaticText(self.panel, -1, "訂餐方式", (320, 60))

 def OnClick(self, e):
 dialog41 = MyDialog41(None)
 btn = wx.Button(parent=dialog41.panel, label="查詢", pos=(240, 20), size=(70, 25))
 btn.Bind(wx.EVT_BUTTON, dialog41.find)
 dialog41.ShowModal()

 def find(self, event):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()
 try:
  sql = "select * from book"
  cursor.execute(sql)
  rs = cursor.fetchall()
  h = 80
  for row in rs:
  if row[0] == self.t1.GetValue():
   h = h + 20
   server_id = row[1]
   order_id = row[2]
   order_money = row[3]
   order_way = row[4]
   wx.StaticText(self.panel, -1, server_id, (20, h))
   wx.StaticText(self.panel, -1, order_id, (120, h))
   wx.StaticText(self.panel, -1, order_money, (220, h))
   wx.StaticText(self.panel, -1, order_way, (320, h))
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog42
###########################################################################

class MyDialog42(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"學(xué)生訂餐", pos=wx.DefaultPosition, size=wx.Size(400, 400),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入買家電話:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(150, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入客服人員編號(hào):", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(150, 80), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入訂單編號(hào):", (20, 140))
 self.t3 = wx.TextCtrl(self.panel, pos=(150, 140), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入訂單金額:", (20, 200))
 self.t4 = wx.TextCtrl(self.panel, pos=(150, 200), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入訂餐方式:", (20, 260))
 self.t5 = wx.TextCtrl(self.panel, pos=(150, 260), size=(120, 25))

 def OnClick(self, e):
 dialog42 = MyDialog42(None)
 btn = wx.Button(parent=dialog42.panel, label="訂餐", pos=(20, 310), size=(100, 45))
 btn.Bind(wx.EVT_BUTTON, dialog42.insert)
 dialog42.ShowModal()

 def insert(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 student_phone = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼,
 server_id = self.t2.GetValue().encode('utf8') # 你使用的#coding=utf8,那就對(duì)獲取的數(shù)據(jù).encode('utf8')
 order_id = self.t3.GetValue().encode('utf8')
 order_money = self.t4.GetValue().encode('utf8')
 order_way = self.t5.GetValue().encode('utf8')

 data = (student_phone, server_id, order_id, order_money, order_way)

 try:
  sql = "insert into book values(%s,%s,%s,%s,%s)"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功訂餐!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog43
###########################################################################

class MyDialog43(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"刪除訂單", pos=wx.DefaultPosition, size=wx.Size(300, 300),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "客服人員編號(hào):", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(20, 50), size=(120, 25))

 wx.StaticText(self.panel, -1, "買家電話:", (20, 90))
 self.t2 = wx.TextCtrl(self.panel, pos=(20, 120), size=(120, 25))

 def OnClick(self, e):
 dialog43 = MyDialog43(None)
 btn = wx.Button(parent=dialog43.panel, label="取消訂單", pos=(20, 170), size=(90, 40))
 btn.Bind(wx.EVT_BUTTON, dialog43.delete)
 dialog43.ShowModal()

 def delete(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 server_id = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼
 student_phone = self.t2.GetValue().encode('utf8')
 data = (server_id, student_phone)

 try:
  sql = "delete from book where server_id=%s and student_phone=%s"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功刪除訂單!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog44
###########################################################################

class MyDialog44(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"修改訂單", pos=wx.DefaultPosition, size=wx.Size(400, 300),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入客服編號(hào):", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(160, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入買家電話:", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(160, 80), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)更正訂單金額:", (20, 140))
 self.t3 = wx.TextCtrl(self.panel, pos=(160, 140), size=(120, 25))

 def OnClick(self, e):
 dialog44 = MyDialog44(None)
 btn = wx.Button(parent=dialog44.panel, label="確認(rèn)修改", pos=(20, 200), size=(100, 45))
 btn.Bind(wx.EVT_BUTTON, dialog44.change)
 dialog44.ShowModal()

 def change(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 server_id = self.t1.GetValue().encode('utf8')
 student_phone = self.t2.GetValue().encode('utf8')
 order_money = self.t3.GetValue().encode('utf8')
 data = (order_money, server_id, student_phone)

 try:
  sql = "update book set order_money=%s where server_id=%s and student_phone=%s"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功修改訂單!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog51
###########################################################################

class MyDialog51(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"配送信息", pos=wx.DefaultPosition, size=wx.Size(502, 362),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "買家電話:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(90, 20), size=(120, 25))
 # btn = wx.Button(parent=self.panel, label="查詢", pos=(240, 20), size=(70, 25))
 # btn.Bind(wx.EVT_BUTTON, self.find)
 wx.StaticText(self.panel, -1, "派送員編號(hào)", (20, 60))
 wx.StaticText(self.panel, -1, "預(yù)計(jì)派送時(shí)間", (120, 60))


 def OnClick(self, e):
 dialog51 = MyDialog51(None)
 btn = wx.Button(parent=dialog51.panel, label="查詢", pos=(240, 20), size=(70, 25))
 btn.Bind(wx.EVT_BUTTON, dialog51.find)
 dialog51.ShowModal()

 def find(self, event):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()
 try:
  sql = "select * from delivery"
  cursor.execute(sql)
  rs = cursor.fetchall()
  h = 80
  for row in rs:
  if row[0] == self.t1.GetValue():
   h = h + 20
   courier_id = row[1]
   deliver_time = row[2]
   wx.StaticText(self.panel, -1, courier_id, (20, h))
   wx.StaticText(self.panel, -1, deliver_time, (120, h))
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog52
###########################################################################

class MyDialog52(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"安排配送", pos=wx.DefaultPosition, size=wx.Size(400, 300),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "請(qǐng)輸入買家電話:", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(160, 20), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入派送員編號(hào):", (20, 80))
 self.t2 = wx.TextCtrl(self.panel, pos=(160, 80), size=(120, 25))

 wx.StaticText(self.panel, -1, "請(qǐng)輸入預(yù)計(jì)派送時(shí)間:", (20, 140))
 self.t3 = wx.TextCtrl(self.panel, pos=(160, 140), size=(120, 25))

 def OnClick(self, e):
 dialog52 = MyDialog52(None)
 btn = wx.Button(parent=dialog52.panel, label="配送", pos=(20, 200), size=(100, 45))
 btn.Bind(wx.EVT_BUTTON, dialog52.insert)
 dialog52.ShowModal()

 def insert(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 student_phone = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼,
 courier_id = self.t2.GetValue().encode('utf8') # 你使用的#coding=utf8,那就對(duì)獲取的數(shù)據(jù).encode('utf8')
 deliver_time = self.t3.GetValue().encode('utf8')

 data = (student_phone, courier_id, deliver_time)

 try:
  sql = "insert into delivery values(%s,%s,%s)"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功安排派送!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()


###########################################################################
## Class MyDialog53
###########################################################################

class MyDialog53(wx.Dialog):
 def __init__(self, parent):
 wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"取消配送", pos=wx.DefaultPosition, size=wx.Size(300, 300),
    style=wx.DEFAULT_DIALOG_STYLE)
 self.Center()
 self.panel = wx.Panel(self)
 self.panel.SetBackgroundColour('white')

 wx.StaticText(self.panel, -1, "派送員編號(hào):", (20, 20))
 self.t1 = wx.TextCtrl(self.panel, pos=(20, 50), size=(120, 25))

 wx.StaticText(self.panel, -1, "買家電話:", (20, 90))
 self.t2 = wx.TextCtrl(self.panel, pos=(20, 120), size=(120, 25))

 def OnClick(self, e):
 dialog53 = MyDialog53(None)
 btn = wx.Button(parent=dialog53.panel, label="取消配送", pos=(20, 170), size=(90, 40))
 btn.Bind(wx.EVT_BUTTON, dialog53.delete)
 dialog53.ShowModal()

 def delete(self, e):
 conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='123', db='project', charset='utf8')
 cursor = conn.cursor()

 courier_id = self.t1.GetValue().encode('utf8') # 注意GetValue()獲取的是unicode編碼
 student_phone = self.t2.GetValue().encode('utf8')
 data = (courier_id, student_phone)

 try:
  sql = "delete from delivery where courier_id=%s and student_phone=%s"
  cursor.execute(sql, data)
  conn.commit()
  dial = wx.MessageDialog(None, '成功取消配送!', '結(jié)果', wx.YES_NO) # 創(chuàng)建一個(gè)帶按鈕的對(duì)話框, 語(yǔ)法是(self, 內(nèi)容, 標(biāo)題, ID)
  dial.ShowModal() # 顯示對(duì)話框
 except:
  conn.rollback()
 finally:
  cursor.close()
  conn.close()

if __name__ == "__main__":
 app = wx.App()
 MyFrame1(None).Show()
 app.MainLoop()

程序演示:

(1)店鋪信息

(2)店鋪上架

(3)店鋪下架

(4)派送員信息

(5)訂單信息

(6)買家訂餐

(7)修改訂單

查看訂單信息確認(rèn)已經(jīng)修改

 

至此python借助pymysql操作Mysql數(shù)據(jù)庫(kù)的增、刪、改、查功能演示完畢,剩下功能不一一截圖,原理類似。

五、總結(jié)

通過(guò)本次課程設(shè)計(jì),我對(duì)本學(xué)期所學(xué)的“數(shù)據(jù)庫(kù)”和python內(nèi)容有了更深一層的理解和學(xué)習(xí)。對(duì)數(shù)據(jù)庫(kù)的認(rèn)識(shí)不再僅僅停留在課本的理論知識(shí)上,能夠更加清楚的理解其后臺(tái)的操作流程。對(duì)python的應(yīng)用不再局限于編寫(xiě)簡(jiǎn)單小程序,而是做到了與數(shù)據(jù)庫(kù)進(jìn)行連接,通過(guò)wxpython前臺(tái)窗口,對(duì)數(shù)據(jù)庫(kù)傳入相應(yīng)的sql語(yǔ)句,從而實(shí)現(xiàn)數(shù)據(jù)庫(kù)的插入、修改、增加、刪除等操作,實(shí)現(xiàn)sql語(yǔ)句的前臺(tái)明了化。在設(shè)計(jì)E-R圖時(shí),采用了Navicat for mysql這一針對(duì)mysql的可視化工具,使得表與表之間的關(guān)系得以清晰的呈現(xiàn),這次課程設(shè)計(jì)使我獲益匪淺,在鞏固與拓展知識(shí)的同時(shí),還學(xué)會(huì)了許多工具的使用,這對(duì)以后的開(kāi)發(fā)提供了寶貴的經(jīng)驗(yàn)和基石。

更多學(xué)習(xí)資料請(qǐng)關(guān)注專題《管理系統(tǒng)開(kāi)發(fā)》。

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Python可視化目標(biāo)檢測(cè)框的實(shí)現(xiàn)代碼

    Python可視化目標(biāo)檢測(cè)框的實(shí)現(xiàn)代碼

    這篇文章主要介紹了Python可視化目標(biāo)檢測(cè)框的實(shí)現(xiàn)代碼,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-09-09
  • python利用dlib獲取人臉的68個(gè)landmark

    python利用dlib獲取人臉的68個(gè)landmark

    這篇文章主要介紹了python利用dlib獲取人臉的68個(gè)landmark,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-11-11
  • python模擬點(diǎn)擊玩游戲的實(shí)例講解

    python模擬點(diǎn)擊玩游戲的實(shí)例講解

    在本篇文章里小編給大家整理的是一篇關(guān)于python模擬點(diǎn)擊玩游戲的實(shí)例講解內(nèi)容,有需要的朋友們可以學(xué)習(xí)下。
    2020-11-11
  • Python將阿拉伯?dāng)?shù)字轉(zhuǎn)換為羅馬數(shù)字的方法

    Python將阿拉伯?dāng)?shù)字轉(zhuǎn)換為羅馬數(shù)字的方法

    這篇文章主要介紹了Python將阿拉伯?dāng)?shù)字轉(zhuǎn)換為羅馬數(shù)字的方法,涉及Python字符串轉(zhuǎn)換及流程控制的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下
    2015-07-07
  • Python實(shí)現(xiàn)連接FTP并下載文件夾

    Python實(shí)現(xiàn)連接FTP并下載文件夾

    這篇文章主要為大家介紹了如何利用Python實(shí)現(xiàn)鏈接FTP服務(wù)器,并下載相應(yīng)的文件夾,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以了解一下
    2022-03-03
  • pandas中merge()函數(shù)的用法解讀

    pandas中merge()函數(shù)的用法解讀

    這篇文章主要介紹了pandas中merge()函數(shù)的用法解讀,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-11-11
  • python中執(zhí)行shell命令的幾個(gè)方法小結(jié)

    python中執(zhí)行shell命令的幾個(gè)方法小結(jié)

    這篇文章主要介紹了python中執(zhí)行shell命令的幾個(gè)方法,本文一共給出3種方法實(shí)現(xiàn)執(zhí)行shell命令,需要的朋友可以參考下
    2014-09-09
  • python進(jìn)度條顯示-tqmd模塊的實(shí)現(xiàn)示例

    python進(jìn)度條顯示-tqmd模塊的實(shí)現(xiàn)示例

    這篇文章主要介紹了python進(jìn)度條顯示-tqmd模塊的實(shí)現(xiàn)示例,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • Python實(shí)現(xiàn)刪除文件但保留指定文件

    Python實(shí)現(xiàn)刪除文件但保留指定文件

    這篇文章主要介紹了Python實(shí)現(xiàn)刪除文件但保留指定文件,本文直接給出實(shí)現(xiàn)代碼,并同時(shí)給出代碼解釋,需要的朋友可以參考下
    2015-06-06
  • python 決策樹(shù)算法的實(shí)現(xiàn)

    python 決策樹(shù)算法的實(shí)現(xiàn)

    這篇文章主要介紹了python 決策樹(shù)算法的實(shí)現(xiàn),幫助大家更好的理解和使用python 機(jī)器學(xué)習(xí)算法,感興趣的朋友可以了解下
    2020-10-10

最新評(píng)論