Re: ANN: Pyrex 0.9.6.3
Hello, Was about to report the same problem with setup.py. Regards, David 2007/10/18, [EMAIL PROTECTED] [EMAIL PROTECTED]: On Oct 17, 4:12 am, Greg Ewing [EMAIL PROTECTED] wrote: Pyrex 0.9.6.3 is now available: http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ Main features of this release: * The C API now uses just one name in the module namespace, instead of a name per C function. * The 'cdef' keyword and following extern/public/api qualifiers can be factored out of a group of declarations and made into a block header, e.g. cdef public: int spam float ftang void tomato() * A 3-argument form of the builtin getattr function has been added, called getattr3(). What is Pyrex? -- Pyrex is a language for writing Python extension modules. It lets you freely mix operations on Python and C data, with all Python reference counting and error checking handled automatically. Did anyone else notice that the setup.py file is screwed up? Or that the link on this guy's website for the Test Suite/Framework is broken? Mike -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Cross-platform GUI development
crappy, waaay better I will not feed the troll... Pygtk on mac just do the work for me on a more than satisfying way. David 2007/10/13, Diez B. Roggisch [EMAIL PROTECTED]: David Tremouilles schrieb: No issue with pygtk on mac! Actually I develop on this platform everyday. Macport take care of the installation for me http://www.macports.org/ (Fink should do the work too). Of course native GTK on OSX could be nice but definitely not needed at this point in time. It sure looks crappy in comparison to the rest of the OSX apps - and given that with Qt (and of course the brilliant PyObjc-bridge) there exist options that look feel waaay better, I wouldn't consider using GTK. -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Cross-platform GUI development
Hello, I would recommend pyGTK http://www.pygtk.org/ - your app does look the same on all platform (like for Tkinter) (This argurment apply if the same user would like to run the same app on different platform and thus do not want to see something different on each platform...) - easy to install on all platform: An all in one installed exist for windows: http://aruiz.typepad.com/siliconisland/2006/12/allinone_win32_.html - it looks nice and simple (it is originally the Gimp toolkit). Just my two cents, David 2007/10/12, [EMAIL PROTECTED] [EMAIL PROTECTED]: I've been programming in Python for 5 or more years now and whenever I want a quick-n-dirty GUI, I use Tkinter. This is partly because it's the first toolkit I learnt, but also because it's part of the standard Python distribution and therefore easy to get Python apps to work cross platform - it usually requires almost no porting effort. However, when I need a little bit more grunt, I tend to turn to Tix, which I thought was also fairly standard. However, this week, I wrote a Tix application under Linux which I'd really like to work on Mac OS and it's proving fairly painful to get it going. There is no Tix in the standard fink or apt repositories and when I download a tar-ball, it wouldn't build because it had a lot of unmet dependencies. I then read a post which said that only Tkinter/Python people really use Tix anymore and people in tcl/tk moved onto better toolkits long ago. My question is if Tix is old hat, what is the GUI toolkit I *should* be using for quick-n-dirty cross platform GUI development? I guess this is tangentially related to: http://groups.google.com/group/comp.lang.python/browse_thread/thread/2ed58ff6ac7d030c/42ed0d40ffd0b1c0?lnk=gstq=tix+#42ed0d40ffd0b1c0 I hope this isn't a stupid question. I'm wearing flame retardant underwear. Peter -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Cross-platform GUI development
No issue with pygtk on mac! Actually I develop on this platform everyday. Macport take care of the installation for me http://www.macports.org/ (Fink should do the work too). Of course native GTK on OSX could be nice but definitely not needed at this point in time. David 2007/10/13, Dave Cook [EMAIL PROTECTED]: On 2007-10-13, David Tremouilles [EMAIL PROTECTED] wrote: I would recommend pyGTK http://www.pygtk.org/ Native GTK on OSX is still in its infancy. For early adopters only at this point. See http://www.oreillynet.com/articles/author/2414 That leaves PyQt and WxPython as the only other realistic choices. Licensing issues aside, I think Qt has the most polished and well thought out API. The OSX Tiger dev tools include WxPython, though you may want to install a newer version. I suggest installing both and trying some of the included examples. Another possibility is Jython, if you like the Java way of doing things. Dave Cook -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Need help to understand garbage collection
Thanks Gabriel! I get it now. With your help I was able to focus on the real problem. Here is the correctly working example for the record: import gc class Test(object): def __init__(self): pass gc.collect() original_objects_id = [id(x) for x in gc.get_objects()] #create object a a = Test() gc.collect() new_objects = [x for x in gc.get_objects() if id(x) not in original_objects_id] print - * 40 print Added object:, len(new_objects) for obj in new_objects: print * * 10 print str(id(obj)) + : + str(obj) print gc.get_referents(obj) print * * 3 print - * 20 del new_objects del obj gc.collect() original_objects_id = [id(x) for x in gc.get_objects()] #remove object a del a gc.collect() after_rm_objects_id = [id(x) for x in gc.get_objects()] removed_objects_id = [idx for idx in original_objects_id if idx not in after_rm_objects_id] print - * 40 print Removed objects:, len(removed_objects_id) print removed_objects_id print - * 20 -- http://mail.python.org/mailman/listinfo/python-list
Re: Need help to find origin of a memory leakage
Finaly catch the memory leak I was fighting with Was a tricky one, but the solution was simple: I had to include the contents of the notebook tab in a frame. Otherwise the memory is not released when you remove the tab. Any idea why is it like that??? Could it be kind of pygtk bug? I attach the corrected example for the records. Davic 2007/10/4, David Tremouilles [EMAIL PROTECTED]: hello, I'm struggling with a memory leakage of my app for quite some time. Could somebody help? I join a demo program in attachment. The problem is that the memory consumption keeps on increasing while opening and closing tabs. In the demo attached a click on button will open a new tab. If, for example, you open ten new tabs, then close ten tabs, and open again ten tab, and repeat this many times you will see the memory consumption increases after each 10 close-10 open cycles. Could somebody help me on finding the origin of this leak? Note: I already post on pygtk list and did not get any useful help at this point in time. I use Python 2.5.1 GTK: (2, 12, 0) pyGTK: (2, 12, 0) I already observed the same issue with older versions... It's been a long time I try to solve it... Thanks in advance, mem_leak.py Description: Binary data fenetre.glade Description: Binary data element.glade Description: Binary data mem_leak_solved.py Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list
help on understanding garbage collection
Hello, I would need help to understand how garbage collection work and how to trace objects... An example is joined where and object is created and deleted. Why in the second part of the example I do not see any object removed: Removed objects: 0 [] Thanks for your help, David -- http://mail.python.org/mailman/listinfo/python-list
Need help to understand garbage collection
I would need help to understand how garbage collection work and how to trace objects... In the example below an object is created and deleted. Why in the second part of the example I do not see any object removed: import gc class Test(object): def __init__(self): pass gc.collect() original_objects_id = [id(x) for x in gc.get_objects()] #create object a a = Test() gc.collect() new_objects = [x for x in gc.get_objects() if id(x) not in original_objects_id] print - * 40 print Added object:, len(new_objects) for obj in new_objects: print * * 10 print str(id(obj)) + : + str(obj) print gc.get_referents(obj) print * * 3 print - * 20 gc.collect() original_objects_id = [id(x) for x in gc.get_objects()] #remove object a del a gc.collect() after_rm_objects_id = [id(x) for x in gc.get_objects()] removed_objects_id = [x for x in original_objects_id if x not in after_rm_objects_id] print - * 40 print Removed objects:, len(removed_objects_id) print removed_objects_id print - * 20 Which give: Added object: 2 ** 400600:[[...], __main__.Test object at 0x62bd0] [__main__.Test object at 0x62bd0, [[...], __main__.Test object at 0x62bd0]] *** ** 404432:__main__.Test object at 0x62bd0 [class '__main__.Test'] *** Removed objects: 0 [] -- http://mail.python.org/mailman/listinfo/python-list
Need help to find origin of a memory leakage
hello, I'm struggling with a memory leakage of my app for quite some time. Could somebody help? I join a demo program in attachment. The problem is that the memory consumption keeps on increasing while opening and closing tabs. In the demo attached a click on button will open a new tab. If, for example, you open ten new tabs, then close ten tabs, and open again ten tab, and repeat this many times you will see the memory consumption increases after each 10 close-10 open cycles. Could somebody help me on finding the origin of this leak? Note: I already post on pygtk list and did not get any useful help at this point in time. I use Python 2.5.1 GTK: (2, 12, 0) pyGTK: (2, 12, 0) I already observed the same issue with older versions... It's been a long time I try to solve it... Thanks in advance, mem_leak.py Description: Binary data fenetre.glade Description: Binary data element.glade Description: Binary data -- http://mail.python.org/mailman/listinfo/python-list
Re: Python and GUI
Hello, My 2 cents contribution: To me all toolkits offer nice features. It's just a matter of choice depending on your needs. I've personally chosen pyGTK and I use it successfully on Linux/windows/MacOsX for my home grown softs. The reasons of my choice: - It looks the same on all platform (actualy I want to use the softs on different platform and I definitly prefer that it look the same on all of them!) - It's easy to develop with (Glade3,...) - It works perfectly on all platform and it's no difficult to install (even compile!) on all of them. - It looks nice (GTK is the Gimp ToolKit) Let me say that I also tried TkInter (ugly :-( ), pyQt (a mess to understand what kind of license you are allowed to use for you soft), wxpython (it's GTK on Linux but not on other platform and thus not looking the same on all platform...) Just a personal view... David 21 May 2007 08:39:44 -0700, [EMAIL PROTECTED] [EMAIL PROTECTED]: Just wondering on what peoples opinions are of the GUIs avaiable for Python? All I am doing is prompting users for some data (listbox, radio buttons, text box, ect...). Then I will have some text output, maybe a scrolling text message as things are happening. I have some minor things I need to do, for example, if Checkbutton X is clicked, I need to disable TextBox Y, and I would like to display the scrolling text (output) Ultimately, is it worth downloading and learning some of the packages avaiable for Python, or should I just stick to the Tkinter stuff that is included. More specifically, has anyone used the Qt stuff for python, easy to use? -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list