Tkinter problem on Mac OS X

2006-04-09 Thread Andrew Trevorrow
Our app uses embedded Python to allow users to run arbitrary scripts. Scripts that import Tkinter run fine on Windows, but on Mac OS X there is a serious problem. After a script does "root = Tk()" our app's menus are permanently changed in the following way: - The top item in the application menu

Re: More pythonic circle?

2006-04-09 Thread John Machin
[Pythor] Sure, I tested it. === I don't think that word means what you think it means :-) [Pythor] On the other hand, I'm not having any trouble producing a whole circle, while you seem to think I'm only producing half a circle. The code that limits itself to a 5x5 box is only expected to produce

Re: how relevant is C today?

2006-04-09 Thread gregarican
Here are a few languages I recommend most programmers should at least have a peek at: 1) Smalltalk - The original object oriented programming language. Influenced anything from Mac/Windows GUI to Java language. Terse, clean syntax. IDE rolled into an operating system rolled into a set of core libr

Re: a unicode question?

2006-04-09 Thread John Machin
What do you mean by "ansi string"? Here is a superficially not-unreasonable answer to your more specific question: # >>> s1 = u'\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) ' # >>> s2 = '\xd6\xd0\xb9\xfa\xca\xaf\xbb\xaf(600028) ' # >>> s3 = s1.encode('latin1') # >>> s2 == s3 # True But what are you

"Locate" command in Python

2006-04-09 Thread mwt
Is there a function in python that does what "locate" does in a bash shell? I know I could do it by using os.popen('locate'), but I'm curious if there's a Python "native" way to go about it. Only needs to work in Unix, but would be interesting if it was cross-platform. Thanks. -- http://mail.p

Re: I wanna use urllib2 to get a page with a socks 5 proxy, who can give me a sample code ?

2006-04-09 Thread Ju Hui
thanks, I will try pycurl. -- http://mail.python.org/mailman/listinfo/python-list

Re: how relevant is C today?

2006-04-09 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "gregarican" <[EMAIL PROTECTED]> wrote: > Here are a few languages I recommend most programmers should at least > have a peek at: > > 1) Smalltalk - The original object oriented programming language. > Influenced anything from Mac/Windows GUI to Java language. Ter

Re: Python 3.0 or Python 3000?

2006-04-09 Thread Tim Peters
[John Salerno] > Is 'Python 3000' just a code name for version 3.0, or will it really be > called that when it's released? The smart money is on changing the name to Ecstasy, to leverage marketing publicity from the hallucinogenic club drug of the same name. "class" will be renamed to "rave", and

Re: Writing files on server through CGI

2006-04-09 Thread amaltasb
this cgi script write different files, request 1 will write 1.html, 2 will write 2.html and so on. Its not updating the current file. For example create.py processes a form and write user.html file and every user is unique. so if 10 users fill up the form at the same time and click submit button, c

Re: a unicode question?

2006-04-09 Thread zdwang
Mr. John Machin, Thank you very much! -- http://mail.python.org/mailman/listinfo/python-list

Re: "definitive" source on advanced python?

2006-04-09 Thread shalabh . chaturvedi
You might find http://www.cafepy.com/article/python_types_and_objects/ and http://www.cafepy.com/article/python_attributes_and_methods/ useful. These articles assume you know Python, and describe some of the mechanisms behind Python new-style objects - including descriptors (but not decorators). -

Re: a unicode question?

2006-04-09 Thread zdwang
Mr. John Machin This question come form the flow codes. I use the PyXml to build a DOM tree. from xml.dom.ext.reader import HtmlLib doc = HtmlLib.FromHtmlUrl('http://stock.business.sohu.com/q/nbcg.php?code=600028') title_elem = doc.documentElement.getElementsByTagName("TITLE")[0] title_string = t

can't pass command-line arguments

2006-04-09 Thread BartlebyScrivener
I'm still new at this. I can't get this to work as a script. If I just manually insert the values for sys.argv[1] and sys.argv[2] it works fine, but I can't pass the variables from the command line. What am I doing wrong? On windows xp, python 2.4.3 Thank you import os import fnmatch import sys

Re: "definitive" source on advanced python?

2006-04-09 Thread vdrab
wow, this looks nice. thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: can't pass command-line arguments

2006-04-09 Thread Felipe Almeida Lessa
Em Dom, 2006-04-09 às 19:41 -0700, BartlebyScrivener escreveu: > for path in all_files(sysargv[1], sysargv[2]): Instead of sysargv, use sys.argv. -- Felipe. -- http://mail.python.org/mailman/listinfo/python-list

Re: "Locate" command in Python

2006-04-09 Thread Adonis
mwt wrote: > Is there a function in python that does what "locate" does in a bash > shell? > > I know I could do it by using os.popen('locate'), but I'm curious if > there's a Python "native" way to go about it. Only needs to work in > Unix, but would be interesting if it was cross-platform. > >

Re: can't pass command-line arguments

2006-04-09 Thread BartlebyScrivener
Duh! Headsmack. Thanks. But also, I discovered something else. If I name the script findmyfiles.py and run it from the command line while in the directory where it is stored (on windows), I must run it as: findmyfiles.py d:/notes notes*.* I was used to being able to run scripts by just typing th

Re: Python 3.0 or Python 3000?

2006-04-09 Thread Ray
Dennis Lee Bieber wrote: > Or... just to save "3000" as a "time way down the road"... The next > major version of Python will be: Python PI (and each build will add > another digit... "3.1, 3.14, 3.141, ...") I like this idea a lot. This way, people ALWAYS know what the next release's name w

Re: Tkinter problem on Mac OS X

2006-04-09 Thread James Stroud
Andrew Trevorrow wrote: > Our app uses embedded Python to allow users to run arbitrary scripts. > Scripts that import Tkinter run fine on Windows, but on Mac OS X there > is a serious problem. After a script does "root = Tk()" our app's menus > are permanently changed in the following way: > > -

how to pipe to variable of a "here document"

2006-04-09 Thread eight02645999
hi I need to execute sql command using a "here document" like in unix. os.popen("osql", "w").write("""\ select * from table go """) how can i pipe these result of the select into a variable? thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3.0 or Python 3000?

2006-04-09 Thread John Salerno
Tim Peters wrote: > [John Salerno] >> Is 'Python 3000' just a code name for version 3.0, or will it really be >> called that when it's released? > > The smart money is on changing the name to Ecstasy, to leverage > marketing publicity from the hallucinogenic club drug of the same > name. "class"

Re: Python 2.5 licensing: stop this change

2006-04-09 Thread Steve Holden
Robert Kern wrote: > Francisco Reyes wrote: > >>Shane Hathaway writes: >> >> >>>I must saay that i am fully in favor of this change. The ppython >>>developerrs need to eat too. Iis no one ellse aware off the perils oof >>>ooutright open source llicenssing? >> >>I disagree with the change. I th

Re: how relevant is C today?

2006-04-09 Thread Ray
John Salerno wrote: > > At which level in the 'python challenge' did > > you get stuck - and why? > > Ugh, don't remind me! :) > > I'm stuck on level 12, which is yet another image processing puzzle. I'm > getting tired of those, and I think it's really a shame that there is a This is EXACTLY why

Re: Python 3.0 or Python 3000?

2006-04-09 Thread Steven Bethard
John Salerno wrote: > Is 'Python 3000' just a code name for version 3.0, or will it really be > called that when it's released? Actually, there's an official response these days in `PEP 3000`_: """ Naming Python 3000, Python 3.0 and Py3K are all names for the same thing. The project is called

ANN: python-ldap-2.2.0

2006-04-09 Thread Michael Ströder
Find a new release of python-ldap: http://python-ldap.sourceforge.net/ python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related stuff (e.g. p

Re: how to pipe to variable of a "here document"

2006-04-09 Thread Burton Samograd
[EMAIL PROTECTED] writes: > I need to execute sql command using a "here document" like in unix. > > os.popen("osql", "w").write("""\ > select * from table > go > """) > > how can i pipe these result of the select into a variable? popen doesn't work that way. you can only open them read or writ

Re: Python-list Digest, Vol 31, Issue 94

2006-04-09 Thread Gary Robinson
> I can't see anything >> called a T2100. I have 3 X2100 servers which are opterons. Right I meant X2100's, sorry. > Python cannot use psyco on opterons at all - > 32 bit mode or otherwise. Are you sure? I'm not saying I have reason to believe differently, but I just want to be sure. The Ps

Re: "Locate" command in Python

2006-04-09 Thread BartlebyScrivener
How about one of these that works on Windows XP? I know there's no files.cache, but I wonder if your script could be combined with another function that would generate a list of paths on a Windows XP machine. Anyway, thanks for the script. -- http://mail.python.org/mailman/listinfo/python-list

<    1   2