Re: How to get started in GUI Programming?
If you come from visual basic, I suggest to use pythoncard GUI, which is very simple to develop with a Ressource Editor (create a panel, see labwindows, visual basic ..). https://sourceforge.net/projects/vb2py/ a package to transform VB to pythoncard http://www.linux2000.com/pimp.html a pythoncard application Philippe DALET Lyp champollion 46100 FIGEAC FRANCE [EMAIL PROTECTED] a écrit : > I am trying to learn GUI programming in Python, but have to confess I > am finding it difficult. > > I am not an experienced programmer - just someone who from time to > time writes small programs for my use. Over the years I have moved > from GWBASIC to QBASIC to Visual Basic, and now trying to move across > to a Linux platform. Python seems to be the best compromise between > the limitations of command line basic programming and the total > incomprehensibility of C. > > Googling around it seems the best GUI is either Tkinter or PyGtk. I > found a book which recommended PyGtk, as it had a graphical design > option, Glade. Coming from a VB background I latched onto that and > bought the book (Beginning Python, Wrox), but it was a disappointment > (or more accurately a complete waste of money) - there was > insufficient detail in the text. > > I've found the tutorial and reference manual on the PyGtk web site, > but although I've made some progress, I keep reaching points where I > have insufficient background to understand them. Currently I'm stuck > on dialog boxes (the code seems immensely complex for the equivalent of > MsgBox("Do you really want to do this ",vbYesNo) and I haven't > got it to work properly yet) and loading graphical images in anything > other than their original size, but every new step brings another > struggle > > I've seen reference to a Tkinter book - something like 'Python > and Tkinter Programming' but it seems to be out of print and > unavailable. > > Can anyone offer any suggestions as to the least painful way forwards? > > (Email address was valid once but has long since been abandoned to > spam. Please rely via newsgroup) -- http://mail.python.org/mailman/listinfo/python-list
Re: Parallel port programming on windows XP / 2000
I have written a python script with pyparallel pyDS1267 (W2K, pyparallel 0.1, giveio_setup.exe, pythoncard), with no problems on this OS. I have not tested with pyparallel 0.2 pyDS1267, pyUltraISR http://sourceforge.net/projects/gpib82357a/ [EMAIL PROTECTED] lyp champollion av pezet 46100 FIGEAC FRANCE Novice Experl a écrit : > I'm still stuck... my script is finished and works just fine on win98 using > pyparallel, but I still haven't seen any sample code to do access the port in > XP / 2000. > > If I don't make progress soon, I'll need to find a solution in another > language, which I don't really want to do. > > > --= Posted using GrabIt = > --= Binary Usenet downloading made easy =- > -= Get GrabIt for free from http://www.shemes.com/ =- -- http://mail.python.org/mailman/listinfo/python-list
Re: getting scancodes
On 24 avr, 02:39, [EMAIL PROTECTED] wrote: > Anyone knows if its possible to get scan codes ??? > I tried with getch () but with no success, just keycodes. > May be using the something in the sys.stdin module ?? > > Pleasee, any help would be very appreciated. > > -- > Andrés M. > - >.--. > |o_o | > |:_/ | > // \ \ > (| | ) >/'\_ _/`\ >\___)=(___/ > - On windows, you have this package http://newcenturycomputers.net/projects/wconio.html Ph DALET FRANCE -- http://mail.python.org/mailman/listinfo/python-list
Re: Output to a text window
Hi, http://spinecho.ifrance.com/frmouterr-py242-wxpy2621.zip I use this gui windows written by jean marie fauth, which is very easy: printing to stdout or stderr (gui windows written in wxpython). You have only to translate frmouterr in pygtk. ph DALET FRANCE On 17 fév, 01:19, [EMAIL PROTECTED] wrote: > Hi, > > I'm going around in circles so I'm asking for help. I want to read a > simple text file and output the contents to a GUI window when I click > on a button. I have written a small python program to read the > contents of a file when a button is clicked but can only output this > to a console window. I'm using the pygtk binding with glade for the > gui. > > I know it must be quiet simple but a mental block has rapidly > descended. > > Any help would be appreciated. -- http://mail.python.org/mailman/listinfo/python-list
Re: pySerial: write in a blocking mode
Hi I have developped a python script to control a rs232c rs485 converter, named pyRS485 with pythoncard on windows. ftp-champo.ac-toulouse.fr/pub/btseo/pdalet/python/ python 2.4 Electronics Applications 20050902.exe The best solution is to send the last character with interrupt. when the TDR is empty an interrupt is generated. An interrupt program is executed to change the state of dtr. Not evident on Windows and linux. I have used temporisation, with different values for a slow pc and speed pc. Philippe Marie dit Dalet FIGEAC FRANCE Grant Edwards a écrit : > On 2006-03-28, Alejandro <[EMAIL PROTECTED]> wrote: > > Hi: > > > > I'm using pySerial to talk to a RS232 to RS485 converter. In order to > > control the converter, I need to control the DTR line to enable/disable > > de RS485 driver. In particular, I need to : > > > > write a character to the serial port > > set the DTR line to level 1 _after_ the last bit of the character is > > send > > > > So I tried this (ser is the serial port object): > > > > ser.write(x) > > ser.setDTR(1) > > ser.write(x) > ser.drainOutput() > ser.setDTR(1) > > > The problem with this is that the ser.write function returns before the > > character is send, and thus, the DTR line is set too soon. (I checked > > this behaivour with an osciloscope). > > > > I thought that seting the writeTimeout parameter could help, but then I > > realized that the write function wait "up to this time", so it doesn't > > work. > > > > Then I tried waiting some time with time.sleep() after ser.write, but > > the shortest time for time.sleep is to big, and non deterministic, so I > > think this is not an option. > > Linux is not a real-time operating system. The > ser.drainOutput() call is going to have the same granularity > and non-determinism as time.sleep(). > > It sounds like you need a serial board that supports > half-duplex operation. > > -- > Grant Edwards grante Yow! Hand me a pair of > at leather pants and a CASIO >visi.comkeyboard -- I'm living >for today! -- http://mail.python.org/mailman/listinfo/python-list