Re: What am I supposed to do with an egg?!
[EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Type sudo easy_install myeggfile.egg. Sorry for not being clear. I did exec easy_install - no errors so far. But the egg was still there. I'd expected, that it was converted into .py-files somehow, which could be imported by my modules. Kind regards Morpheus If that gives you an error, then you don't have easy_install installed. Install it this way: sudo apt-get install python-setuptools On Dec 19, 3:44 pm, Morpheus [EMAIL PROTECTED] wrote: On Windows I'm used to install packages by setup.py install. So did I with Fibranet nanothreads - a few seconds and it was installed. On Linux (ubuntu 6.06) all I could get at is an egg file. I found out that I have to exec easy_install, which didn't much help here (seems to me, at least - sorry, Linux newbie). So, what am I supposed to do here now? Kind regards Morpheus -- http://mail.python.org/mailman/listinfo/python-list
Re: Writing an OPC client with Python ?
About a year ago I dev'ed a host app in Python (2.3 at that time) to control a KUKA KR16 robot. Comm was over OPC. The OPC 2.0 server was inst'ed on the KRC2. What I was needed to do, was to install the appropriate (i.e. delivere together w/ the server) client software and to take Mark Hammonds COM Makepy utility to to create the wrapper. The rest of the story was fun, pure fun, as Python programming always is. So, register the client software, fire up PythonWin, start the COM Makepy utility and wrap that DLL. If you are completely new to this stuff, it might help to look at all that from w/i MSVB 6.0 or something like that. HTH Franz GEIGER pierlau [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hello, I use an OPC server for connection to DC Drive. I would like to write a small OPC client. I have the dll OPCDAAuto.dll which contains all class and method but I wonder if its possible to instance in python the class that are in the dll ? Thanks for your help . Pierre -- http://mail.python.org/mailman/listinfo/python-list
Re: [Python for .NET] Any plans for supporting CLR2.0?
Terry Reedy wrote: F. GEIGER [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I'm on .NET/CLR2.0 and would like to use some stuff from w/i Python. The Python for .NET file name suggests that CLR1.1 is needed. Is that right? Any known plans to change this? Most responders here use CPython. The IronPython users mailing list, mirrored as gmane.comp.python.ironpython.users (see gmane.org) would more likely give you an authoritative answer. Sorry, for not being precise about Python for .NET: I didn't mean IronPython, which I'am aware of, I meant http://www.zope.org/Members/Brian/PythonNet Terry J. Reedy Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
[Python for .NET] Any plans for supporting CLR2.0?
I'm on .NET/CLR2.0 and would like to use some stuff from w/i Python. The Python for .NET file name suggests that CLR1.1 is needed. Is that right? Any known plans to change this? Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: [OT] How can I change Debian's default Python version?
Diez B. Roggisch wrote: Franz GEIGER wrote: When I call the Python interpreter, the Python 2.4.1 version is called, because I installed it weeks ago from source by myself. That means the symlink /usr/bin/python points to 2.4. Fine. Now, when I install Python packages using the convenient Synaptic Package Manager, everything goes into the 2.3-directory-tree. How can I change that? You can't, and shouldn't. However, most packages come with a python-2.4-version. Install these. That of course means you need the python-2.4 package installed using debian, not by yourself. Agreed, so I took another Linux box to make sure to not make custom version mistakes. Same here. Yes, there are 2.4-packages of all kind. But there's also a dependency package python telling the whole box that Python is 2.3.5. And when I want to install wxWidgets into Python 2.4, I am told that it depends on Python 2.3. I guess I'll copy the appropriate directories into my 2.4.-tree as suggested by Heiko... Regards, Diez Many thanks and kind regards Franz -- http://mail.python.org/mailman/listinfo/python-list
Re: [OT] How can I change Debian's default Python version?
Ganesan Rajagopal wrote: Franz GEIGER [EMAIL PROTECTED] writes: Now, when I install Python packages using the convenient Synaptic Package Manager, everything goes into the 2.3-directory-tree. How can I change that? That's because synaptic installs packages compiled for the default debian python. You have two alternatives: 1. Compile the python packages manually. 2. Debian already has python 2.4. Install python2.4 using synaptic. Also install any required python2.4-* packages. You will need a symlink to make sure you get python2.4 by default. How does this symlink have to look like? Is it the one in /usr/bin ? Is this one enough or are there others to be set as well? I did sudo ln -sf python2.4 python but still don't have wx in 2.4, but only in 2.3! Ganesan Ganesan Many thanks and kind regards Franz -- http://mail.python.org/mailman/listinfo/python-list
Re: nanothreads: Want to use them from within wxPython app
[EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] F. GEIGER wrote: I've def'ed a handler for EVT_IDLE in the app's main frame. There I'd like to call the nanothreads' __iter__ method, somehow. When I copy the __iter__ method into a, say, runOnce() method and call the next() method of the generator returned by runOnce(), it works. But I can't get at the __iter__ method, which is already there and therefore should be used instead of messing up nanothreads with changes of mine. Any hint welcome The latest version of nanothreads is now in the fibranet package, which you can download from the cheeseshop: http://cheeseshop.python.org/pypi/FibraNet To iterate nanothreads from wx, I call the nanothreads.poll() function Yeah, that's what I was looking for. But poll() is new, isn't it? from the EVT_IDLE handler, making sure that I call event.RequestMore() Good hint, thanks, I always tend to forget that. from within the handler, to iterate nanothreads as fast as possible. HTH, Simon WIttber. Thanks for your response and kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: tachometer diagram
Could it be http://xoomer.virgilio.it/infinity77/eng/freeware.html#speedmeter you are looking for? HTH Franz GEIGER Andreas Kaiser [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hello, I'am searching for a python solution for display a tachometer diagram. I prefer a solution for wxPython. The plot libraries I've found do not implement this diagram type. Any hints welcome! Thanks Andreas -- http://mail.python.org/mailman/listinfo/python-list
Re: [PythonWin] how to stop execution in interactive window?
Right-click on the Pythonwin icon in the tray and select Break into running code. HTH Franz GEIGER [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a time.sleep(1) and a print before each recursion... I should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the intepreter as it is (incidentally?) when this break sequence is entered during a screen-i/o of the python interpreter in a CMD prompt... Instead I discovered my pythonwin session no more responding even though the output shows that it was still working correctly... and my other open files in pythonwin still needing to be saved - my salvation was that while I was searching a solution with google, after 984 nested call ~ more than a quarter later, the recursion stack was full and an exception was raised! ;-P). So my question is: is there a keystroke combination to stop the interpreter in pythonwin interactive window? Or even better Is there a pythonwin interactive window keystrokes list? (btw: I remember an old post explaining the keystroke to reset interactive window memory without being forced to close and open pythonwin - very usefull but I could not find it anymore...) TIA! bye, PiErre -- http://mail.python.org/mailman/listinfo/python-list
Re: Threading questions
Just an idea: You could have n data collector threads, that all put their results into a queue connected to 1 db thread, that stores the results into the db. Cheers Franz GEIGER Antal Rutz [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi, All! I'm new to threading. I have some design questions: Task: I collect data and store them in an RDBMS (mysql or pgsql) The question is how to do that with threading? The data-collecting piece of the code runs in a thread. 1. Open the db, and each thread writes the result immediately. (Sub-question: which is better: cursor object passed to the thread or stored in a global var.) 2. Threads return data, which is written to DB after that. 3. Threads write to global variable, after 'join()' data is written. (Can be used global (write-only) variables with threads at all?) 4. ?... I think variable locking isn't an issue here because they are write-only. Maybe I have fundamentaly misunderstood something... Thanks -- --arutz -- http://mail.python.org/mailman/listinfo/python-list
[pysqlite 2.0.2] UnicodeDecodeError: 'utf8' codec can't decode bytes in position 44-45: invalid data
A fetchall() call causes the above error. There must be some non-utf8 chars in the table in question and - indeed - there very likely are: The table contains pathnames of files on the harddisk of a German speaking PC. What I have already done to try to overcome this is: - Inserted # coding: iso-8859-1 (w/o the quotes) in (hopefully) every file of my project - All strings I could find prefixed with u (w/o the quotes) - Changed plain calls to execute(q) into execute(unicode(q)) Alas, I am not sure if this all makes really sense, and, obviously it doesn't. What else has to be done? Many thanks in advance and kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
[pysqlite] Equivalent for SHOW TABLES?
For now, the names of the tables, the app knows of, are added into an internal list, when the app is started. Then, when queries fail, the app knoes that it has to create them. It would be nice somehow to be able to ask the database what tables it contains. Is anyone doing this that way? How do you do that? Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: [pysqlite] How do I use pysqlite in a multi-threading env.?
Gerhard Haering [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] I've completely rewritten the db handling stuff, which formerly did too much behind the scenes (explicit is better than implicit...). Now everything looks much better. No unexpected errors and - most important - locking works as expected. I have no idea yet, what went wrong with the former (probably more pythonic) solution. It always did it with MySQL as backend. Anyway, I'm quite happy now, that I can work on a db, that is incorporated into the app itself. Thanks for your help, Gerhard! And, sorry for the troubles... Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
[pysqlite] How do I use pysqlite in a multi-threading env.?
In my wxPython-app a part of it gathers data, when a button is pressed, and stores it into a db. The GUI part should display the stuff being stored in the db. When both parts work on the same connection, I get SQL statements in progress errors. Seems ok to me, you can't do that. So, next step: Both parts get a separate connection. Now I get Database locked errors. Hmm, yes, it's GUI stuff after all, being all in the same thread. So, next step: I put the data gathering part into a real thread, that's started, wehn the Scan button is pressed. This way the Database locked- errors should got away. But now I get SQLite objects created in a thread can only be used in that same thread.The object was created in thread id 3576 and this is thread id 1040. Hmm, true, I want to display db content, that was stored by an other thread. But that's what multi-threading capabilities are for! I must be missing something here. Anyway, I'm a bit lost now, really. So, how are you doing such stuff with pysqlite? Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindingssupplied. The current statement uses 0, and there are -1 supplied.
Thank you Gerhard, Gerhard Häring [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] F. GEIGER wrote: Arrgh, sorry for that post! self._dbc.execute(q, data) where data is None, works with MySQL. For SQLite I have to write if data is not None: self._dbc.execute(q, data) else: self._dbc.execute(q) No, you have to write: self._dbc.execute(q, (data,)) in both drivers. i. e. the second parameter to execute *must* be a sequence. Some drivers (maybe MySQLdb, too) automatically correct the wrong call and transform a: Okay, that makes sense. execute(sql, single_param) into a execute(sql, (single_param,)) for you if they notice that !PySequence_Check(single_param). pysqlite 2 does not do this. HTH, -- Gerhard Many thanks again Franz -- http://mail.python.org/mailman/listinfo/python-list
[pysqlite] pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress
I've troubles to let my app take off using pysqlite. What I wonder most for now is that pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress when I do this: t = time.time() n = len(self) while len(self): del self[0] self.commit() print %d items deleted in %.3f secs. % (n, time.time() - t) self is of class DbTable which lets db tables be used like ordinary Python objects (after an idea of Scott Scriven): def __len__(self): self._query_(select count(*) from %s %s % (self._name, self._whereClause)) r = int(self._dbc.fetchone()[0]) return r and def __delitem__(self, i): '''Enables you to remove rows this way: del movies[58] ''' q = select %s from %s %s %s limit %s, 1 % (self._nameOfIdCol, self._name, self._whereClause, self._orderClause, i) self._query_(q) rid = self._dbc.fetchone()[0] q = delete from %s where %s='%s' % (self._name, self._nameOfIdCol, rid) self._query_(q) return So it boils down to SELECT and DELETE statements called in a loop. After that a commit is made. What does pysqlite try to tell me here? Kind regards Franz GEIGER PS.: I use pysqlite 2.0.1 on Python 2.3.4 -- http://mail.python.org/mailman/listinfo/python-list
pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.
Im on Python 2.3.4, using pysqlite 2.0.0 (final). When I try to execute self._dbc.execute(q, data) where q is 'select count(*) from Difflets ' and date is None I get the following exception: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied. Any ideas? Many thanks in advance and kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied.
Arrgh, sorry for that post! self._dbc.execute(q, data) where data is None, works with MySQL. For SQLite I have to write if data is not None: self._dbc.execute(q, data) else: self._dbc.execute(q) Sorry again, Franz GEIGER F. GEIGER [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Im on Python 2.3.4, using pysqlite 2.0.0 (final). When I try to execute self._dbc.execute(q, data) where q is 'select count(*) from Difflets ' and date is None I get the following exception: pysqlite2.dbapi2.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 0, and there are -1 supplied. Any ideas? Many thanks in advance and kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: wxTimer problem
As Jp asked already: indepenedent from what? I do such things all the time in a wx-App that controls a 6-axes robot. For example, there I have a LED-Widget for displaying the actual pos. and orient. of the tool. In a wxTimer handler I read OPC variables, whose values are displayed in the LED-Widgets (the 6 LED-widgets make up a compound widget that does the data retreival in a wxTimer handler). My app is full of widgets that own a timer to display current values. As for independent: If you wrote a GUI app in wx you'll want to display those values coming from some COM objects. So simply tie a timer to the widget that should display it and - do it. Or tie it to the frame containing your widget. It's up to you - plenty of possibilities in wx/Python, and total freedom (I know what I'm speakin' of, I started that app in VB...). Kind regards Franz GEIGER Jp Calderone [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] On Fri, 13 May 2005 14:57:26 +0800, Austin [EMAIL PROTECTED] wrote: I wrote a GUI program on windows. (python wxPython) One function is to refresh the data from the COM Object continously. In the beginning, I used the thread.start_new_thread(xxx,()) But no matter how i try, it will cause the win32com error. After that, i use the wx.Timer to do the refresh function. It works fine, but i find one problem. I think timer should be independant, just like thread, but wxTimer doesn't. 1. Does python have timer function( not included by thread)? 2. About the wxTimer, does any parameter to let it be independent? What does independent mean? Jp -- http://mail.python.org/mailman/listinfo/python-list
[OT] Graphic editor within an MFC app. I have a wxPython prototype, that...
I have built a wxPython prototype of an app, that lets me place rectangles o a wxPanel, move them and change their size. How the rects are added and placed has to follow certain rules. The final goal is to merge this graphical editor into a MFC app. Converting a standalone wxPython app into a wxWidget app ist not that complicated. But how about merging it into a MFC app? Has anybody achieved that already? All the functionality lies in my wxPanel-subclass EditorWidget and in the few widgets I can place on it. So it boils down to place that EditorWidget an a MFC-Panel. But what about the mainloops? If that's not possibel at all, I'd consider getting an ActiveX that offers to me what I need. It does not need to be a full blown CAD ActiveX but should be customizeable. Does anyone know a source for such things? Many thanks in advance and kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: Event Handeling Between Two wxPanles in A wxNotebook
My DataPool then is a singleton, well, actually, a Borg. See Alex Martelli's recipe for that. If you use new style classes, then you have to look for Singleton in the cookbook. HTH Franz GEIGER MyHaz [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] so you run data pool as like a sruct that contains all your global objects? That sounds like an iteresting way of doing things. i try to stay away from gloabs as much as possible but this might be a good time to queue up that particular tool thanks for your reply -- http://mail.python.org/mailman/listinfo/python-list
Re: [question] Event Handeling Between Two wxPanles in A wxNotebook
That's the Visual Basic way to do it. I prefer it this way: Controls work on models. If a control has to store a value it does so by calling MyDataPool.storeMyValue(self.GetValue()). When the NotebookPage is changed, the new page tells all controls to update themeselves: self.SetValue(str(MyDataPool.myValue())). Recently I even prefer controls doing that by theirselves. They all have a timer, to periodically check whether or not they have to update themselves. But such a design is necessary only if the controls display current values, coming e.g. from an OPC server. HTH Franz GEIGER [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Ok i have a wxFrame with a wxNotebook that has two wxPanels, lets call them panel_1 and panel_2 i have wxTextCtrl in panel_1 (call it panel_1_ctrl) that i want the user to be able to fill up. I then want the user to be able to click a button (i.e. create an EVT) and have Value() of panel_1_ctrl be sent a wxTextCtrl in panel_2. So can i do this directly, i.e. is there a way to tell panel_2 that something has happended in panel_1 and to send panel_2 that data? Or do i have to go through the wxFrame i.e (panel_1 tells wxFrame that EVT happened, wxFrame then tells panel_2). in short panel_1_ctrl sends Value() to panel_2_ctrl. Thanks for any help that you can give me. -- http://mail.python.org/mailman/listinfo/python-list
Re: Python's idiom for function overloads
Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? The more you program in Python, the less you are missing it. As Philippe already said, use objects that support the protocol or decide what to do with it after having checked its type. I do that, if I have to, like so: def doIt(arg): if type(arg) == type([]): map(doIt, arg) else: # Do it on a scalar type # ... return result HTH Franz GEIGER Philippe Fremy [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi Frans, Since Python doesn't have static typing, how is the same result as traditional function overloads results in acheived? With dynamic typing obviously. :-) You can not reproduce the C++ overload idiom but you can get something close with manual type testing. To in a function do an if statement with the type() function? I am not aware of any other method. def a( arg1 ): if type(arg1) == types.IntType: return aWithInt(arg1) if type(arg1) == types.ListType: return aWithList(arg1) ... As you see, it is a bit tedious sometimes. If you want to juggle with completely different signatures, you have to play with variable argument lists. But I have found in my experience that the best way to get close to the C++ idiom, while improving readbility, is by using kwparams: def a(**kwparams): if kwparams.has_key('argInt'): aWithInt(kwparams['argInt']) if kwparams.has_key('argString'): aWithString(kwparams['argString']) The parsing code is the same, but the intent of the user is better expressed and you can catch misuse in a better fashion: if kwparams.has_key('argInt') and kwparams.has_key('argString'): print You stupid moron, a can be used only with string or int but not both at the same time! sys.exit(1) The example speaks better in a real case. Imagine a processPixmap function: processPixmap( pixmap=QPixmap(...) ) processPixmap( filename='my_pixmap.png' ) processPixmap( buffer=my_pixmap_string_content ) It works actually even better with multiple arguments. regards, Philippe -- http://mail.python.org/mailman/listinfo/python-list
Re: boa constructor mysql
Look at the wx demos. Another idea: Use a virtual list control. In the OnGetItemText() you could do the appropriate SQL query. Workedpretty well for me. HTH Franz GEIGER Michele [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] I've search a lot to found how visualize a mysql table in a gui (wxpython). I think to use wxgrid to visualize this table...but I don't know how... Anyone help me? Thanks a lot for the patience. Michele -- http://mail.python.org/mailman/listinfo/python-list
Re: java 5 could like python?
vegetax [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] I was a java developer one year ago ,before i moved to python i realy liked it at the beggining, but i got very disapointed lately since my previus two python proyects where relatively big,and python didnt feel well suited for the task. The reasons are mainly due to the standard library,the language performance was aceptable, but the library, in my opinion has several grave issues: -No naming convention. The speech of it fits in my head is no longer valid when i use a lot of functionality,modules,classes in a large proyect. For example if i remember a function i want ie:get attribute, i dont remember if the module implementer coded it as getAttribute,GetAttribute,get_attribute, then i have to go and check the doc, every time,which is a waste of time. Too many getters indicate bad design. But, ok, that's not the point here. I ask myself all the time, how people can dev software in *any* language w/o an IDE offering Intellisense (besides a decent clas browser, of course). You simply type myObj.get and the IDE looks the proper names up for you. Then you choose the right one and you are done with. WingIDE is such an IDE, and Kommodo too, I think. HTH Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: GUI with sophisticated Table support
Torsten Mohr [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi, i want to write an application where i need a Table to display some values. The table should display a list of objects, so to say, a column for each attribute of the object. I'd also like the user to be able to change the width of each column, like in Excel. I'd prefer to use Tkinter, but i think it can't do all that. Do a group-google search for *tkinter table*. That shows up quite a few hits. Is there a way for Tkinter to handle this? If not, what other GUI can do that? (wxPython?) What you are looking for is contained in the wxPython demo app. Thanks for hints, Torsten. HTH Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list
Re: GUI with sophisticated Table support
Torsten Mohr [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi, Do a group-google search for *tkinter table*. That shows up quite a few hits. thanks for that hint, but nearly every hit shows the Table of contents for Tkinter, which is not what i search for. Do a *group* google serach (i.e. a search w/i groups indexed by Google, formerly known as DejaNews). Then you'll get for example http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52266 http://tkinter.unpythonic.net/wiki/SortableTable http://groups.google.at/groups?hl=delr=selm=tkjjrtr89f687e%40news.supernew s.com to name a few. But even if I do a normal (i.e.. web) google search I get http://pmwcontribd.sourceforge.net/PmwContribD-r2_0_1/Table.py.html for example. HTH Franz GEIGER My question here is rather in detail about Tkinters Table and if it can show resizable columns tho easily display a list of objects. I did not find any help searching for this with google, but i'd really rather like to use Tkinter over wxPython, that's the background of the question. Thanks for your help anyway, sorry if my question was unclear. Best regards, Torsten. -- http://mail.python.org/mailman/listinfo/python-list
Re: Tkinter vs wxPython
Esmail Bonakdarian [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] Hi I have found ALL of the posts useful, thank you so much. Please keep them coming! I am learning a lot. I will probably play a bit with Tkinter and wxPython and see how each feels, just as Peter Hansen suggested). PyQt also looks It couldn't have been said better than Peter has. I might add this: Try both *and learn both*. Despite the fact, that I do most GUI stuff with wxPython, I sometimes face situations, where I need to be able to do some Tkinter stuff (mostly by use of PMW). This could happen to you too, more likely than you might think now. As for the wxPython path: I recently prototyped a GUI-app for Windows with wxPython and then (alas) had to port it to C++. I simply could download the wxWidgets (which wxPython is built upon) and kind of simply translate the Python stuff into C++! It really helped me *a lot* having a working wx/Python app, and saved me a lot of time, of course (but no as much as I had saved, if I hadn't to port it to C++). And while I am at it: It was a big benefit for me to *not* use a GUI builder (which could be the next thing you might ask for), when I started Python programming. When I started Python programming with 1.5.2 there wasn't a descent GUI builder for wx (or at least I couldn't find one). And today, where there are a few options (wxDesigner, Boa, to be concrete), I'm really glad never having used one: Everything I do is under *my* full control, and I guess this is the only way to get the most out of wx/Python. And for sure, it's the only way knowing what you do. As Peter said, the wxPython demo is a bonanza - use it. Summary: Taking all my experience into account, I'd advise you to learn Tkinter, to learn wxPython and to not use a GUI builder (which could be not what a newbie likes to hear). HTH Franz GEIGER P.S.: Concerning PyQt: Yes, so far I only can speak for Tkinter and wxPython. But as soon as I will be on Linux (hopefully next year), I'll try PyQt. So if you would have asked me next year, I had said (phew, is that correct English?): Learn Tkinter and wxPython and/or PyQt and no GUI builder :-) interesting, so I will take a look at that at some point down the line aswell. Thanks again, this is a great resource. Esmail -- http://mail.python.org/mailman/listinfo/python-list
[Parsing] How do I process loops with PLY?
I'm rather new to high level parsing with lex/yacc (and realy impressed so far). I'd like to parse *and execute* files like this: A=12 B=23 G X=A Y=B Z=34 # Move to X, Y, Z G Z=0 etc. No problems so far. But when loops enter the game, things seem to become more difficult: A=12 B=23 C=45 D=56 DX=0 FOR C # Exec the following lines C times G X=A+DX Y=B Z=34 # Move to X, Y, Z # more statements... DX=DX+67 NEXT How can I tell PLY to go back to the beginning of the FOR-loop's body to execute it C-1 more times? A syntax checker would not need to do that, but an interpreter (which actually I am building) has to. Any hints are welcome. Kind regards Franz GEIGER -- http://mail.python.org/mailman/listinfo/python-list