Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Dave Cook
On 2005-07-24, Torsten Bronger [EMAIL PROTECTED] wrote: Is PyGTK more Pythonic by the way? I find it more Pythonic than raw wxpython. However, the API still has the fingerprints of C programmers all over it. Compare the gtk's clunky treemodel/treeview API to Cocoa's elegant delegates.

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Tim Lesher
Yes, it's not that hard to get the native file dialogs, as described in the FAQ: http://www.async.com.br/faq/pygtk/index.py?req=showfile=faq21.013.htp It would be nice if PyGTK had a knob for making it use win32 dialogs by default, though. -- http://mail.python.org/mailman/listinfo/python-list

Re: What is your favorite Python web framework?

2005-07-24 Thread Tim Lesher
I was using CherryPy quite a bit until recently, but I've since switched to Spyce: http://spyce.sf.net (and blogged it at http://apipes.blogspot.com/2005/07/first-taste-of-spyce.html). Spyce has been around since 2002 (so it's fairly stable and mature) but it's also under active development--a

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Paul Rubin
I've had miserable experiences trying to use WxPython or GTK under both RH9 and Fedora Core 3. There is some version skew between the installed versions of GTK and the WxWidgets on the distro site. I made some progress by installing an old version of GTK but there was still some problem. I

RE: [path-PEP] Path inherits from basestring again

2005-07-24 Thread Tony Meyer
[...] Open issues: [...] What about path * 4? If you keep the current join meaning of __div__, then assigning any sort of multiplication meaning to __mul__ would not be a good idea, IMO. It's natural to expect that __div__ and __mul__ are opposites. I suppose this means that you could make

Fire event when variable is Set/Get

2005-07-24 Thread Varghjärta
Hey! I'm a hobby programmer since many years now and I've done most of my latest 'real application' coding in C#. I've played with python of and on yet not catching on until a few months ago when I got myself hocked on it for real and now I love C# _and_ Python. But there is something that keeps

Problem loading a file of words

2005-07-24 Thread teoryn
I've been spending today learning python and as an exercise I've ported a program I wrote in java that unscrambles a word. Before describing the problem, here's the code: *--beginning of file--* #!/usr/bin/python # Filename: unscram.py def sort_string(word): '''Returns word in lowercase

Re: Getting a dictionary from an object

2005-07-24 Thread Dark Cowherd
voiceless-ly'rs What does this mean?? Just curious (googled that and ly'rs and didnt find anything relevant) -- Dark Cowherd -- http://mail.python.org/mailman/listinfo/python-list

Re: Fire event when variable is Set/Get

2005-07-24 Thread Robert Kern
Varghjärta wrote: Hey! I'm a hobby programmer since many years now and I've done most of my latest 'real application' coding in C#. I've played with python of and on yet not catching on until a few months ago when I got myself hocked on it for real and now I love C# _and_ Python. But

Re: Fire event when variable is Set/Get

2005-07-24 Thread tharaka
You are in luck because Python has Properties just like .NET. For details lookup the documentation of the built-in function property(). I'll just paste it here: property( [fget[, fset[, fdel[, doc) Return a property attribute for new-style classes (classes that derive from object). fget is

Re: Problem loading a file of words

2005-07-24 Thread Devan L
teoryn wrote: I've been spending today learning python and as an exercise I've ported a program I wrote in java that unscrambles a word. Before describing the problem, here's the code: *--beginning of file--* #!/usr/bin/python # Filename: unscram.py def sort_string(word):

Re: Problem loading a file of words

2005-07-24 Thread Robert Kern
teoryn wrote: I've been spending today learning python and as an exercise I've ported a program I wrote in java that unscrambles a word. Before describing the problem, here's the code: *--beginning of file--* #!/usr/bin/python # Filename: unscram.py def sort_string(word):

Re: Problem loading a file of words

2005-07-24 Thread Terrance N. Phillip
Kevin, I'm pretty new to Python too. I'm not sure why you're seeing this problem... is it possible that this is an out-by-one error? Is zymotechnics the *last* word in dictionary.txt? Try this slightly simplified version of your program and see if you have the same problem def

Re: Problem loading a file of words

2005-07-24 Thread Robert Kern
Devan L wrote: Heh, it reminds me of the code I used to write. def sort_string(word): return ''.join(sorted(list(word.lower( f = open('dictionary.txt','r') lines = [line.rstrip('\n') for line in f.readlines()] f.close() dictionary = dict((sort_string(line),line) for line in

Re: Fire event when variable is Set/Get

2005-07-24 Thread Mike C. Fletcher
Varghjärta wrote: ... But there is something that keeps bugging me, and that keeps me from embracing Python even more as a serious alternative to C#(for me). In C# I make heavy use of Get Set, mainly to fire an event that some property has changed so that one can act on that _if one would need

Re: Fire event when variable is Set/Get

2005-07-24 Thread gene tani
this recipe takes medium-deep copies (shallow copies of embedded sequences/dict's) of an obj's __dict__ when you need to monitor changes to the object's state from that point on: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302742 --

Re: Fire event when variable is Set/Get

2005-07-24 Thread Varghjärta
Thank you! Wow, this might be exactly what I want! Thanks to the pythonness (syntax) the code might even be shorter then implementing it in C#! Gonna go and play around with this some more(now), and can't wait til I get home (there will be some massive code cleaning). I wonder why I've never

Re: Problem loading a file of words

2005-07-24 Thread Devan L
Robert Kern wrote: That's definitely not the kind of dictionary that he wants. -- Robert Kern [EMAIL PROTECTED] In the fields of hell where the grass grows high Are the graves of dreams allowed to die. -- Richard Harter Oh, I missed the part where he put values in a list. --

Invoke a method to a specific thread

2005-07-24 Thread Varghjärta
Taking the opportunity to ask yet another python question as a newbie to this list, that's been bugging a wee but that I've managed to put off. When doing GUI apps in C# I often have to call a method that will modify the GUI somehow from a different thread then the GUI is on (to allow for GUI

Re: How to run python script in background after i logout

2005-07-24 Thread Steve Holden
Harlin Seritt wrote: I have a remote linux server where I can only access it via ssh. I have a script that I need to have run all the time. I run like so: python script.py It runs fine. When I log off ssh I notice that the script died when I logged off. How do I make sure it stays

Re: Invoke a method to a specific thread

2005-07-24 Thread en.karpachov
Mon, Jul 25, 2005 at 01:20:39PM +0800, Varghj?rta пишет: When doing GUI apps in C# I often have to call a method that will modify the GUI somehow from a different thread then the GUI is on (to allow for GUI responsiveness). I simply call Invoke() or BeginInvoke which resides in another thread

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Torsten Bronger
Hallöchen! Bryan [EMAIL PROTECTED] writes: Torsten Bronger wrote: Besides, wxPython prepares for being included into the standard distribution. wow, i've never heard this said so explicitly. is there a reference link backing up this statement? i really really hope this is true. i'm

Re: PyGTK or wxPython (not a flame war) on Windows

2005-07-24 Thread Robert Kern
Torsten Bronger wrote: As far as i know, there is nothing official. But I've read several times that it's the most likely candidate for a seconds GUI system for being included. I think you're reading *way* too much into people engaging in wishful thinking. -- Robert Kern [EMAIL PROTECTED]

Re: Importing User-defined Modules

2005-07-24 Thread Steve Holden
Walter Brunswick wrote: I need to import modules with user-defined file extensions that differ from '.py', and also (if possible) redirect the bytecode output of the file to a file of a user-defined extension. I've already read PEP 302 (http://www.python.org/peps/pep-0302.html), but I didn't

[ python-Bugs-1234985 ] using some_re.sub() often imports sre.__doc__

2005-07-24 Thread SourceForge.net
Bugs item #1234985, was opened at 2005-07-08 23:46 Message generated for change (Comment added) made by pterk You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1234985group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1243553 ] pydoc on cgi.escape lacks info that are in www docs

2005-07-24 Thread SourceForge.net
Bugs item #1243553, was opened at 2005-07-23 14:33 Message generated for change (Comment added) made by pterk You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1243553group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1243945 ] Python function/method/constant names as HTML-tag IDs

2005-07-24 Thread SourceForge.net
Bugs item #1243945, was opened at 2005-07-24 11:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1243945group_id=5470 Please note that this message will contain a full copy of

<    1   2