Re: Problem with Lexical Scope

2005-12-16 Thread Bengt Richter
On 16 Dec 2005 16:55:52 -0800, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: [...] >When I first wrote this thing it was 3 stage construction, not 2. I >wanted to abstract out specific tests and then JUST apply fields to >them in the actual rules for the business code. I then figured out if I >st

Re: Parser or regex ?

2005-12-16 Thread Paul McGuire
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Tim Arnold wrote: > > "Fuzzyman" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Hello all, > > > > > > I'm writing a module that takes user input as strings and (effectively) > > > translates them to f

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread bonono
Mike Meyer wrote: > It's conceivable that a change might make Python more popular and also > detract from the language in some way. For a ridiculous example, > making Python interpret Perl 6 would certainly make it more popular, > but I would argue that would seiously detract from the language. >

Re: Invoking Unix commands from a Python app

2005-12-16 Thread Murtog (sent by Nabble.com)
the commands module is perfect for this job, more information about it in here: http://docs.python.org/lib/module-commands.html oh, you could use the datetime module to get the time before the execution of the program and after the termini of the program, with theses times you can subtract one fr

Re: Python IDE

2005-12-16 Thread Murtog (sent by Nabble.com)
WingIDE IMHO is better, but it is not free. If you are intended to pay for it: WingIDE, if not, SPE. cheers! =] Sent from the Python - python-list forum at Nabble.com: Re: Python IDE -- http://mail.python.org/mailman/listinfo/python-list

Re: Python IDE

2005-12-16 Thread David
linuxfreak wrote: > Which is a better python IDE SPE or WingIDE in terms of features > You might want to look at a review of Python IDEs at http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html david lees -- http://mail.python.org/mailman/listinfo/python-list

Re: why does php have a standard SQL module and Python doesn't !?

2005-12-16 Thread Murtog (sent by Nabble.com)
This confusion is usual, its because python implements a padronized way to access databases, so you can change your database without having to change too much code. The easiest and quickest manner to access a MySQL and using Python is: 1) Geting the module using this site: http://www.python.org/t

Re: Next floating point number

2005-12-16 Thread Robert Kern
Steven D'Aprano wrote: > Unless I have missed something, Python doesn't appear to give an interface > to the C library's next float function. I assume that most C floating > point libraries will have such a function. http://www.mkssoftware.com/docs/man3/nextafter.3.asp -- Robert Kern [EMAIL PRO

Re: Email Policy Violation

2005-12-16 Thread Jay
wat is the question that your asking?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Browse type function

2005-12-16 Thread Murtog (sent by Nabble.com)
Give a look at this page: http://docs.python.org/lib/node715.html Look for the tkFileDialog. cheers. Sent from the Python - python-list forum at Nabble.com: Re: Browse type function -- http://mail.python.org/mailman/listinfo/python-list

Re: to write set of values to a file from python

2005-12-16 Thread Murtog (sent by Nabble.com)
muttu, just as an advice, in cases like this using the KirbyBase module is a better choice(IMHO): http://www.netpromi.com/kirbybase.html it should make easier your work =]. cheers Sent from the Python - python-list forum at Nabble.com: Re: to write set of values to a file from python -- http:

Re: special operator =+

2005-12-16 Thread Murtog (sent by Nabble.com)
This isnt related to any operator. It is just a assigment operator with a plus operator. This can be used with number without raising any error: In [12]: a =+ 5 In [13]: a Out[13]: 5 In [14]: a =+ -5 In [15]: a Out[15]: -5 In [16]: a =+ 5.8 In [17]: a Out[17]: 5.7998 In [18]: a =+ -5.

Re: Python IDE (was: PythonWin troubleshooting)

2005-12-16 Thread Brendan
I use Komodo now, and love it. It has all the features you'd expect: code completion, object browsing, folding, docstring previews etc. Of course it's the only full-featured, native and stable Python IDE currently available for the mac (SPE is close), so my choice is limited. Brendan Martin

Re: Email Policy Violation

2005-12-16 Thread Jay
wat is the question that your asking?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem with Lexical Scope

2005-12-16 Thread [EMAIL PROTECTED]
>>def lt(*fields): >>return collect(fields, lambda x, y: x < y) >>def gt(*fields): >>return collect(fields, lambda x, y: x > y) >>def gte(*fields): >>""" gte(field, ...) -> rule >>""" >>return collect(fields, lambda x, y: x >= y) >>etc... >DRY ? ;-) Do you mean by the doc s

Next floating point number

2005-12-16 Thread Steven D'Aprano
I'm looking for some way to get the next floating point number after any particular float. (Any mathematicians out there: I am aware that there is no "next real number". But floats are not real numbers, they only have a finite precision.) According to the IEEE standard, there should be a routine

Re: CGI module does not parse data

2005-12-16 Thread Devan L
amfr wrote: > I am writing a webserver, and I want it to be able to run python > scripts. But when I set sys.stdin to self.rfile (using the > BaseHTTPServer class, self.rfile is a input stream containing the > request), the cgi module does not parse the data. > Example script: > import cgi > form

Re: CGI module does not parse data

2005-12-16 Thread Steve Holden
amfr wrote: > Neither work > But you don't give us any further information to go on. Are you importing cgitb and calling cgitb.enable() to trap and print any errors that might occur? Are you looking in the browser at the HTM source (view source) of the page your server is returning to see more

Re: Python on GP2X (Linux Based Handheld Console)

2005-12-16 Thread Michael
Jérôme Laheurte wrote: > On Thu, 15 Dec 2005 08:43:34 +, Michael Sparks wrote: > >> I hadn't seen any announcements regarding this, but there's a little >> device recently released called a GP2X which is a small dual CPU >> (2x200Mhz) device which runs Linux. >> >> Anyway, I thought there mi

Re: Adding methods to instances

2005-12-16 Thread Ed Leafe
On Dec 16, 2005, at 6:26 PM, [EMAIL PROTECTED] wrote: > You can also just use: > > t.dynamic = dynamic.__get__(t) OK, I've tried that, and it does indeed work well. I've never had occasion to use descriptors before, and while it's clear what's going on, it still has a 'magical' feel to i

Re: Adding methods to instances

2005-12-16 Thread Ed Leafe
On Dec 16, 2005, at 7:55 AM, Antoon Pardon wrote: > But this will make the function a method to all instances of the > class. > Is that what you want? From your first post I had the impression you > only wanted the function to be the method of one particular instance. Yes, you're correct -

Re: special operator =+

2005-12-16 Thread Peter Hansen
Steve Holden wrote: > Peter Hansen wrote: >>[EMAIL PROTECTED] wrote: >>>kenny Nguyen>Does anyone know the operator "=+"? >>>It isn't an operator, it's equivalent to = (assignment) only. >> >>Though actually it would try to call the __pos__ method on the object >>prior to binding it to the name on

Re: Problem with Lexical Scope

2005-12-16 Thread [EMAIL PROTECTED]
>Sorry about "obfuscation contest," I just balked at the reduce code, which >seemed >like premature overgeneralization ;-) It's a personal preference, but the only thing I consider premature is optimization, not generalization. I prefer to try and capture any concept I can as its own abstracted p

Re: Errors testing m2crypto

2005-12-16 Thread Heikki Toivonen
morphex wrote: > I get the following messages running the testall.py script with > m2crypto 0.13, can anyone tell me what's wrong? Those happened either because of SWIG or OpenSSL incompatibility. They have been fixed since. Either get the latest release (0.15) or the fresh bits from Subversion. T

Re: Xah's Edu Corner: Responsible Software Licensing

2005-12-16 Thread Xah Lee
Responsible Software Licensing Xah Lee, 200307 Software is a interesting invention. Software has this interesting property, that it can be duplicated without cost, as if like copying money. Never in history are goods duplicable without cost. But with the invention of computer, the ephemeral non-p

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Ben Finney
"Ben Sizer" <[EMAIL PROTECTED]> writes: > Transitivity within any single enumeration plus transivity of > equivalence across multiple enumerations, should be enough for most > needs, no? +1 to transitivity within an enumeration. -1 to transitivity across enumerations. If they're supposed to be equ

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Ben Finney
Paul Rubin writes: > All in all, comparing by object identity doesn't sound too good. > Maybe you want to have the enum contain its own name internally, and > do a string comparison. The "__eq__ compares identity" was a glib pseudo-implementation; I didn't think it throu

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Steven D'Aprano
On Fri, 16 Dec 2005 02:43:35 -0800, Ben Sizer wrote: > Ben Finney wrote: >> The problem with "is the same value" as an explanation for '==' is >> that it doesn't help in cases such as:: >> >> >>> ShirtSize = Enum('small', 'medium', 'large') >> >>> AppleSize = Enum('small', 'large') >> >> W

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Steven D'Aprano
On Fri, 16 Dec 2005 19:45:51 +1100, Ben Finney wrote: > The problem with "is the same value" as an explanation for '==' is > that it doesn't help in cases such as:: > > >>> ShirtSize = Enum('small', 'medium', 'large') > >>> AppleSize = Enum('small', 'large') > > What should be the result

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Steven D'Aprano
On Thu, 15 Dec 2005 23:53:36 -0500, Peter Hansen wrote: > Ben Finney wrote: >> These are valid concerns. I can't see how to reconcile these against >> the desire for values from different enums to fail comparison. >> >> Am I alone in my tri-state view of enumeration value comparisons? Can >> anyo

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread Mike Meyer
"chuck" <[EMAIL PROTECTED]> writes: >> "it would make Python more popular" isn't an adequate >> justification for a change > I disagree. The world desperately needs programming languages, > frameworks, etc. that allow for the more efficient creation and > maintenance of software application - web

Wanted: binary of OpenCV Python extension module for Windows

2005-12-16 Thread Claudio Grondi
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. OpenCV library is mainly aimed at real time computer vision. Some example areas would be Human-Computer

Re: Enumeration idioms: Values from different enumerations

2005-12-16 Thread Steven D'Aprano
On Fri, 16 Dec 2005 15:16:08 +1100, Ben Finney wrote: >> As can be seen from the above, you raise an exception when one wants >> to compare Enums from different enumarations, but it seems a bit >> strange that different enumerations belong to the same type. > > This does seem a point that could b

Re: Adding methods to instances

2005-12-16 Thread ziga . seilnacht
You can also just use: t.dynamic = dynamic.__get__(t) -- http://mail.python.org/mailman/listinfo/python-list

Re: special operator =+

2005-12-16 Thread Steven D'Aprano
On Thu, 15 Dec 2005 15:02:43 -0800, bearophileHUGS wrote: > kenny Nguyen>Does anyone know the operator "=+"? > > It isn't an operator, it's equivalent to = (assignment) only. No it is not. py> x = [] py> x =+ [1] Traceback (most recent call last): File "", line 1, in ? TypeError: bad operand

Re: SMP, GIL and Threads

2005-12-16 Thread Aahz
In article <[EMAIL PROTECTED]>, catsup <[EMAIL PROTECTED]> wrote: > >I have an app written under version Python 2.3.5. The problem I'm >having is that it hangs on one of its threads. The thread that hangs >does updates to a standard dictionary shared with another thread that >only reads this dict

Errors testing m2crypto

2005-12-16 Thread morphex
Hi, I get the following messages running the testall.py script with m2crypto 0.13, can anyone tell me what's wrong? EE == ERROR: test_cipher_mismatch (test_ssl.S

Re: ActivePython and Amara

2005-12-16 Thread Jay
sigh... i keep telling you guys im not a newbie, its just that i had a question about that module... But, i understand i may sound like a noob because i was asking for detailed questions instead of the broad ones that you guys were giving me... but i would not like to be considered a noob around he

Re: CGI module does not parse data

2005-12-16 Thread amfr
Neither work -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread Mike Meyer
"Alia Khouri" <[EMAIL PROTECTED]> writes: > If Subway does not unite, chaos will continue in python web app land, > and ruby will become ascendant. This is more than a critical issue - > don't dismiss it without understanding that doing so will have severe > repercussions for subway (and by a proce

Re: Python Image Library

2005-12-16 Thread S. D. Rose
Sorry-- meant to post to comp.python.image "S. D. Rose" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a question about PIL. > > I get a 50k photo from a MySQL table, convert it to grey-scale, do some > rotations, etc. Then I want to put it back. It seems that after I do th

Re: How to use pydoc?

2005-12-16 Thread newsposter
Thanks! Yes, it brings up a documentation server, and serves up some nicely formatted documentation. Learning learning... -Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: SMP, GIL and Threads

2005-12-16 Thread Steve Holden
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > Steve Holden <[EMAIL PROTECTED]> wrote: > ... > >>I don't see why you should get problems on SMP hardware, since the >>threads are all part of the same process and should therefore (I'd have >>thought) be tagged with the same processor affini

Re: How can I load python script into Html ??

2005-12-16 Thread Roger Upole
Using the normail src attribute works for me: Did you register the Python script engine with pyscript.py or pyscript_rexec.py ? Roger -- "Ask the ToeCutter - HE knows who I am !" "PatPoul" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sorry I was not clear, my setup is

Re: How to use pydoc?

2005-12-16 Thread newsposter
Thanks Peter. I do have two versions, with the older one existing for compatibility with another application. Option -m works with 2.42. I neglected to check this when I ran from the command-line. Thanks, Chris -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter canvas tag stuff

2005-12-16 Thread James Stroud
Tuvas wrote: > I'm trying to display a picture on a Tkinter Canvas. It seems to work > fine the first time that it is displayed. However, subsequent times > running shows an error like this: > > TCLerror: Wrong # args: should be ".-1211472948 .-1211470996 addtag tag > searchCommand ?arg arg ...? >

Re: Visual Python : finished ?

2005-12-16 Thread Neil Hodgson
Microsoft's Visual Studio SDK team have produced some IronPython integration. Its available as source code but you have to sign up (including Passport ...) for a Visual Studio SDK license. Info: http://blogs.msdn.com/aaronmar/archive/2005/12/09/502202.aspx Download: http://affiliate.vsipmem

Re: RoR like (was : SPE 0.8.1.b Python IDE...)

2005-12-16 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Boddie <[EMAIL PROTECTED]> wrote: > >I personally don't believe very strongly in this server-side >serialisation of various non-displayable formats for potentially large >amounts of client-side code to unpack, process, stuff into different >places, and so on. As

Re: tkinter canvas tag stuff

2005-12-16 Thread James Stroud
Tuvas wrote: > I'm trying to display a picture on a Tkinter Canvas. It seems to work > fine the first time that it is displayed. However, subsequent times > running shows an error like this: > > TCLerror: Wrong # args: should be ".-1211472948 .-1211470996 addtag tag > searchCommand ?arg arg ...? >

Re: MySQLdb-python how to install on MacOsX

2005-12-16 Thread dimitri pater
thanks Adam!Like Steve, I was experiencing the same problem. I tried so may other things, but finally gave up. But now it works!and thank you Steve, for your postgreetz,Dimitri On 16 Dec 2005 12:16:13 -0800, adtroy <[EMAIL PROTECTED]> wrote: Steve,I had the same problem, the only thing I found that

Re: python website

2005-12-16 Thread dimitri pater
hello,look here: http://www.cherrypy.org/wiki/CherryPySuccessStory for websites created with CherryPyand there is more (django and turbogears spring to mind) bye,DimitriOn 12/16/05, carmel stanley <[EMAIL PROTECTED]> wrote: I am interested in doing a web site in python can any body direct m

Re: How to use pydoc?

2005-12-16 Thread SPE - Stani's Python Editor
If it's just about displaying pydoc pages... SPE Python IDE has pydoc built in. Just open any file and click on the pydoc tab, next to the uml tab. Then you see the python documentation of that script, which is generated on the fly, If you want to see documentation about the sys module, just click

Re: Parser or regex ?

2005-12-16 Thread Fuzzyman
Fredrik Lundh wrote: > Fuzzyman wrote: [snip..] > > I'd use some variation of: > > http://online.effbot.org/2005_11_01_archive.htm#simple-parser-1 > > (that version can parse tuples, but it should be too hard to extend > it to handle keyword arguments) > Thanks to all who answered - I'll inves

Re: python website

2005-12-16 Thread Bill Mill
On 12/16/05, carmel stanley <[EMAIL PROTECTED]> wrote: > > I am interested in doing a web site in python can any body direct me to a > site that was created in python. > thanks nige python.org cherrypy.org zope.org turbogears.org blog.ianbicking.org zephyrfalcon.org/weblog2/ djangoproject.org che

python website

2005-12-16 Thread carmel stanley
I am interested in doing a web site in python can any body direct me to a site that was created in python.  thanks nige -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python write foreign characters to the console?

2005-12-16 Thread Do Re Mi chel La Si Do
Hi! That depends on what we call "console". Python console? or Windows console? @-salutations Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb-python how to install on MacOsX

2005-12-16 Thread adtroy
Steve, I had the same problem, the only thing I found that worked was using the MySQL-python installer (http://pythonmac.org/packages/MySQL_python-1.2.0-py2.4-macosx10.3.zip) found at the site below. It says it is for 10.3 but I have had no problems using it on 10.4. Hope that helps. http://py

Re: Problem with exec

2005-12-16 Thread Michael Spencer
Peter Otten wrote: > > If you could provide a function with a different namespace when it's called, > e. g > > f() in namespace > > would look up its globals in namespace, that might be an interesting concept > but it's not how Python works. > > Peter > It does seem like an interesting concep

Re: How to use pydoc?

2005-12-16 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Thanks for replying Peter, but none of your suggestions are working. > > S:\projects\C2PC\src>python -m > Unknown option: -m > usage: python [option] ... [-c cmd | file | -] [arg] ... > > I should also be able to run 'pydoc -g' to start a webserver. > > I guess I will ha

Nested loops, cross products, and so on (was: new in programing)

2005-12-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Dan Bishop <[EMAIL PROTECTED]> wrote: >Cameron Laird wrote: >... >> for hextuple in [(i, j, k, l, m, n) >> for i in range(1, lim + 1) \ >> for j in range (1, lim + 2) \ >> for k in range (1, lim + 3) \ >> for l in range (1, lim +

Re: How to use pydoc?

2005-12-16 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Thanks for replying Peter, but none of your suggestions are working. > > S:\projects\C2PC\src>python -m > Unknown option: -m > usage: python [option] ... [-c cmd | file | -] [arg] ... > > I should also be able to run 'pydoc -g' to start a webserver. Do you have multip

Re: How to use pydoc?

2005-12-16 Thread dvm1981
On Fri, 16 Dec 2005 07:23:57 -0800, newsposter wrote: import pydoc import sys sys.version > '2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]' pydoc sys > SyntaxError: invalid syntax > > The documentation for pydoc says: > "Run "pydoc " to show documentation

Re: How to use pydoc?

2005-12-16 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Thanks for replying Peter, but none of your suggestions are working. > > S:\projects\C2PC\src>python -m > Unknown option: -m > usage: python [option] ... [-c cmd | file | -] [arg] ... The -m option was added in Python 2.4, you must have an older version (though your OP

Re: why does php have a standard SQL module and Python doesn't !?

2005-12-16 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > OK, > point taken - maybe what threw me off was the simple fact that there > CAN be NO "ONE standard/default SQL package". > As a newbie in sql I was hoping to find something like e.g. the socket > module (one size fits all) > > So: Maybe this could be explained on the "

Re: SMP, GIL and Threads

2005-12-16 Thread catsup
Yes. The test for Empty was edited out. There is a great deal going on in this application, most not germane to the problem. I should perhaps let all of you be the judge of that. Hopefully, this will be enough to help generate ideas. Thanks, Randy -- http://mail.python.org/mailman/listinfo/p

Re: Python on GP2X (Linux Based Handheld Console)

2005-12-16 Thread Jérôme Laheurte
On Thu, 15 Dec 2005 08:43:34 +, Michael Sparks wrote: > I hadn't seen any announcements regarding this, but there's a little > device recently released called a GP2X which is a small dual CPU > (2x200Mhz) device which runs Linux. > > Anyway, I thought there might be someone in here interested

Re: SMP, GIL and Threads

2005-12-16 Thread Peter Hansen
catsup wrote: > The accessing thread takes command requests off a queue, every > half-second, placed there by an altogether different thread, and does a > lookup on this same dictionary before performing this command: > >def run_thread(self): > while( not self.terminate ): > cm

Re: How to use pydoc?

2005-12-16 Thread newsposter
Thanks for replying Peter, but none of your suggestions are working. S:\projects\C2PC\src>python -m Unknown option: -m usage: python [option] ... [-c cmd | file | -] [arg] ... I should also be able to run 'pydoc -g' to start a webserver. I guess I will have to write the author of pydoc for an an

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread chuck
> Let's just note that sturgeon's law applies to all programmers, and > let it go at that. I'll get back to this. fine > And thank you. you are welcome > I'm not a big fan of popularity for the sake of popularity. neither am I > "it would make Python more popular" isn't an adequate > justifica

Python Image Library

2005-12-16 Thread S. D. Rose
I have a question about PIL. I get a 50k photo from a MySQL table, convert it to grey-scale, do some rotations, etc. Then I want to put it back. It seems that after I do the greyscale, it converts from 'JPEG' to 'RAW'. Can anyone tell me how I convert the image back to 'JPEG' and then insert th

Re: SMP, GIL and Threads

2005-12-16 Thread catsup
Yes. Iterating over a list that you concurrently update will definately cause problems. That is not the type of "read" I am doing in the application. My read is one key/value translation. Below is an example of the operations I am performing to help clarify. The update thread, running once eve

Re: why does php have a standard SQL module and Python doesn't !?

2005-12-16 Thread seb . haase
OK, point taken - maybe what threw me off was the simple fact that there CAN be NO "ONE standard/default SQL package". As a newbie in sql I was hoping to find something like e.g. the socket module (one size fits all) So: Maybe this could be explained on the "Database Modules" page. (and again: jus

Re: Can Python write foreign characters to the console?

2005-12-16 Thread Martin v. Löwis
Do Re Mi chel La Si Do wrote: > On windows, you MUST also configure the console. That's not true. In the standard configuration, all characters from the OEM code page will print fine. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.dll and encodings ?

2005-12-16 Thread Martin v. Löwis
Bugs wrote: > That was my obviously ineffective attempt at humor, hence the ;-) I wasn't in a humurous mood :-) there have been too many threads on this subject, and I'm just tired giving the same answers over and over again. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python24.dll and encodings ?

2005-12-16 Thread Martin v. Löwis
Thomas Heller wrote: > Technically, as far as py2exe is concerned, it would be nice if the zlib > module was a builtin module because it would be easier to bootstrap the > executable - for obvious reasons the zlib module cannot be loaded from a > (compressed) zipfile. Unfortunately, this collides

Re: lambda (and reduce) are valuable

2005-12-16 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Fredrik Lundh <[EMAIL PROTECTED]> wrote: . . . ># create numeric pad >digit("7", 1, 1); digit("8", 2, 1); digit("9", 3, 1) >digit("4", 1, 2); digit("5", 2, 2); digit("6", 3, 2) >d

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread Mike Meyer
"Ben Sizer" <[EMAIL PROTECTED]> writes: > I see what you mean, but unfortunately I think there is a lot more > fuzziness than that. If the separate parts were clearly delineated > things would be a lot better. I look to the Database API Specification > as a great example of how this could (should?)

tkinter canvas tag stuff

2005-12-16 Thread Tuvas
I'm trying to display a picture on a Tkinter Canvas. It seems to work fine the first time that it is displayed. However, subsequent times running shows an error like this: TCLerror: Wrong # args: should be ".-1211472948 .-1211470996 addtag tag searchCommand ?arg arg ...? My code works like this:

Re: SMP, GIL and Threads

2005-12-16 Thread Greg Copeland
In situations like this, you need to guard the resource with a mutex. In Python, things like insertions are atomic but iterations are not. Thusly, if you wrap it with a mutex, things can be made safe. I saw, "can be", because you then have to ensure you always use the mutex to satify your concurre

Re: SMP, GIL and Threads

2005-12-16 Thread Donn Cave
In article <[EMAIL PROTECTED]>, Steve Holden <[EMAIL PROTECTED]> wrote: ... > I don't see why you should get problems on SMP hardware, since the > threads are all part of the same process and should therefore (I'd have > thought) be tagged with the same processor affinity. Hence the GIL > shoul

Re: access to preallocated block of memory?

2005-12-16 Thread Greg Copeland
What license does the code use? The PKG-INFO file says its MIT? This accurate? I'm still looking over the code, but it looks like I can do exactly what I need with only minor changes. -- http://mail.python.org/mailman/listinfo/python-list

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread Mike Meyer
"chuck" <[EMAIL PROTECTED]> writes: > As I read through this thread I can't say that I disagree that having > more choices is a 'good thing'. However in your example here - I > suspect that you are a bit sharper and have a bit more guts than your > average code slinger since you appear to be an in

Re: Shed Skin (Python-to-C++ Compiler) 0.0.5.9

2005-12-16 Thread Greg Copeland
I've been following this project with great interest. If you don't mind me asking, can you please include links, if available, when you post updates? Great Stuff! Keep in coming! Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: OO in Python? ^^

2005-12-16 Thread Steve Horsley
Matthias Kaeppler wrote: > Hi, > > sorry for my ignorance, but after reading the Python tutorial on > python.org, I'm sort of, well surprised about the lack of OOP > capabilities in python. Honestly, I don't even see the point at all of > how OO actually works in Python. > > For one, is there

Re: Parser or regex ?

2005-12-16 Thread Fredrik Lundh
Fuzzyman wrote: > I'm writing a module that takes user input as strings and (effectively) > translates them to function calls with arguments and keyword > arguments.to pass a list I use a sort of 'list constructor' - so the > syntax looks a bit like : > >checkname(arg1, "arg 2", 'arg 3', keywa

Re: access to preallocated block of memory?

2005-12-16 Thread Greg Copeland
That certainly looks interesting. I'll check it out right now. Thanks! Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: to write set of values to a file from python

2005-12-16 Thread Scott David Daniels
Scott David Daniels wrote: > > def lagged(source): > '''produce element,islast for elements in source''' > generator = iter(source) > previous = generator.next() > for element in generator: > yield previous, False > yield previous, True Oops

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread gene tani
Alia Khouri wrote: > In http://subway.python-hosting.com/ticket/216 Peter Mere writes: > > > "Conquest is a method of union. ... > unstoppable juggernaut of > chaos will continue in python web app land, > and ruby will become ascendant. This is more than a critical issue - > don't dismiss it with

Email Policy Violation

2005-12-16 Thread BSG-SMTP-Gateway
The following message sent by this account has violated system policy: Connection From: 64.253.55.90 From: python-list@python.org To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PRO

Re: Parser or regex ?

2005-12-16 Thread Graham Fawcett
Fuzzyman wrote: > Hello all, > > I'm writing a module that takes user input as strings and (effectively) > translates them to function calls with arguments and keyword > arguments.to pass a list I use a sort of 'list constructor' - so the > syntax looks a bit like : > >checkname(arg1, "arg 2",

Re: Which Python web framework is most like Ruby on Rails?

2005-12-16 Thread Alia Khouri
In http://subway.python-hosting.com/ticket/216 Peter Mere writes: "Subway has a lot of ideas TurboGears lacks. Everything from the @client ajax-in-python to CherryFlow. On technical merits, Subway should eat TurboGears' dinner. But we all know market outcomes are not based on technical merit. The

Re: SMP, GIL and Threads

2005-12-16 Thread Thomas Heller
Steve Holden <[EMAIL PROTECTED]> writes: > catsup wrote: >> Hi, >> I have an app written under version Python 2.3.5. The problem I'm >> having is that it hangs on one of its threads. The thread that hangs >> does updates to a standard dictionary shared with another thread that >> only reads this

Re: Browse type function

2005-12-16 Thread Tuvas
Thanks for the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Browse type function

2005-12-16 Thread Steve Holden
Tuvas wrote: > I am building a GUI interface with Tkinter. I need to have a way to > open and save files. Is there a nice GUI that can do that for me, ei, > show what files are avaliable, a choose file type function? If it > matters any, I am planning on running this on both windows and linux. > Th

Re: SMP, GIL and Threads

2005-12-16 Thread Steve Holden
catsup wrote: > Hi, > > I have an app written under version Python 2.3.5. The problem I'm > having is that it hangs on one of its threads. The thread that hangs > does updates to a standard dictionary shared with another thread that > only reads this dictionary. This app works beautifully on a

Re: Invoking Unix commands from a Python app

2005-12-16 Thread Martin Blume
"Rob Cowie" schrieb > Excellent... just the thing I was looking for. Thanks. > > Does anyone know of a unix app that could be used to > monitor the duration of processes etc.? > man -k account showed me (among others): acct (2) - switch process accounting on or off acct (5)

Re: Browse type function

2005-12-16 Thread Larry Bates
Google is your friend: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 -Larry Bates Tuvas wrote: > I am building a GUI interface with Tkinter. I need to have a way to > open and save files. Is there a nice GUI that can do that for me, ei, > show what files are avaliable, a choose

Re: Python IDE (was: PythonWin troubleshooting)

2005-12-16 Thread SPE - Stani's Python Editor
Thanks Tim, SPE is written in Python and uses wxPython for its user interface and is being actively developed. In case you want to know more: SPE is a python IDE with auto-indentation, auto completion, call tips, syntax coloring, UML viewer, syntax highlighting, class explorer, source index, auto

Browse type function

2005-12-16 Thread Tuvas
I am building a GUI interface with Tkinter. I need to have a way to open and save files. Is there a nice GUI that can do that for me, ei, show what files are avaliable, a choose file type function? If it matters any, I am planning on running this on both windows and linux. Thanks for the help! --

Re: Visual Python : finished ?

2005-12-16 Thread DH
Do Re Mi chel La Si Do wrote: > Hi! > > See : > http://www.activeperl.com/Products/Visual_Perl/?mp=1 Yes, they have discontinued it but there is Komodo, or numerous other alternative IDES for python: http://wiki.python.org/moin/IntegratedDevelopmentEnvironments One good one not listed on tha

  1   2   3   >