Re: python3: 'where' keyword

2005-01-08 Thread Carl Banks
Nick Coghlan wrote: > Andrey Tatarinov wrote: > > Hi. > > > > It would be great to be able to reverse usage/definition parts in > > haskell-way with "where" keyword. Since Python 3 would miss lambda, that > > would be extremly useful for creating readable sources. > > > > Usage could be something l

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread michele . simionato
> So I've always had it in > the back of my mind that languages that can easily support massive > (especially automatic) parallelization will have their day in the sun, > at least someday. and the language of the future will be called ... FORTRAN! :-) (joking, but it is the only language I know

Re: How to read/write blobs with mysqldb?

2005-01-08 Thread Paul Rubin
"Christopher J. Bottaro" <[EMAIL PROTECTED]> writes: > That doesn't sound very efficient to me. What if my computer only has 64 MB > of memory and the data I want to insert is 128 MB? Don't use such large blobs. -- http://mail.python.org/mailman/listinfo/python-list

Re: Software archeology (was Re: Developing Commercial Applications in Python)

2005-01-08 Thread Aahz
In article <[EMAIL PROTECTED]>, Stephen Waterbury <[EMAIL PROTECTED]> wrote: >Aahz wrote: >> In article <[EMAIL PROTECTED]>, >> Stephen Waterbury <[EMAIL PROTECTED]> wrote: >>> >>>Also see Python Success Stories: http://pythonology.org/success >>> >>>A notable example is Verity's search engine -

Re: Other notes

2005-01-08 Thread Nick Coghlan
Bengt Richter wrote: IOW, I think there is a fix: keep tokenizing greedily and tokenize floating point as a sequence of integers and operators, and let be translated by the compiler to floating point, and be translated to the appropriate generator expression implementation. That would be: ->

Getting List Of All Filesystem Mounts

2005-01-08 Thread Tim Daneliuk
Is there some pure Python/portable way to get a list of all currently mounted filesystems? Tim Daneliuk [EMAIL PROTECTED] PGP Key: http://www.tundraware.com/PGP/ -- http://mail.python.org/mailman/listinfo/pytho

Re: Python Operating System???

2005-01-08 Thread Roose
"Michael Hobbs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David Brown <[EMAIL PROTECTED]> wrote: > > Hello. I recently came across a free operating system called Unununium (or > > something like that) and it was developed in Python and Assembly. > > > > Now, I have been looking

Re: python3: accessing the result of 'if'

2005-01-08 Thread Nick Coghlan
Carl Banks wrote: Right. But you know that as soon as you add this to simple expressions, a bunch of people are going to come here whining about how they don't get to use where with if-expressions. Frankly, they might have a point here. Although we have replacing lambda expressions on our minds,

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Nick Coghlan
Steve Horsley wrote: But my understanding is that the current Python VM is single-threaded internally, so even if the program creates multiple threads, just one core will be dividing its time between those "threads". Not really. The CPython interpreter does have a thing called the 'Global Interpr

Re: Python Operating System???

2005-01-08 Thread Roose
> But I thought Python was an all-purpose language. After all, OS's > have been written in Lisp before too. It is a general purpose APPLICATION language. I am surprised that this hasn't been mentioned on this thread. An OS is NOT an application. It is a completely different kind of program. D

Re: Getting List Of All Filesystem Mounts

2005-01-08 Thread Roel Schroeven
Tim Daneliuk wrote: Is there some pure Python/portable way to get a list of all currently mounted filesystems? Check out MtPython: http://bebop.bigasterisk.com/python/docs/MtPython -- "Codito ergo sum" Roel Schroeven -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-08 Thread Paul Rubin
"Roose" <[EMAIL PROTECTED]> writes: > An OS is NOT an application. It is a completely different kind of program. > Do you guys understand the difference between user and kernel mode? Do you > know what address spaces and hardware interrupts are? Python is not > equipped to handle these things.

Re: python3: accessing the result of 'if'

2005-01-08 Thread Paul Rubin
Nick Coghlan <[EMAIL PROTECTED]> writes: > So let's use it for expression naming in 'if' statements, too. > > if someregexp.match(s) as m: ># blah using m > elif someotherregexp.match(s) as m: ># blah using m Certainly an improvement over what we have now. -- http://mail.python.org/mailm

Another look at language comparisons

2005-01-08 Thread Pierre Quentel
http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread AdSR
Nick Coghlan wrote: Killer app for this keyword: class C(object): x = property(get, set) where: def get(self): return "Silly property" def set(self, val): self.x = "Told you it was silly" Hey, this is super-elegant! AdSR -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread Paul Rubin
AdSR <[EMAIL PROTECTED]> writes: > > Killer app for this keyword: > > class C(object): > > x = property(get, set) where: > > def get(self): > > return "Silly property" > > def set(self, val): > > self.x = "Told you it was silly" > > Hey, this is super-elegant! Heh, even furt

Re: Getting rid of "self."

2005-01-08 Thread Terry Reedy
"BJörn Lindqvist" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I think it would be cool if you could refer to instance variables >without prefixing with "self." Others have expressed such a wish -- this comes up perhaps once a year. The bottom line is that as long as Python has

Re: Other notes

2005-01-08 Thread Bengt Richter
On Sat, 08 Jan 2005 18:22:53 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> IOW, I think there is a fix: keep tokenizing greedily and tokenize floating >> point as >> a sequence of integers and operators, and let be >> translated by >> the compiler to floating point, an

Re: Another look at language comparisons

2005-01-08 Thread Michael Sparks
Pierre Quentel wrote: > http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html I almost didn't look at this, but I'm glad I did - quite a fun comparison, nicely arbitrary and reminds me of RFC in a similar vein :) Michael. -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread Bengt Richter
On Sat, 08 Jan 2005 16:42:16 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >Nick Coghlan wrote: >> It also allows the necessary but uninteresting setup for an expression >> to be moved "out of the way", bringing the expression that does the real >> work to prominence. > >Killer app for this key

Re: python3: 'where' keyword

2005-01-08 Thread Andrey Tatarinov
Bengt Richter wrote: It also allows the necessary but uninteresting setup for an expression to be moved "out of the way", bringing the expression that does the real work to prominence. Killer app for this keyword: class C(object): x = property(get, set) where: def get(self): return "Sill

Re: python3: 'where' keyword

2005-01-08 Thread Andrey Tatarinov
Nick Coghlan wrote: It also allows the necessary but uninteresting setup for an expression to be moved "out of the way", bringing the expression that does the real work to prominence. Killer app for this keyword: class C(object): x = property(get, set) where: def get(self): return "Si

Re: OT: google groups bug, or worse?

2005-01-08 Thread aaronwmail-usenet
Bengt Richter wrote: > What did you google with? Is this it? > http://groups-beta.google.com/groups?hl=en&ie=UTF-8&q=%22The+xsdbXML+framework+provides+a+flexible+and+well+defined+infrastructure%22&qt_s=Search+Groups That was my *reply* to one of the original posts using Google, which I faked up w

Re: Another look at language comparisons

2005-01-08 Thread beliavsky
>From the web site: "Why Microsoft can Blow-Off with C#? These people have thought up programming languages Fortran, Prologue, Ada." The author is ignorant. Fortran was invented by IBM in the late 1950s, long before Microsoft existed. Ada was commissioned by the U.S. Department of Defense in the 1

tuples vs lists

2005-01-08 Thread worzel
I get what the difference is between a tuple and a list, but why would I ever care about the tuple's immuutability? Also, do you say 'too-ple' or 'chu-ple' - if you get my drift. (tomato or tomato kind of thing) TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: Another look at language comparisons

2005-01-08 Thread Jan Dries
[EMAIL PROTECTED] wrote: From the web site: "Why Microsoft can Blow-Off with C#? These people have thought up programming languages Fortran, Prologue, Ada." The author is ignorant. Fortran was invented by IBM in the late 1950s, long before Microsoft existed. Ada was commissioned by the U.S. Departm

The best way to do web apps with Python?

2005-01-08 Thread worzel
What is the best way to web developemnt with Python? Is there anything close to PHP style in-page script placement that can create and use other Python objects? I am not really interested in Zope (I believe that is more a CMS than anything else?) I am also looking for something a little more

Re: Pre/Postconditions with decorators

2005-01-08 Thread rittersporn
Thank you very much. It is really a very elegant piece of code :-) Eiffel (language) has both type checking and design by contract. Python lacks both. Your module tackles type checking, I tried to execute arbitrary code before and after function execution to realize runtime assertions. I wonder i

Re: The best way to do web apps with Python?

2005-01-08 Thread Paul Rubin
"worzel" <[EMAIL PROTECTED]> writes: > What is the best way to web developemnt with Python? Is there > anything close to PHP style in-page script placement that can create > and use other Python objects? I am not really interested in Zope (I > believe that is more a CMS than anything else?) I am al

Re: The limitation of the Photon Hypothesis

2005-01-08 Thread Steve Horsley
bill wrote: Please reply to [EMAIL PROTECTED], thank you ! No - I'll reply to the newsgroup, if you don't mind. The limitation of the Photon Hypothesis THE UNCERTAINTY PRINCIPLE IS UNTENABLE You cannot use classical theory to disprove quantum theory that easily. The uncertainty is quantum in orig

Re: tuples vs lists

2005-01-08 Thread Bruno Desthuilliers
worzel a écrit : I get what the difference is between a tuple and a list, but why would I ever care about the tuple's immuutability? Because, from a purely pratical POV, only an immutable object can be used as kay in a dict. So you can use tuples for 'composed key'. Bruno -- http://mail.python.o

Re: Pre/Postconditions with decorators

2005-01-08 Thread Skip Montanaro
>> Eiffel (language) has both type checking and design by contract. >> Python lacks both. Actually, Python is strongly typed. It's just dynamically instead of statically typed. Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Lee Harr
>> [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the >> continous CPU performance gain we've seen is finally over. And that future >> gain would primary be in the area of software concurrency taking advantage >> hyperthreading and multicore architectures. >> > Well, yes.

Re: Python/Qt Problem

2005-01-08 Thread Lee Harr
On 2005-01-08, Michael <[EMAIL PROTECTED]> wrote: > Hi, > > I am experiencing something very weird with PyQt. I have created several > windows based on QWidget using Designer. I can easily hide and show > these with the hide and show methods. However I have just created a new > window with Desig

Re: tuples vs lists

2005-01-08 Thread Steve Horsley
worzel wrote: I get what the difference is between a tuple and a list, but why would I ever care about the tuple's immuutability? Mainly for security and speed. Many library functions return info by returning a reference to an internally held tuple, and could be damaged / compromised / corrupted

Re: The best way to do web apps with Python?

2005-01-08 Thread Pierre Quentel
worzel a écrit : What is the best way to web developemnt with Python? Is there anything close to PHP style in-page script placement that can create and use other Python objects? I am not really interested in Zope (I believe that is more a CMS than anything else?) I am also looking for something

Re: why not datetime.strptime() ?

2005-01-08 Thread Lee Harr
On 2005-01-07, Skip Montanaro <[EMAIL PROTECTED]> wrote: > > josh> Shouldn't datetime have strptime? > > Sure, but it's not quite as trivial to implement as was strftime() support. > While strftime() is a C library function and thus easily called from within > the datetime C code, strptime() is

Re: DOS problem (simple fix??)

2005-01-08 Thread Raymond L. Buvel
Robert Brewer wrote: Gavin Bauer wrote: My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the results. I've gotten in the habit of putting raw_input("Press enter to exit") at the end of every program, and in additi

Re: tuples vs lists

2005-01-08 Thread worzel
Cheers - thanks for the feedback guys - pretty much answers the question for me. 'Two-Pull' it is then, thanks. "Steve Horsley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > worzel wrote: >> I get what the difference is between a tuple and a list, but why would I >> ever care

Re: The best way to do web apps with Python?

2005-01-08 Thread JZ
Dnia Sat, 8 Jan 2005 21:11:49 +0800, worzel napisał(a): > What is the best way to web developemnt with Python? Hmm. :) I prefer http://cherrypy.org + http://cheetahtemplate.org/. Very easy to learn and develop, yet powerfull. > Is there anything close to PHP style in-page script > placement th

Re: Other notes

2005-01-08 Thread beliavsky
Bengt Richter wrote: >OTOH, there is precedent in e.g. fortran (IIRC) for named operators of the >form .XX. -- e.g., .GE. for >= so maybe there could be room for both. Yes, but in Fortran 90 "==", ">=" etc. are equivalent to ".EQ." and ".GE.". It is also possible to define operators on native an

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Jp Calderone
On Sat, 08 Jan 2005 14:22:30 GMT, Lee Harr <[EMAIL PROTECTED]> wrote: >>> [http://www.gotw.ca/publications/concurrency-ddj.htm]. It argues that the > >> continous CPU performance gain we've seen is finally over. And that future > >> gain would primary be in the area of software concurrency taking

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Skip Montanaro
Jp> How often do you run 4 processes that are all bottlenecked on CPU? In scientific computing I suspect this happens rather frequently. "More is never enough." -- Bob Saltzman Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread André
At the risk of generating controversy, here's another type of example: def gcd(a, b): where: a: int, b: int return c where: c: int while a: a, b = b%a, a return b More can be found at http://aroberge.blogspot.com Andre -- http://mail.python.org/mailman/listinfo/python-list

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Philippe C. Martin
I remember a _few_ year ago when all specialists (Intel's) included agreed that the 100MHZ barrier would never be passed - so, at least, we did get free lunch for a couple of years :-) I also must add that in my 17 years of realtime/embedded programming, the problem usually was not the CPU speed -

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Aahz
In article <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote: >Michele deleted an attribution: >> >> So I've always had it in >> the back of my mind that languages that can easily support massive >> (especially automatic) parallelization will have their day in the sun, >> at least someday. > >and th

Re: python3: 'where' keyword

2005-01-08 Thread André
Darn space-eater google groups :-( Here is it again, at teh risk of generating controversy .def gcd(a, b): .where: .a: int, b: int .return c where: .c: int .while a: .a, b = b%a, a .return b more examples can be found at aroberge.blogspot.com André -- ht

Re: Returning same type as self for arithmetic in subclasses

2005-01-08 Thread Max M
Tim Peters wrote: Yes, and all builtin Python types work that way. For example, int.__add__ or float.__add__ applied to a subclass of int or float will return an int or float; similarly for a subclass of str. This was Guido's decision... I will not discuss it with him. He is usually right :-s Ge

Re: Another look at language comparisons

2005-01-08 Thread Max M
Jan Dries wrote: [EMAIL PROTECTED] wrote: And there is hope for Python, as Guido has recently been seen with a beard :-) http://www.tbray.org/ongoing/When/200x/2004/12/08/-big/IMG_3061.jpg LOL, he is working on linux, isn't he? So it was about bloody time. -- hilsen/regards Max M, Denmark http://w

Re: The best way to do web apps with Python?

2005-01-08 Thread Rob Emmons
> > > > > > > > What is Just FYI -- the post you posted was in HTML -- you might want to avoid this in the future. 99% of all posts to news groups are in text, not html. Html is hard for everyone to read with normal news readers and not usually of any extra value. It's also more of a se

Re: Python Operating System???

2005-01-08 Thread David Brown
So how would I make an OS Shell? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: passing parameters to menu commands

2005-01-08 Thread Kent Johnson
Philippe C. Martin wrote: menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New", command=lambda: callback('New')) filemenu.add_command(label="Open...", command=lambda: Of course you could do this with named forwarding functions if you prefer I'm not sure what 'named forwar

there's a socket.sendall(), so why no socket.recvall()?

2005-01-08 Thread Irmen de Jong
Subject says it all; there's a socket.sendall(), so why no socket.recvall()? I know that I can use the MSG_WAITALL flag with recv(), but this is not implemented on all platforms, most notably windows. --Iremn -- http://mail.python.org/mailman/listinfo/python-list

Re: python3: 'where' keyword

2005-01-08 Thread oren
When I first saw this I thought: "hmmm... this seems as redundant as adding a repeat/until loop to Python; there's no chance in hell it will ever be accepted by the community or Guido, but I actually kinda like it". It's nice to see mostly positive reactions to this idea so far. I think it's a re

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Donn Cave
Quoth Skip Montanaro <[EMAIL PROTECTED]>: | | Jp> How often do you run 4 processes that are all bottlenecked on CPU? | | In scientific computing I suspect this happens rather frequently. I think he was trying to say more or less the same thing - responding to "(IBM mainframes) ... All those sy

Installing IPython on win2k

2005-01-08 Thread Dave Merrill
Hi, I'm new to python, and ipython, but not to programming, having trouble getting ipython installed on windows 2000, python 233. Any help would be much appreciated; I'm sure I'm being some basic flavor of dense... First downloaded and installed PythonWin, readline and ctypes. They're all pretty c

Real Election Reform

2005-01-08 Thread D Flint
What do you think about this and have you seen this popular site before? This was taken from a web site http://www.afvr.org How can we safeguard the integrity of each vote? Today we have technology that protects our financial systems, military weapon systems and national intelligent organizations

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread John Roth
"Donn Cave" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Quoth Skip Montanaro <[EMAIL PROTECTED]>: | | Jp> How often do you run 4 processes that are all bottlenecked on CPU? | | In scientific computing I suspect this happens rather frequently. I think he was trying to say more

Re: OT: spacing of code in Google Groups

2005-01-08 Thread Peter Hansen
JanC wrote: Have a look at: They have native win32 builds of many of the GNU commandline utilities... Thanks, everyone, for all your kind help. (Uh, I thought it was clear I didn't actually *want* a method of cutting columns, since I have needed the functionality

windows mem leak

2005-01-08 Thread Bob Smith
Does the Win32 port of Python have a memory leak? I have some code that runs flawlessly on Linux, but bombs after a few hours on Windows. It's threaded and uses a lot of memory. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting on keys in a list of dicts

2005-01-08 Thread Peter Hansen
Nick Coghlan wrote: Stability in sorting is a property not to be sneezed at - it means switching to sorting by a second key gives the effect of "sort by key 1, then by key 2", whereas that doesn't hold with an unstable sort Assuming "key 1" refers to the first key, and "key 2" to the second key,

Re: 2 versions of python on 1 machine

2005-01-08 Thread Peter Hansen
flupke wrote: I used the 2 batch files technique and removed c:\python23 from my path var and all is fine now. Where did you find more info on PYTHONHOME and PYTHONPATH because the docs don't seem to contain a whole lot of info. Typing "python -h" gives a good start. I'm sorry, I don't recall wher

Re: python3: 'where' keyword

2005-01-08 Thread Peter Hansen
Andrey Tatarinov wrote: >>> print words[3], words[5] where: >>> words = input.split() - defining variables in "where" block would restrict their visibility to one expression Then your example above doesn't work... print takes a sequence of expressions, not a tuple as you seem to think. -Pet

Re: Python Operating System???

2005-01-08 Thread Peter Hansen
Paul Rubin wrote: When Unix was first written, people thought implementing an OS in C was ludicrous. Everyone knew OS's had to be written in assembler. Actually, when Unix was first written that belief was entirely correct, and OSes *did* have to be written in assembler. That is, pure C did not ha

Re: OT: google groups bug, or worse?

2005-01-08 Thread Peter Hansen
[EMAIL PROTECTED] wrote: I'm concerned that google groups is not correctly reflecting the python lists. A month ago I announced the xsdbXML framework to the python list and the python-announce list. As you can see from the links below the python announce submission was approved by the moderators

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread Peter Hansen
John Roth wrote: I have yet to write a multi-thread program for performance reasons. If we include in the set of things covered by the term "performance" not only throughput, but also latency, then I suspect you actually have written some multithreaded programs for "performance" reasons. *I* certai

Re: Recent infoworld column

2005-01-08 Thread Peter Hansen
Dwarf Electrician wrote: from a long time listener... http://www.infoworld.com/article/04/12/30/01OPstrategic_1.html Kudos for Roger Binns! -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-08 Thread Peter Hansen
Bob Smith wrote: Does the Win32 port of Python have a memory leak? I have some code that runs flawlessly on Linux, but bombs after a few hours on Windows. It's threaded and uses a lot of memory. Let's see what you're missing: 1. platform specifics 2. versions of things involved 3. any sort of det

Re: Python Operating System???

2005-01-08 Thread Arich Chanachai
Peter Hansen wrote: Paul Rubin wrote: When Unix was first written, people thought implementing an OS in C was ludicrous. Everyone knew OS's had to be written in assembler. Actually, when Unix was first written that belief was entirely correct, and OSes *did* have to be written in assembler. *nods

Re: DOS problem (simple fix??)

2005-01-08 Thread Steve Holden
Gavin Bauer wrote: My DOS window (running in windows ME) closes the second it finishes running my programs. As you can imagine, this makes it hard to see the results. I've gotten in the habit of putting raw_input("Press enter to exit") at the end of every program, and in addition to being pain in t

Re: The limitation of the Photon Hypothesis

2005-01-08 Thread Steve Holden
Steve Horsley wrote: bill wrote: Please reply to [EMAIL PROTECTED], thank you ! No - I'll reply to the newsgroup, if you don't mind. The limitation of the Photon Hypothesis THE UNCERTAINTY PRINCIPLE IS UNTENABLE You cannot use classical theory to disprove quantum theory that easily. The uncertai

RE: there's a socket.sendall(), so why no socket.recvall()?

2005-01-08 Thread Robert Brewer
Irmen de Jong wrote: > Subject says it all; > there's a socket.sendall(), so why no socket.recvall()? Good question! Something like: # Receive reply. data = [] while True: try: chunk = conn.recv(8192) except Exception, x:

Re: tuples vs lists

2005-01-08 Thread Steve Holden
worzel wrote: Cheers - thanks for the feedback guys - pretty much answers the question for me. 'Two-Pull' it is then, thanks. Well, it might be "Two-Pull" in American, but in English it's "tyoopl" -- NOT "choopl" (blearch!). I've also heard people say "tuppl". So, basically, say whatever you wa

Re: Returning same type as self for arithmetic in subclasses

2005-01-08 Thread Steve Holden
Tim Peters wrote: [Max M] """ I subclass datetime and timedelta [...] Generally speaking, no. But I'm sure someone will torture you with a framework that purports to make it easy . Clearly the easy way is to have the type declaration introspect on the definitions of datetime and timedelta and the

Weekly Python Patch/Bug Summary

2005-01-08 Thread Kurt B. Kaiser
Patch / Bug Summary ___ Patches : 267 open ( +6) / 2727 closed ( +9) / 2994 total (+15) Bugs: 798 open ( -3) / 4748 closed (+15) / 5546 total (+12) RFE : 165 open ( +0) / 140 closed ( +1) / 305 total ( +1) New / Reopened Patches __ Remove wi

Re: The best way to do web apps with Python?

2005-01-08 Thread Steve Holden
worzel wrote: What is the best way to web developemnt with Python? Is there anything close to PHP style in-page script placement that can create and use other Python objects? I am not really interested in Zope (I believe that is more a CMS than anything else?) I am also looking for something a

Re: Recent infoworld column

2005-01-08 Thread Carlos Ribeiro
On Sat, 08 Jan 2005 13:14:17 -0500, Peter Hansen <[EMAIL PROTECTED]> wrote: > Dwarf Electrician wrote: > > from a long time listener... > > > > http://www.infoworld.com/article/04/12/30/01OPstrategic_1.html > > Kudos for Roger Binns! >From Mr. Udell himself: """ When people talk about the heroes

Re: Weekly Python Patch/Bug Summary

2005-01-08 Thread Max M
Kurt B. Kaiser wrote: Remove witty comment in pydoc.py (2005-01-01) CLOSED http://python.org/sf/1094007 opened by Reinhold Birkenfeld This is not a joke? :-) -- hilsen/regards Max M, Denmark http://www.mxm.dk/ IT's Mad Science -- http://mail.python.org/mailman/listinfo/python-list

interpreter Py_Initialize/Py_Finalize mem leak?

2005-01-08 Thread Roman Suzi
In pure curiosity I tried to compile loop.c from Demo/embed and started it with 'print 2+2'. It seems, that both 2.3 and 2.4 pythons have memory leaks in Py_Initialize/Py_Finalize calls. (That is, interpreter doesn't clean up well after itself). This is my setup: gcc -fpic loop.c -DHAVE_CONFIG_H

Re: Working with recordsets

2005-01-08 Thread Steve Holden
AdSR wrote: [EMAIL PROTECTED] wrote: Hi. I have one recorset that I would like to pass to 2 functions, one is for create an CSV file and the other one is to create a HTML file. The problem is that the recordset is totally read in the first function, and then when I pass it to the second funtion the

Re: Installing IPython on win2k

2005-01-08 Thread Tim G
Dave Merrill wrote: > Hi, I'm new to python, and ipython, but not to programming, having trouble > getting ipython installed on windows 2000, python 233. Any help would be > much appreciated; I'm sure I'm being some basic flavor of dense... First of all, rest assured that it does work (and quite e

Re: Embedding a restricted python interpreter

2005-01-08 Thread Dieter Maurer
Doug Holton <[EMAIL PROTECTED]> writes on Thu, 06 Jan 2005 20:34:31 -0600: > ... > Hi, there is a page on this topic here: > http://www.python.org/moin/SandboxedPython > > The short answer is that it is not possible to do this with the > CPython, but you can run sandboxed code on other virtual mac

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread aurora
Of course there are many performance bottleneck, CPU, memory, I/O, network all the way up to the software design and implementation. As a software guy myself I would say by far better software design would lead to the greatest performance gain. But that doesn't mean hardware engineer can sit

Re: there's a socket.sendall(), so why no socket.recvall()?

2005-01-08 Thread Irmen de Jong
Robert Brewer wrote: Irmen de Jong wrote: Subject says it all; there's a socket.sendall(), so why no socket.recvall()? [...] If you call .makefile() and then .read() the _fileobject, you get the same behavior (only better). Adding recvall would just duplicate that, I think. But that's desirable IM

Re: tuples vs lists

2005-01-08 Thread Irmen de Jong
Steve Holden wrote: Well, it might be "Two-Pull" in American, but in English it's "tyoopl" -- NOT "choopl" (blearch!). I've also heard people say "tuppl". Probably the same ones who attend Tuppl-ware parties. --Irmen -- http://mail.python.org/mailman/listinfo/python-list

Re: windows mem leak

2005-01-08 Thread Steve Holden
Bob Smith wrote: Does the Win32 port of Python have a memory leak? I have some code that runs flawlessly on Linux, but bombs after a few hours on Windows. It's threaded and uses a lot of memory. Thanks! Yes, that's a well-known problem. Code that runs with a few errors will port without any tro

losing CGI variables in os.environ in Python 2.4

2005-01-08 Thread jtauber
Did something change between 2.3 and 2.4 that would affect os.environ being populated with CGI variables when using the BaseHTTPServer/CGIHTTPServer? I received a bug report from someone trying to run my wiki/blog software, Leonardo[1] under Python 2.4 on Windows 2000. I was able to reproduce the

Re: Installing IPython on win2k

2005-01-08 Thread Dave Merrill
"Tim G" wrote in message news:[EMAIL PROTECTED] > Dave Merrill wrote: > > Hi, I'm new to python, and ipython, but not to programming, having > trouble > > getting ipython installed on windows 2000, python 233. Any help would > be > > much appreciated; I'm sure I'm being some basic flavor of dense

Re: Python Operating System???

2005-01-08 Thread Roose
> Is an OS written in Lisp also ludicrous? Because it's been done. Can you point me to this? I'd like to see how "truly" Lisp it is. My first guess would be -- not very. And I'd like to install it on my PC. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Operating System???

2005-01-08 Thread Roose
Well can you describe what kind of things you want to do exactly? My guess is you are not out to develop a new algorithm for virtual memory or task scheduling. There are many parts to an OS shell. An example is the command line, i.e. bash and the like in Unix, and cmd.exe in Windows. In Windows

Re: EOF for binary?

2005-01-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, flamesrock wrote: > os.path.getsize(infile) <= infile.tell() > > Because that returns the error: > # File "/usr/lib/python2.3/posixpath.py", line 142, in getsize > #return os.stat(filename).st_size > #TypeError: coercing to Unicode: need string or buffer, file found >

Re: escape string for command line

2005-01-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Ksenia Marasanova wrote: > I have a simple ecard creation script on a website, where user can add > text to a graphic. I use ImageMagick for it: > > # template_file => path to image template file > # new_file => path to generated file > # text => user input > command = '''

Re: Installing IPython on win2k

2005-01-08 Thread Dave Merrill
Fernando replied to a similar post of mine on the IPython list, and had a suggestion that for some unknown reason, worked. Or rather, what's unknown is why normal setup failed. For the benefit of anyone else who has this issue, I unzipped the files into C:\Program Files\ipython-0.6.6 ...then o

Re: "A Fundamental Turn Toward Concurrency in Software"

2005-01-08 Thread John Roth
"Peter Hansen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] John Roth wrote: I have yet to write a multi-thread program for performance reasons. If we include in the set of things covered by the term "performance" not only throughput, but also latency, then I suspect you actually ha

Documenting data members

2005-01-08 Thread Frans Englich
Hello, I have a custom module which among others contains a dictionary, acting as a "constant". I want to document it, but no matter what I do, it doesn't show up in `pydoc`. For example, the following doesn't work: """ A dictionary of the namespaces. """ xmlns = { ... } or xmlns = { """ A d

Re: escape string for command line

2005-01-08 Thread Ksenia Marasanova
> > > > I was wondering, is there a general way to escape the string entered > > by the user, to prevent code injection into command line? > > Take a look at the "string-escape" encoding: > > >>> evil = "'; rm -rf /;" > >>> command = "echo '%s'" > >>> print command % evil.encode('string-escape')

Re: Python Operating System???

2005-01-08 Thread jtauber
My experiment, Cleese, was making progress before I got distracted by other things. The approach was a micro-kernel in C made up of the CPython bytecode interpreter with the file-related calls to libc ripped out and some bare-metal port read/writes and memory operations exposed to Python as built-

Python Installation

2005-01-08 Thread brolewis
I need to install Python on a number of laptop computers (at least a dozen). I am needing to install Python 2.4, pycrypto, win32all, wxPython, and pyCurl. Can anyone tell me an easy way to install these onto the laptops? Ideally I would like to have a single executable to handle everything for me.

Re: Python Installation

2005-01-08 Thread brolewis
For what its worth, I am running Windows XP Pro on all of these machines. -- http://mail.python.org/mailman/listinfo/python-list

Re: Documenting data members

2005-01-08 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Frans Englich wrote: > I have a custom module which among others contains a dictionary, acting as a > "constant". I want to document it, but no matter what I do, it doesn't show > up in `pydoc`. For example, the following doesn't work: I'm using epydoc_ for my documentat

  1   2   >