wx.ProgressDialog with information while connecting ?

Hello All

I am trying create a wx.ProgressDialog to get informations while to connect in mysql.

see the code.

dbPath = {“ip”:ipServer,
“user”:“theuser”,
“pass”:“thepass”,
“db”:“mybd”
}
try:
dbCon = MySQLdb.connect(dbPath[“ip”], dbPath[“user”], dbPath[“pass”], dbPath[“db”])

dlg = wx.ProgressDialog(“Connecting…”, “Trying connect”,
parent = self,
maximum = dbCon,
style = wx.PD_APP_MODAL | wxPD_CAN_ABORT)
while not dbCon:
dlg.Update()

thats not work.

Any idea ?

···

I believe that Update method takes parameters:
http://www.wxpython.org/docs/api/wx.ProgressDialog-class.html#Update

···

On Thu, Jun 12, 2008 at 8:27 AM, Fernando Paiva <fernandopaiva@bmonline.com.br> wrote:

Hello All

I am trying create a wx.ProgressDialog to get informations while to connect
in mysql.

see the code.

dbPath = {"ip":ipServer,
                  "user":"theuser",
                  "pass":"thepass",
                  "db":"mybd"
                  }
        try:
            dbCon = MySQLdb.connect(dbPath["ip"], dbPath["user"],
dbPath["pass"], dbPath["db"])

            dlg = wx.ProgressDialog("Connecting...", "Trying connect",
                                    parent = self,
                                    maximum = dbCon,
                                    style = wx.PD_APP_MODAL |
wxPD_CAN_ABORT)
            while not dbCon:
                dlg.Update()

thats not work.

Any idea ?

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users