Re: lies about OOP

2004-12-21 Thread Fredrik Lundh
Paul Foley wrote: > >> That's because their language is derived from Serbo-Croat. > > No it isn't. time to tune your "absurd humour" sensor somewhat slightly? I thought the next sentence was a pretty obvious giveaway: "But both the Finns and the Swedes will tell you it's the Norwegians w

Re: How about "pure virtual methods"?

2004-12-21 Thread Fredrik Lundh
Noam Raphael wrote: > Oh, and another thing - maybe "abstract" is a better name than > "notimplemented"? notimplemented > might suggest a method which doesn't have to be implemented - and raises > NotImplementedError when > it is called. What do you think? what's the difference? no, really?

Re: how to start a new process while the other ist running on

2004-12-21 Thread Fredrik Lundh
Erik Geiger wrote: > I have a running python script (capisuit incoming.py). This script shall > start a linux shell script. If I start this script like os.system(/paht/to > shellscipt.sh) the python scipt waits for the exit of the shell script and > then goes on with the rest of the python script.

Re: regular expression: perl ==> python

2004-12-21 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > i am so use to perl's regular expression that i find it hard > to memorize the functions in python; so i would appreciate if > people can tell me some equivalents. > > 1) In perl: > $line = "The food is under the bar in the barn."; > if ( $line =~ /foo(.*)bar/ ) { prin

Re: BASIC vs Python

2004-12-21 Thread Jan Dries
Andrew Dalke wrote: Jan Dries If you just want to play notes, you could look at MIDI. [snip] It's hard to compare that to the current era. Sound clips are much more common, it's easy to record audio, keyboards and other specialized devices are cheap, and there's plenty of mixer and recording soft

Re: win32 process name

2004-12-21 Thread Fredrik Lundh
"phil" <[EMAIL PROTECTED]> wrote: > from win32all > EnumProcesses gives me the pids, then > OpenProcess(pid) gives me a handle. > Then what? > GetModuleFileNameEX? It requires two handles as args > and I can't figure out which one is the handle from OpenProcess > and what it wants for the other o

Re: error problems for import some copora with nltk

2004-12-21 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: >I did install the python 2.4 and nltk. > I am trying to follow the tutorial, but I kept getting error messages > about importing corpus as follows > > === from nltk.corpus import gutenberg > > Traceback (most recent c

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread Steve Holden
John Machin wrote: Steven Bethard wrote: John Machin wrote: Nick Coghlan wrote: [snip] delimeter. Hey, Terry, another varmint over here! No, no. He's talking about a deli-meter. It's the metric standard for measuring subs and sandwiches. ;) Nobody mention the wurst! I did once, but I think I go

Re: word to digit module

2004-12-21 Thread Stephen Thorne
On Wed, 22 Dec 2004 10:27:16 +0530, Gurpreet Sachdeva <[EMAIL PROTECTED]> wrote: > Is there any module available that converts word like 'one', 'two', > 'three' to corresponding digits 1, 2, 3?? This seemed like an interesting problem! So I decided to solve it. I started with http://www.python.o

Re: regular expression: perl ==> python

2004-12-21 Thread Steven Bethard
[EMAIL PROTECTED] wrote: 1) In perl: $line = "The food is under the bar in the barn."; if ( $line =~ /foo(.*)bar/ ) { print "got <$1>\n"; } in python, I don't know how I can do this? I don't know Perl very well, but I believe this is more or less the equivalent: >>> import re >>> line = "The food

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > That sound really promising. Is there any chance you could forward me a > copy of the script. I'm still very new to Python and it would help me a > lot. > Thanks again > > Ian This is a simple example I have put together: === SimpleMAPI.py ===

Re: word to digit module

2004-12-21 Thread M.E.Farmer
Gurpreet Sachdeva wrote: > Is there any module available that converts word like 'one', 'two', > 'three' to corresponding digits 1, 2, 3?? > > Thanks and Regards, > GSS Hello, This is not a module but is a way to do it Hope this helps you. # looku

Re: word to digit module

2004-12-21 Thread Binu K S
Oops! That just does the opposite of what you want. I guess you can tinker it a bit to do the reverse conversion unless someone suggests a better module. On Wed, 22 Dec 2004 10:41:46 +0530, Binu K S <[EMAIL PROTECTED]> wrote: > You'll find a script here: > http://www.python.org/pycon/dc2004/papers

regular expression: perl ==> python

2004-12-21 Thread les_ander
Hi, i am so use to perl's regular expression that i find it hard to memorize the functions in python; so i would appreciate if people can tell me some equivalents. 1) In perl: $line = "The food is under the bar in the barn."; if ( $line =~ /foo(.*)bar/ ) { print "got <$1>\n"; } in python, I don't

Re: word to digit module

2004-12-21 Thread Binu K S
You'll find a script here: http://www.python.org/pycon/dc2004/papers/42/ex1-C/ Found it in the miscellany section at http://www.vex.net/parnassus/ (num2eng) On Wed, 22 Dec 2004 10:27:16 +0530, Gurpreet Sachdeva <[EMAIL PROTECTED]> wrote: > Is there any module available that converts word like 'one

word to digit module

2004-12-21 Thread Gurpreet Sachdeva
Is there any module available that converts word like 'one', 'two', 'three' to corresponding digits 1, 2, 3?? Thanks and Regards, GSS -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this a good use for lambda

2004-12-21 Thread Terry Reedy
"Alan G Isaac" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I need a clarification of the argument. > Are the opponents saying that I should not be able to: If you define 'opponent to lambda' as one who thinks such, then sure ;-). > def compose(list_of_functions): return reduce(

Re: Printing

2004-12-21 Thread Craig Ringer
On Wed, 2004-12-22 at 10:58, Jim & Joanne Collins wrote: > I'm not using any widget or any graphics. I've done programs in Basic for > years and they have all been strict data handling. I want to convert some > to Python > as Windows XP doesn't like 16 bit Basic. Ah, I see. I thought you were

Re: BASIC vs Python

2004-12-21 Thread Andrew Dalke
Jan Dries > If you just want to play notes, you could look at MIDI. I've been thinking about how to answer this and came to the conclusion I can't. I was talking about my early experiences in learning to program as a teenager in the early 1980s. I had fun messing around with sound, both to play

Re: How about "pure virtual methods"?

2004-12-21 Thread Mike Meyer
Noam Raphael <[EMAIL PROTECTED]> writes: > The answer is that a subclass is guaranteed to have the same > *interface* as the base class. And that's what matters. This is false. For instance: class A(object): def method(self, a): print a class B(A): def method(self, a, b): print a, b B

win32 process name

2004-12-21 Thread phil
I need to know if a process is running. not just python.exe but python.exe myapp from win32all EnumProcesses gives me the pids, then OpenProcess(pid) gives me a handle. Then what? GetModuleFileNameEX? It requires two handles as args and I can't figure out which one is the handle from OpenProcess a

Re: embedding: forcing an interpreter to end

2004-12-21 Thread pdectm
> Is there any signal handler you can use in your C program? Maybe signling > yourself will get the control back to the C program and then you can kill > the interpreter. Well, the app is multi-threaded, so I do have a big issue getting control back to my C program. I just can not seem to cleanly

Re: How about "pure virtual methods"?

2004-12-21 Thread Jp Calderone
On Wed, 22 Dec 2004 02:27:35 +0200, Noam Raphael <[EMAIL PROTECTED]> wrote: >Jeff Shannon wrote: > > In the context of changing an existing interface, a unit-testing > > scenario would mean that, instead of installing a "pure virtual" method > > on a base class, you'd change the unit-tests to fol

Fw: Printing

2004-12-21 Thread Jim & Joanne Collins
Craig, Thank you very much for your response. I've interspersed my questions in your reply. If you have answers to my question I would be extremely gratefull for your assistance! Thanks. Jim Collins - Original Message - > From: "Craig Ringer" <[EMAIL PROTECTED]> > To: "Jim

RE: error problems for import some copora with nltk

2004-12-21 Thread Tony Meyer
> I am trying to follow the tutorial, but I kept getting error messages > about importing corpus as follows > > === > >>> from nltk.corpus import gutenberg > > Traceback (most recent call last): > File "", line 1, in -toplevel- > from nltk.corpus im

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Ed Leafe
On Dec 21, 2004, at 7:42 PM, Bulba! wrote: This advice of yours (thanks) may have "slashdotted" your site by flood of requests from Python programmers all looking at your website. ;-) "Proxy Error The proxy server received an invalid response from an upstream server. The proxy server could not hand

Re: Tabnanny really useful?

2004-12-21 Thread Mike Meyer
"Yet Another Mike" <[EMAIL PROTECTED]> writes: > I'm told Tabnanny was inspired by lint, the Unix utiltity to check C sources > (and probably others). Lint was primarily useful in days long ago when CPUs > were slow and a compile used a significant amount of resources. In a > multiuser environ

Re: expression form of one-to-many dict?

2004-12-21 Thread Mike Meyer
[EMAIL PROTECTED] (Alex Martelli) writes: > Mike Meyer <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] (Bengt Richter) writes: >> >> > On Sun, 19 Dec 2004 21:29:27 +0100, "Fredrik Lundh" > <[EMAIL PROTECTED]> wrote: >> > (or maybe a restricted unquote_arg function for better safety). >> > E.g.,

Re: BASIC vs Python

2004-12-21 Thread Mike Meyer
Leif K-Brooks <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> They do have a first-class function-like object called an agent. But >> to use a standard method as an agent, you have to wrap it. > > Just curious, but how does a method get wrapped in an agent if methods > aren't first-class object

error problems for import some copora with nltk

2004-12-21 Thread [EMAIL PROTECTED]
I did install the python 2.4 and nltk. I am trying to follow the tutorial, but I kept getting error messages about importing corpus as follows === >>> from nltk.corpus import gutenberg Traceback (most recent call last): File "", line 1, in -toplevel

Re: input record sepArator (not sepErator)

2004-12-21 Thread Terry Reedy
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: > >> My gripe for the day, just to let non-native writers know what not to >> imitate. > > are there any non-native languages where separate are spelled seperate? If you are asking whether there is

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Terry Reedy
"Luis M. Gonzalez" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Terry Reedy wrote: In response to a claim (I presume by LG and snipped by LG) that Boo is as related to Python as PyPy or Stackless, I wrote. >> but I think this is silly. The 'this' that I referred to as silly

Re: how to start a new process while the other ist running on

2004-12-21 Thread Jean Brouwers
See the os. spawn* functions. For example os.spawnv(os.P_NOWAIT, /path/to/script, args) /Jean Brouwers In article <[EMAIL PROTECTED]>, Erik Geiger <[EMAIL PROTECTED]> wrote: > Hi, > > sorry, my english ist not that got but I'll try. > > I have a running python script (capisuit incoming

Re: how to start a new process while the other ist running on

2004-12-21 Thread Harlin Seritt
Quickie: os.system("/path/to/script.sh &") More elegant, have a look at threads Harlin Seritt Erik Geiger wrote: > Hi, > > sorry, my english ist not that got but I'll try. > > I have a running python script (capisuit incoming.py). This script shall > start a linux shell script.

Re: How about "pure virtual methods"?

2004-12-21 Thread Noam Raphael
Scott David Daniels wrote: class Abstract(object): '''A class to stick anywhere in an inheritance chain''' __metaclass__ = MustImplement def notimplemented(method): '''A decorator for those who prefer the parameters declared.''' return NotImplemented I just wanted to say that I thou

Re: sql server support from linux

2004-12-21 Thread Simon Wittber
> If you can get the DB-API wrappers running on Win2k, how about doing that > locally and then > writing a quickie socket server which your linux client can connect to? That is, essentially, exactly what I have done. I've exposed the DB API using Pyro. I had to turn multithreading off, as the se

RE: sql server support from linux

2004-12-21 Thread Robert Brewer
Simon Wittber wrote: > I am currently tasked with connecting Python CGI programs, under > Apache2 / Linux, to SQL Server on Windows 2000. > ... > Does anyone in this list ever connect to SQL Server from Linux, using > Python? If so, what is your solution? If you can get the DB-API wrappers running

how to start a new process while the other ist running on

2004-12-21 Thread Erik Geiger
Hi, sorry, my english ist not that got but I'll try. I have a running python script (capisuit incoming.py). This script shall start a linux shell script. If I start this script like os.system(/paht/to shellscipt.sh) the python scipt waits for the exit of the shell script and then goes on with the

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Bulba!
On Tue, 21 Dec 2004 16:20:48 -0500, Ed Leafe <[EMAIL PROTECTED]> wrote: > You might want to check out Dabo, an application framework of which I >am one of the authors. We use wxPython as our UI toolkit, but have >streamlined the programming of the UI. We've also added data binding, >maki

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Aahz
In article <[EMAIL PROTECTED]>, Erik Max Francis <[EMAIL PROTECTED]> wrote: >Doug Holton wrote: >> >> I'm not going to dignify that or the rest of your note with a response. > >Please stop dignifying the whole group, then. Seconded. This is an extremely undignified newsgroup. -- Aahz ([EMAIL PR

Re: How about "pure virtual methods"?

2004-12-21 Thread Noam Raphael
Jeff Shannon wrote: Except that unit tests should be written to the *specification*, not the implementation. In other words, forgetting a complete method would require that you forget to write the method, *and* that you failed to translate the specification into unit tests *for that same method

Re: File locking is impossible in Windows?

2004-12-21 Thread Roger Upole
I get The process cannot access the file because another process has locked a portion of the file. 0 file(s) copied. on both Win2k and WinXP. (Python 2.4, Pywin32 build 203) Are you sure the log.txt you're copying to is actually the right one ? You should at least get a prompt to confir

Re: How about "pure virtual methods"?

2004-12-21 Thread Noam Raphael
My long post gives all the philosophy, but I'll give here the short answers. Mike Meyer wrote: +0 Python doesn't use classes for typing. As Alex Martelli puts it, Python uses protocols. So the client expecting a concrete subclass of your abstract class may get an instantiation of a class that doesn

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread Brian van den Broek
John Machin said unto the world upon 2004-12-21 18:20: Subtle distinction: A metER is a measuring device. A MetRE is a unit of distance. Not everyone agrees . I do, but then I think it ought be spelled 'colour', too. Best, Brian vdB -- http://mail.pyth

Re: How about "pure virtual methods"?

2004-12-21 Thread Jeff Shannon
Noam Raphael wrote: But what about the unit tests? They would have still reported a success - where of course they shouldn't have; my classes, in this stage, didn't do what they were expected to do. This problem might arise even when not changing the interface at all - it's quite easy to write

Re: How about "pure virtual methods"?

2004-12-21 Thread Noam Raphael
Steve Holden wrote: Even if you can do it, how would you then implement a class hierarchy where the ultimate base class had virtual methods, and you wanted to derive from that class another class, to be used as a base class for usable classes, which implemented only a subset of the virtual metho

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread Jeff Shannon
John Machin wrote: Subtle distinction: A metER is a measuring device. A MetRE is a unit of distance. ... except in the US, where we stubbornly apply the same spelling to both of those. (It figures that we Americans just ignore subtle distinctions) Jeff Shannon Technician/Programmer Credi

Re: How about "pure virtual methods"?

2004-12-21 Thread Noam Raphael
Thank you all, especially Alex for your enlightening discussion, and Scott for your implementation. I'm sorry that I can't be involved in a daily manner - but I did read all of the posts in this thread. They helped me understand the situation better, and convinced me that indeed this feature is

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Reinhold Birkenfeld wrote: Non sequitur. The phrase's interpretation depends on the posting(s) it refers to. Exactly. He was saying boo (and/or I) am offensive, but logo is not. And then he apologized for misleading me to believe he was censuring me instead of flaming me. -- http://mail.python.o

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: > The discussion with Logo and other languages in it was off-topic too, > but it wasn't offensive to anyone. I'm not going to dignify that or the rest of your note with a response. No, by all means, let's ignore any pieces of a post that might lead to constructive discussion.

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
That sound really promising. Is there any chance you could forward me a copy of the script. I'm still very new to Python and it would help me a lot. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Hans Nowak wrote: Quote: "this is comp.lang.python, not comp.lang.boo." Which is obviously not the same as "Boo should not be mentioned on this newsgroup". I used the exact same phrase in another note except using the term "logo" instead of "boo", and that is the exact inter

Re: BASIC vs Python

2004-12-21 Thread Alan Gauld
On Tue, 21 Dec 2004 16:26:57 GMT, Scott Robinson <[EMAIL PROTECTED]> wrote: Speaking of Forth... > was making the point it would be good for general purpose. I suspect > that it would quickly run up against memory limitations and would go > no faster than the machine driving the memory market (wit

Re: BASIC vs Python

2004-12-21 Thread Mike Meyer
Doug Holton <[EMAIL PROTECTED]> writes: > This is comp.lang.python, not comp.lang.logo. Please refrain from > discussing topics not related to CPython. Doug, please quit trolling this newsgroup. http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consult

Installing new version, erasing previous versions of Python

2004-12-21 Thread David Smith
I currently have Python 2.2 and 2.3.4 installed. I want to install Python 2.4, and erase 2.3.4, but retain 2.2, for I need it for my connectivity program. According to the the documentation: If you have a previous installation of Python that you don't want to replace yet, use make altin

Re: Installing new version, erasing previous versions of Python

2004-12-21 Thread Fredrik Lundh
David Smith wrote: > If I understand the above correctly, 1) "make install" and "make altinstall" > use > the same process, the only difference being the man page update, and the hard > link correct. > 2) that previous versions of python are not deleted. Therefore I should be > able > to inst

When was extended call syntax introduced?

2004-12-21 Thread Edward K. Ream
Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? Neither googling nor brief checks of the 'What's new in Python

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread John Machin
Steven Bethard wrote: > John Machin wrote: > > Nick Coghlan wrote: > > [snip] > > > >>delimeter. > > > > Hey, Terry, another varmint over here! > > No, no. He's talking about a deli-meter. It's the metric standard for > measuring subs and sandwiches. ;) > Nobody mention the wurst! I did once, b

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Paul Rubin
Dave Cook <[EMAIL PROTECTED]> writes: > Web browser "widgets" seem pretty limited to me, though. You might not care. > You don't even have something as simple as a combo box (i.e. an > editable entry with a drop down), Just put an input field and a dropdown on the page. > let alone the rich se

Re: A rational proposal

2004-12-21 Thread Mike Meyer
Nick Coghlan <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> I'm willing to do the work to get >> decimals working properly with it. > > Facundo's post reminded me of some of the discussion about the > interaction between floats and Decimal that went on when he was > developing the module that

Re: How do I cut parts from a text file

2004-12-21 Thread Fredrik Lundh
"Rigga" <[EMAIL PROTECTED]> wrote: > I am new to Python and need to parse a text file and cut parts out i.e. say > the text file contained 5 rows of text: > > line 1 of the text file > line 2 of the text file > line 3 of the text file > line 4 of the text file > line 5 of the text file > > And the

Re: When was extended call syntax introduced?

2004-12-21 Thread Fredrik Lundh
Edward K. Ream wrote: > Various documentation pages, e.g. > http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html > state that the apply function has been deprecated since 2.3. > > Can anyone tell me when extended call syntax was actually introduced? Neither > googling nor brief

Re: When was extended call syntax introduced?

2004-12-21 Thread Jim Sizelove
Edward K. Ream wrote: Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? Neither googling nor brief checks of the

Re: When was extended call syntax introduced?

2004-12-21 Thread "Martin v. Löwis"
Edward K. Ream wrote: Various documentation pages, e.g. http://www.python.org/doc/2.3.3/lib/non-essential-built-in-funcs.html state that the apply function has been deprecated since 2.3. Can anyone tell me when extended call syntax was actually introduced? That was in Python 2.0, see http://www.py

Re: convert \uXXXX to native character set?

2004-12-21 Thread Bengt Richter
On Mon, 20 Dec 2004 12:49:39 +0200, Miki Tebeka <[EMAIL PROTECTED]> wrote: >Hello Joe, > >> Is there any library to convert HTML page with \u encoded text to >>native character set, e.g. BIG5. >Try: help("".decode) > But the OP wants to en-code, I think. E.g. (I don't know what Chinese

Re: memory leak

2004-12-21 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Daniel Wheeler <[EMAIL PROTECTED]> writes I'm on a linux platform and looking in proc/pid/status. Using top shows the same problem. OK, If you were on Windows I could give you some detailed advice - but for Linux, better that somebody else does it. Linux is not my

Re: input record sepArator (not sepErator)

2004-12-21 Thread Reinhold Birkenfeld
Reinhold Birkenfeld wrote: > Peter Otten wrote: >> Reinhold Birkenfeld wrote: >> the web: 4% python: 9% slashdot: 26% perl: 29% * >>> >>> How did you get these data points? >> >> I copied the numbers from these pages: >> >> http://www.google.com/search?q=separate >> http://g

Re: File locking is impossible in Windows?

2004-12-21 Thread Fredrik Lundh
Pekka Niiranen wrote: > Is there a way around this? How can I stop file being COPIED OVER while > it is being open? you could rename the file before you start updating it, and rename it back when done. -- http://mail.python.org/mailman/listinfo/python-list

How do I cut parts from a text file

2004-12-21 Thread Rigga
Hi, I am new to Python and need to parse a text file and cut parts out i.e. say the text file contained 5 rows of text: line 1 of the text file line 2 of the text file line 3 of the text file line 4 of the text file line 5 of the text file And the text I want starts at line 2 and goes through to

Re: input record sepArator (not sepErator)

2004-12-21 Thread Peter Otten
Reinhold Birkenfeld wrote: >> the web: 4% >> python: 9% >> slashdot: 26% >> perl: 29% * > > How did you get these data points? I copied the numbers from these pages: http://www.google.com/search?q=separate http://groups-beta.google.com/group/comp.lang.python/search?group=comp.lang.python&q=sepa

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Erik Max Francis
Doug Holton wrote: I'm not going to dignify that or the rest of your note with a response. Please stop dignifying the whole group, then. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis There was one thing I didn't

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Reinhold Birkenfeld
Doug Holton wrote: > Hans Nowak wrote: >>> Quote: >>> "this is comp.lang.python, not comp.lang.boo." >> >> >> Which is obviously not the same as "Boo should not be mentioned on this >> newsgroup". > > I used the exact same phrase in another note except using the term > "logo" instead of "boo

Re: input record sepArator (not sepErator)

2004-12-21 Thread Reinhold Birkenfeld
Peter Otten wrote: > Reinhold Birkenfeld wrote: > >>> the web: 4% >>> python: 9% >>> slashdot: 26% >>> perl: 29% * >> >> How did you get these data points? > > I copied the numbers from these pages: > > http://www.google.com/search?q=separate > http://groups-beta.google.com/group/comp.lang.pyth

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: Quote: "this is comp.lang.python, not comp.lang.boo." Which is obviously not the same as "Boo should not be mentioned on this newsgroup". I used the exact same phrase in another note except using the term "logo" instead of "boo", and that is the exact interpretation I immedi

how to force HTTP 1.1 when using urllib2?

2004-12-21 Thread jacob c.
When I request a URL using urllib2, it appears that urllib2 always makes the request using HTTP 1.0, and not HTTP 1.1. I'm trying to use the "If-None-Match"/"ETag" HTTP headers to conserve bandwidth, but if I'm not mistaken, these are HTTP 1.1 headers, so I can't reasonably expect a web server to

File locking is impossible in Windows?

2004-12-21 Thread Pekka Niiranen
Hi, I have used the following example from win32 extensions: -SCRIPT STARTS import win32file import win32con import win32security import pywintypes class Flock: def __init__(self,file): self.file=file secur_att = win32security.SECURITY_ATTRIBUTES()

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Jarek Zgoda
Bulba! wrote: - QT seems to be industrial-strength, but.. it's probably more complex/difficult to use. - wxPython/PythonCard is probably simple to use, but.. are there not some pitfalls that development will fall into once the app starts growing (they all do)? From my point of view, PyQt is easie

Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert a sequence of statements like: while 1: blah1 if cond1: break blah2 if cond2: continue blah3 to:

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Hans Nowak wrote: You said that boo should not be mentioned on this newsgroup. Please point me to the post where I said that. Since everything is stored in Google Groups, it should be easy for you to come up with an URL... if such a post existed. Quote: "this is comp.lang.

Re: break/continue - newbe

2004-12-21 Thread John Machin
Ann wrote: > I have trouble sometimes figuring out where > break and continue go to. Is there some easy > way to figure it out, or a tool? > TIA > Ann You need a tool called py2ftn. It would convert statements like "if a > b: break" to e.g. "IF(A.GT.B)GOTO12345". A longer example; this: while 1

[ANN] rpncalc-1.1 RPN Calculator For Python

2004-12-21 Thread Raymond L. Buvel
The rpncalc package adds an interactive Reverse Polish Notation (RPN) interpreter to Python. This interpreter allows the use of Python as an RPN calculator. You can easily switch between the RPN interpreter and the standard Python interpreter. Home page: http://calcrpnpy.sourceforge.net/ Changes

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: You said that boo should not be mentioned on this newsgroup. Please point me to the post where I said that. Since everything is stored in Google Groups, it should be easy for you to come up with an URL... if such a post existed. Quote: "this is comp.lang.python, not comp.lan

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Ed Leafe
On Dec 20, 2004, at 7:25 AM, Bulba! wrote: The long lists of invoices, subcontractors and tasks (possibly hundreds or thousands) will have to be displayed - which toolkit is better for that in your experience? I would appreciate anybody sharing their experiences with relevant toolkits in developmen

Re: temp file name

2004-12-21 Thread Artur M. Piwko
In the darkest hour on Fri, 17 Dec 2004 17:21:53 +0530, km <[EMAIL PROTECTED]> screamed: > Is there a way to create a unique file name; safely > i have used os.tmpnam() with python2.4, i warns that the usage is a potential > security risk. > Security risk comes from posix tmpnam itself. >From t

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread Lenard Lindstrom
Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > > Hi Fredrik, > > Thank you for the suggestion. > > I tried different from/to settings and guess what? The mail came > > thru. > > The script is now.. > > import win32com.client > > s = win32com.client.Dispatch('CDO.Message')

Re: memory leak

2004-12-21 Thread Jean Brouwers
Since you are on Linux, one thing which could be helpful is to lower the virtual memory limit. Before running your program, use the Csh limit command to set the upper limit for vmemory. If there is a leak in your program or in any of the extensions, it will run out of memory earlier. But settin

Re: input record sepArator (equivalent of "$|" of perl)

2004-12-21 Thread Steven Bethard
John Machin wrote: Nick Coghlan wrote: [snip] delimeter. Hey, Terry, another varmint over here! No, no. He's talking about a deli-meter. It's the metric standard for measuring subs and sandwiches. ;) Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Boo who? (was Re: newbie question)

2004-12-21 Thread Jarek Zgoda
Fredrik Lundh wrote: (and by the way, comp.lang.python isn't "the community". most python pro- grammers are elsewhere, and will only read what we post when googling for the answer to some specific problem...) They are busy writing programs in Python, some of them even do it for the money, 9 AM -

Re: Writev

2004-12-21 Thread Adam DePrince
On Sun, 2004-12-19 at 23:43, Jp Calderone wrote: > On Sun, 19 Dec 2004 23:12:27 -0500, Adam DePrince <[EMAIL PROTECTED]> wrote: > > [snip] > > > > Of course, to take advantage of this requires that writev be exposed. I > > have an implementation of writev. This implementation is reasonably > > s

Re: Lazy argument evaluation (was Re: expression form of one-to-many dict?)

2004-12-21 Thread Steven Bethard
Nick Coghlan wrote: def lazy(x, *args, **kwds): """Executes x(*args, **kwds) when called""" if args or kwds: return lambda : x(*args, **kwds) else: return x # No arguments, so x must be callable by itself [snip] Huh. I think I like the idea of lazy() much better than I like the curre

Re: [Mingw-users] Problem with msvcrt60 vs. msvcr71 vs. strdup/free

2004-12-21 Thread Danny Smith
From: "Gerhard Haering" >Is there any way I can force mingw to not link in msvcr for things >like strdup? mdkdir /mingw/lib/msvcr71 cp -f libmsvcr71.a /mingw/lib/msvcr71/libmsvcrt.a gcc ${OBJECTS} -L /mingw/lib/msvcr71 Or you could hand edit gcc's specs file, replacing -lmsvcrt with -lwhatever..

Re: break/continue - newbe

2004-12-21 Thread Fredrik Lundh
"Ann" <[EMAIL PROTECTED]> wrote: > Thanks Jeff, that solves my problem. BTW: is there an easy way to > break/continue out more than one level? not really; to continue more than one level, you have to break out of the inner loop, and make sure the logic in that loop body brings you back to the top

Re: A reception desk in a sort of office building

2004-12-21 Thread Fredrik Lundh
/.../ Hans: [Boo] may *look* like Python, but its inner workings are nothing like Python /.../ Pointing out the difference is not trolling. Doug: Hans Nowak and others were the ones unsuccessfully trying to control what people could talk about here. Hans: I never said that. Doug: You s

Re: break/continue - newbe

2004-12-21 Thread Ann
"Jeff Shannon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ann wrote: > > >I have trouble sometimes figuring out where > >break and continue go to. Is there some easy > >way to figure it out, or a tool? > > > > > > Break and continue always operate on the most-nested loop that's

Re: break/continue - newbe

2004-12-21 Thread Jeff Shannon
Ann wrote: I have trouble sometimes figuring out where break and continue go to. Is there some easy way to figure it out, or a tool? Break and continue always operate on the most-nested loop that's currently executing. To show an example, let's add some line numbers to some code... 1) while

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Hans Nowak
Doug Holton wrote: Hans Nowak wrote: Now you're trying to make it seem like I am against free speech on this list, and against people's rights to discuss whatever they want. I never said that, and I in fact enjoy the fact that c.l.py posters are an eclectic bunch who have knowledge of, and like

Re: Best GUI for small-scale accounting app?

2004-12-21 Thread Dave Cook
On 2004-12-20, Paul Rubin wrote: > I think I can put together a useable (but not visually stunning) web > interface faster than I can put together any pure client-side > interface. Web browser "widgets" seem pretty limited to me, though. You don't even have something as simple as a combo box

Re: What is on-topic for the python list [was "Re: BASIC vs Python"]

2004-12-21 Thread Doug Holton
Hans Nowak wrote: Now you're trying to make it seem like I am against free speech on this list, and against people's rights to discuss whatever they want. I never said that, and I in fact enjoy the fact that c.l.py posters are an eclectic bunch who have knowledge of, and like to talk about, a g

[ANNOUNCE] Twentieth release of PythonCAD now available

2004-12-21 Thread Art Haas
Hi. I'm pleased to announce the twentieth development release of PythonCAD, a CAD package for open-source software users. As the name implies, PythonCAD is written entirely in Python. The goal of this project is to create a fully scriptable drafting program that will match and eventually exceed fe

Re: extending python with a C-written dll

2004-12-21 Thread Scott David Daniels
Jean-Baptiste PERIN wrote: I can already conclude that either I don't know how to use lcc or it doesn't suit my needs .. I plan to first test the cygwin's gcc compiler before goign to MinGW32 MinGW32 is "Minimalist Gnu for Windows -- 32-bit," and _works_ at being ABI compatible with Microsoft's ABI

  1   2   3   >