Adding a DB regs to a wx listbox
Hi, I need add to a listbox a list of items extracted from a database. This is that I've do: class tasques(wx.Frame): def __init__(self, *args, **kwds): self.list_box_1_copy = wx.ListBox(self, -1, choices=[], style=wx.LB_SINGLE|wx.LB_ALWAYS_SB) ... How I add the list to choices? -- http://mail.python.org/mailman/listinfo/python-list
wx Listbox event
Hi, I need to charge a list when starts the program. I've tried a few events like: self.llistatids = wx.ListBox(self, -1, choices=['a'], style=wx.LB_SINGLE|wx.LB_ALWAYS_SB) self.llistatids.SetBackgroundColour(wx.Colour(255, 255, 220)) self.llistatids.Bind(wx.EVT_LISTBOX, self.carrega_llistatids) But I cannot do it, any idea? -- http://mail.python.org/mailman/listinfo/python-list
Function that returns a tuple
Hi, I need to returns a tuple from a function (reads a database) Any idea?. -- http://mail.python.org/mailman/listinfo/python-list
Re: Function that returns a tuple
On 17 jun, 03:53, Dan Hipschman <[EMAIL PROTECTED]> wrote: > On Sat, Jun 16, 2007 at 06:30:26PM -0700, Marcpp wrote: > > Hi, I need to returns a tuple from a function (reads a database) > > Any idea?. > > Like this? > > def foo(): > return 1, 2, 3, 4 Hi, I need to return a tupla like this function: def BDllids(a): a = () conn = sqlite.connect('tasques.db') cursor = conn.cursor() cursor.execute('SELECT * FROM tasques') for row in cursor: a.append (row[0]) return a() I'm doing the correct, method? -- http://mail.python.org/mailman/listinfo/python-list
WX call a pywx program from a program, and return values
I need to call a pywx program(1) from an wxpy program(2) and return a value to program(2). Any example to do it? -- http://mail.python.org/mailman/listinfo/python-list
WXPYTHON push button call a frame
Hi I need to call a widget from a button in WXPYTHON. I've tried to this from a function like this, but when push the button, the program opens a window and do error. Any idea? . def DialogRRHH(self,event): prog = wx.PySimpleApp(0) wx.InitAllImageHandlers() DialogRRHH = MTRRHH(None, -1, "") prog.SetTopWindow(DialogRRHH) DialogRRHH.Show() prog.MainLoop() class MTRRHH(wx.Frame): ... if __name__ == "__main__": app = wx.PySimpleApp(0) wx.InitAllImageHandlers() tasques = tasques(None, -1, "") app.SetTopWindow(tasques) tasques.Show() app.MainLoop() -- http://mail.python.org/mailman/listinfo/python-list
Re: WXPYTHON push button call a frame
On 5 jul, 14:51, Steve Holden <[EMAIL PROTECTED]> wrote: > Marcpp wrote: > > Hi I need to call a widget from a button in WXPYTHON. I've tried to > > this from a function like this, but when push the button, the program > > opens a window and do error. > > Any idea? > > Well, one *really* good idea would be to copy the error message and > paste it into your message. The readers of this list have amazing > psychic powers, but you can always help improve the answer quality by > providing relevant information. > > > > > . > > def DialogRRHH(self,event): > > prog = wx.PySimpleApp(0) > > wx.InitAllImageHandlers() > > DialogRRHH = MTRRHH(None, -1, "") > > prog.SetTopWindow(DialogRRHH) > > DialogRRHH.Show() > > prog.MainLoop() > > > class MTRRHH(wx.Frame): > > ... > > if __name__ == "__main__": > > app = wx.PySimpleApp(0) > > wx.InitAllImageHandlers() > > tasques = tasques(None, -1, "") > > app.SetTopWindow(tasques) > > tasques.Show() > > app.MainLoop() > > Unfortunately your code extracts don't tell us what's going wrong, only > how the program is constructed. While that *is* useful information, by > itself it only paints half the picture. > > regards > Steve > -- > Steve Holden+1 571 484 6266 +1 800 494 3119 > Holden Web LLC/Ltd http://www.holdenweb.com > Skype: holdenweb http://del.icio.us/steve.holden > --- Asciimercial -- > Get on the web: Blog, lens and tag the Internet > Many services currently offer free registration > --- Thank You for Reading - Hi, the problem is No Error message, but the program continues running after I closed it (by the X). -- http://mail.python.org/mailman/listinfo/python-list
wx DatePicker (set blank values)
I need to set a DatePicker to blank value and GetValue() needs to be 0. Thanks by advance. -- http://mail.python.org/mailman/listinfo/python-list
PYQT 3 communication with 2 windows
Hi, I'm introducing to program in python + pyqt. I have a main window that call a second window (to introduce a info with textedit) when press the second window button I need to return to the main window the info introduced in the second window. I've seek in the pyqt doc examples but i don't find it. Have you any example? -- http://mail.python.org/mailman/listinfo/python-list
Re: PYQT 3 communication with 2 windows
On 21 abr, 02:43, David Boddie <[EMAIL PROTECTED]> wrote: > On Thursday 19 April 2007 22:38, Marcpp wrote: > > > Hi, I'm introducing to program in python + pyqt. > > I have a main window that call a second window (to introduce a info > > with textedit) > > when press the second window button I need to return to the main > > window the info > > introduced in the second window. > > I've seek in the pyqt doc examples but i don't find it. > > Have you any example? > > You could connect the button to a slot in the second window that sends > the text back to the first window. > > Here's an example that sends the text to a function. You could substitute a > class for the function to get what you want. > > import sys > from qt import * > > class Window(QWidget): > > def __init__(self, parent = None): > > QWidget.__init__(self, parent) > > self.textEdit = QTextEdit(self) > okButton = QPushButton(self.tr("&OK"), self) > self.connect(okButton, SIGNAL("clicked()"), self.sendText) > layout = QVBoxLayout(self) > layout.addWidget(self.textEdit) > layout.addWidget(okButton) > > def sendText(self): > > self.emit(PYSIGNAL("textEntered(QString)"), (self.textEdit.text(),)) > > def fn(text): > > print text > > if __name__ == "__main__": > > app = QApplication(sys.argv) > window = Window() > window.connect(window, PYSIGNAL("textEntered(QString)"), fn) > window.show() > app.setMainWidget(window) > sys.exit(app.exec_loop()) > > Note the use of PYSIGNAL() instead of SIGNAL(). With PyQt4 you would be able > to use SIGNAL() and write the emit() call in a simpler form. > > David Thankyou!!! This is that I want. -- http://mail.python.org/mailman/listinfo/python-list
Re: PYQT 3 communication with 2 windows
On 21 abr, 02:43, David Boddie <[EMAIL PROTECTED]> wrote: > On Thursday 19 April 2007 22:38, Marcpp wrote: > > > Hi, I'm introducing to program in python + pyqt. > > I have a main window that call a second window (to introduce a info > > with textedit) > > when press the second window button I need to return to the main > > window the info > > introduced in the second window. > > I've seek in the pyqt doc examples but i don't find it. > > Have you any example? > > You could connect the button to a slot in the second window that sends > the text back to the first window. > > Here's an example that sends the text to a function. You could substitute a > class for the function to get what you want. > > import sys > from qt import * > > class Window(QWidget): > > def __init__(self, parent = None): > > QWidget.__init__(self, parent) > > self.textEdit = QTextEdit(self) > okButton = QPushButton(self.tr("&OK"), self) > self.connect(okButton, SIGNAL("clicked()"), self.sendText) > layout = QVBoxLayout(self) > layout.addWidget(self.textEdit) > layout.addWidget(okButton) > > def sendText(self): > > self.emit(PYSIGNAL("textEntered(QString)"), (self.textEdit.text(),)) > > def fn(text): > > print text > > if __name__ == "__main__": > > app = QApplication(sys.argv) > window = Window() > window.connect(window, PYSIGNAL("textEntered(QString)"), fn) > window.show() > app.setMainWidget(window) > sys.exit(app.exec_loop()) > > Note the use of PYSIGNAL() instead of SIGNAL(). With PyQt4 you would be able > to use SIGNAL() and write the emit() call in a simpler form. > > David Thankyou!!! This is that I want. -- http://mail.python.org/mailman/listinfo/python-list
Generating PDF reports
Hi i'm introducing to do reports from python, any recomendation? -- http://mail.python.org/mailman/listinfo/python-list
Pyqt programming question
I have a program (python + pyqt), with a button I'll would to open a new dialog window to input text, when press save or ok, this text is returned to the principal program. I've seek in internet but i don't find anything. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pyqt programming question
On 12 abr, 11:48, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Thursday 12 April 2007 10:23 am, Marcpp wrote: > > > I have a program (python + pyqt), with a button I'll would to open a > > new dialog window to input text, when press save or ok, this text is > > returned to the principal program. > > I've seek in internet but i don't find anything. > > Use QInputDialog.getText() > > Phil I can't do it, have you any example? Thank you. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pyqt programming question
On 12 abr, 12:07, "Marcpp" <[EMAIL PROTECTED]> wrote: > On 12 abr, 11:48, Phil Thompson <[EMAIL PROTECTED]> wrote: > > > On Thursday 12 April 2007 10:23 am, Marcpp wrote: > > > > I have a program (python + pyqt), with a button I'll would to open a > > > new dialog window to input text, when press save or ok, this text is > > > returned to the principal program. > > > I've seek in internet but i don't find anything. > > > Use QInputDialog.getText() > > > Phil > > I can't do it, have you any example? > Thank you. I've created a personal dialog. -- http://mail.python.org/mailman/listinfo/python-list
Re: Pyqt programming question
On 12 abr, 12:34, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Thursday 12 April 2007 11:07 am, Marcpp wrote: > > > On 12 abr, 11:48, Phil Thompson <[EMAIL PROTECTED]> wrote: > > > On Thursday 12 April 2007 10:23 am, Marcpp wrote: > > > > I have a program (python + pyqt), with a button I'll would to open a > > > > new dialog window to input text, when press save or ok, this text is > > > > returned to the principal program. > > > > I've seek in internet but i don't find anything. > > > > Use QInputDialog.getText() > > > > Phil > > > I can't do it, have you any example? > > Look at the standarddialogs.py example that it included with PyQt. > > Phil I've need a personal dialog, not a standard. Thank you. -- http://mail.python.org/mailman/listinfo/python-list
Pyqt calling custom dialog
I need to call a custom dialog from a program, and return parameters. Any idea or example? -- http://mail.python.org/mailman/listinfo/python-list
Re: Any Pythonistas in Mexico?
On 12 abr, 09:41, Hugo González Monteverde <[EMAIL PROTECTED]> wrote: > Hola, > > Leí este mail viejísimo en una lista. Yo uso Python y también quería > saber quién pythoneaba en México. Todavía estás por ahí? > > Saludos, > > Hugo G. Yo vivo en España. Usas el pyqt? -- http://mail.python.org/mailman/listinfo/python-list
Qt4 in ubuntu
Is possible install Qt4 pyqt4 under kubuntu? Few times ago i tried to run pyqt in ubuntu (gnome) but i can't do it. -- http://mail.python.org/mailman/listinfo/python-list
Re: Qt4 in ubuntu
On 15 abr, 22:54, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Marcpp schrieb: > > > Is possible install Qt4 pyqt4 under kubuntu? > > Few times ago i tried to run pyqt in ubuntu (gnome) but i can't > > do it. > > It's certainly possible. On ubuntu as well as on kubuntu. You can > install all KDE and Qt stuff on ubuntu as well. > > But unless you are more specific what your actual problems were, you > can't better help. > > Diez Hi Diez, finally I can install a Qt4 on Kubuntu, but now I have problems to install a Qt4Designer. I'm introducing to Qt with python, why tutorial you recommend to me? Thank you. -- http://mail.python.org/mailman/listinfo/python-list
Pyqt calling a custom dialog and returning the vars
I call a dialog from a principal program but cannot return the value of the variables (text box's). Here is a example... from ui import Agenda from dialog1 import dialogo1 from PyQt4 import * import dbm import sys class principal (QApplication): def __init__(self, args): """ In the constructor we're doing everything to get our application started, which is basically constructing a basic QApplication by its __init__ method, then adding our widgets and finally starting the exec_loop.""" QApplication.__init__(self,args) # We pass None since it's the top-level widget, we could in fact leave # that one out, but this way it's easier to add more dialogs or widgets. self.maindialog = ag(None) self.setMainWidget(self.maindialog) self.maindialog.show() self.exec_loop() class ag (Agenda): ... ... def _slotAddClicked(self): d=dialogo1() d.exec_() d.connect(d.buttonOk,SIGNAL("clicked()"),self._procesadialog1) def _procesadialog1(): d=dialogo1() drempresa = d.dempresa.text() print drempresa # < Nothing appears ... ... if __name__ == "__main__": app = principal(sys.argv) -- http://mail.python.org/mailman/listinfo/python-list
Re: Pyqt calling a custom dialog and returning the vars
On 17 abr, 00:03, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Marcpp schrieb: > > > > > I call a dialog from a principal program but cannot return the value > > of the > > variables (text box's). Here is a example... > > > from ui import Agenda > > from dialog1 import dialogo1 > > from PyQt4 import * > > import dbm > > import sys > > > class principal (QApplication): > > > def __init__(self, args): > > """ In the constructor we're doing everything to get our > > application > > started, which is basically constructing a basic > > QApplication by > > its __init__ method, then adding our widgets and finally > > starting > > the exec_loop.""" > > QApplication.__init__(self,args) > > > # We pass None since it's the top-level widget, we could in > > fact leave > > # that one out, but this way it's easier to add more dialogs > > or widgets. > > self.maindialog = ag(None) > > > self.setMainWidget(self.maindialog) > > self.maindialog.show() > > self.exec_loop() > > > class ag (Agenda): > > ... > > ... > > def _slotAddClicked(self): > > d=dialogo1() > > d.exec_() > > d.connect(d.buttonOk,SIGNAL("clicked()"),self._procesadialog1) > > Shouldn't you connect the signal _before_ the dialog is shown? > > > def _procesadialog1(): > > d=dialogo1() > > drempresa = d.dempresa.text() > > print drempresa # > > < Nothing > > appears > > ... > > ... > > if __name__ == "__main__": > > app = principal(sys.argv) > > Diez How I'll do it? -- http://mail.python.org/mailman/listinfo/python-list
Program with wx in Linux and Windows
Hi I've developed a program (WXpython GUI). In Linux the GUI is correct (various distributions), but in Windows all appears disordered. Any recomendations? -- http://mail.python.org/mailman/listinfo/python-list
Working with shared folders
Any idea to work with windows shared folders? Which library is needed to execute console comands? Thankyou. -- http://mail.python.org/mailman/listinfo/python-list
Re: I need suggests
Hi, I'm using SPE (Stani's Python Editor) http://projects.blender.org/projects/spe It works very good and incorporates WX support. Pat wrote: > I have to do a big programm. Could someone give me some suggests about > IDE (on Linux) and books to learn. -- http://mail.python.org/mailman/listinfo/python-list
Mounting shares with python
Hi, when i mount a share with python... os.system ("mount -t smbfs -o username=nobody ...") the problem is that I'll to be root. Have a comand to send a root password...? I've tried os.system ("su") os.system ("the password") but it doesn't works. -- http://mail.python.org/mailman/listinfo/python-list