Re: word to digit module

2004-12-22 Thread Fredrik Lundh
Stephen Thorne 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. > for i in range(4): that's a slightly unusual definition of "digit", but it's a ni

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
Hi Lenard, Absolutely fantastic!! That worked like a charm. Now onto adapting it to send attachments. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: lies about OOP

2004-12-22 Thread Steve Holden
Fredrik Lundh wrote: 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 N

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-21, Jeff Shannon schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >>Op 2004-12-21, Nick Coghlan schreef <[EMAIL PROTECTED]>: >> >> >>>Antoon Pardon wrote: >>> >>> Why then doesn't python think the same about sorted lists. When I have a sorted list and do operations on

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-21, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Jeff Shannon wrote: > >> So show us a dictionary (i.e. hash table) implementation that can do this. >> You'll need to be able >> to derive the old hash from the new hash, of course, so that you can >> correctly associate the >> values

Re: Why are tuples immutable?

2004-12-22 Thread Fredrik Lundh
Antoon Pardon wrote: >> and to temporarily refer back to the top of this thread, do all this without >> any performance impact, compared to the current implementation. >> > Why should that be? This originated when someone argued that lists could > easily be resorted and reheapified. from the orig

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-21, Jeff Shannon schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >>Op 2004-12-17, Jeff Shannon schreef <[EMAIL PROTECTED]>: >> >> >>>Now, even if hash were made to equal id... suppose I then pass that dict >>>to a function, and I want to get the value that I've stored under >>>

Re: Why are tuples immutable?

2004-12-22 Thread Bengt Richter
On 21 Dec 2004 10:37:20 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: >Op 2004-12-18, Bengt Richter schreef <[EMAIL PROTECTED]>: >>> >>>As it turns out, python makes no difference in difficulty for making >>>either mutable or immutable objects usable as dictionary keys. The >>>only difference is t

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-22, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >>> and to temporarily refer back to the top of this thread, do all this without >>> any performance impact, compared to the current implementation. >>> >> Why should that be? This originated when someone argued that

Re: regular expression: perl ==> python

2004-12-22 Thread JZ
Dnia 21 Dec 2004 21:12:09 -0800, [EMAIL PROTECTED] napisał(a): > 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? > How does one capture the $1? (I know it is \1 but it is still no

Re: win32 process name

2004-12-22 Thread Andrey Ivanov
[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 won't do the right thing for you. As far as I know, G

Re: regular expression: perl ==> python

2004-12-22 Thread Fredrik Lundh
"JZ" <[EMAIL PROTECTED]> wrote: > import re > line = "The food is under the bar in the barn." > if re.search(r'foo(.*)bar',line): > print 'got %s\n' % _.group(1) Traceback (most recent call last): File "jz.py", line 4, in ? print 'got %s\n' % _.group(1) NameError: name '_' is not defined

Re: Why are tuples immutable?

2004-12-22 Thread Fredrik Lundh
Antoon Pardon wrote: > But this was another subthread. oh, sorry, I was under the flawed assumption that the first few posts to a thread should be seen in the context of the original post. I guess I'm a bit too old-fashioned for these new-fangled "let's change the subject for each new post witho

How to find unused methods

2004-12-22 Thread Martin Drautzburg
Is there an elegant way for finding unsent methods as in Smalltalk ? I am aware of the fact that due to pythons dynamic typing, no tool in the world can find ALL unsent methods (same in Smalltalk). But finding the most obvious ones would already be of some help. -- http://mail.python.org/mailman

Garbage collector strategy

2004-12-22 Thread Martin Drautzburg
Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? In the latter case it would not garbage collect circular references, right ? For mark-and-sweep, I assume there must be a toplevel Object from which all other objects can be accessed or they will b

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

2004-12-22 Thread Erik Geiger
Fredrik Lundh schrieb: > Erik Geiger wrote: > [...] >> How to start a shell script without waiting for the exit of that shell >> script? It shall start the shell script and immediately execute the next >> python command. > > if you have Python 2.4, you can use the subprocess module: > > htt

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

2004-12-22 Thread Erik Geiger
Jean Brouwers schrieb: > > > See the os. spawn* functions. For example > > os.spawnv(os.P_NOWAIT, /path/to/script, args) > > /Jean Brouwers > > Thats what I've tried, but failed. Thanks anyway ;-) Greets Erik [...] -- Jemanden wie ein rohes Ei zu behandeln kann auch bedeuten, ihn in

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

2004-12-22 Thread Erik Geiger
Thanks, thats what I use now :) Harlin Seritt schrieb: > 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 py

['ext.IsDOMString', 'ext.SplitQName']

2004-12-22 Thread Jindal, Pankaj
Hi, I am new to Python-XML programming. I am using python 2.3.4, py2exe 0.5.3, pyXML 0.8.4. While making executable by py2exe I am getting folowing warning:- The following modules appear to be missing ['ext.IsDOMString', 'ext.SplitQName'] Even after trying the option:- setup.py py2exe --includes x

Re: embedding: forcing an interpreter to end

2004-12-22 Thread Miki Tebeka
Hello pdectm, > > You have a Python port to uClinux? > > Nope, not yet. That would have been my next post :-) I thought there > would have been much more work on cross-compiling and porting Python. The problem is with Python's build proces, it 1'st created pgen and then use it for the next stag

Python for Series 60 update

2004-12-22 Thread Ville Vainio
Python for S60 seems to be available for the grand public as of today. Check out http://www.forum.nokia.com/main/0,,034-821,00.html Yes, this is good news :-). -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list

Re: Garbage collector strategy

2004-12-22 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Martin Drautzburg <[EMAIL PROTECTED]> writes Just for curiosity: does python use a mark-and-sweep garbage collector or simple reference counting? In the latter case it would not garbage collect circular references, right ? gcmodule.c in the python sources shows the

Re: Garbage collector strategy

2004-12-22 Thread Fredrik Lundh
Martin Drautzburg wrote: > Just for curiosity: does python use a mark-and-sweep garbage collector > or simple reference counting? python the language doesn't specify this, but I assume you meant the CPython interpreter. both, sort of: it uses reference counting, and a separate "cycle breaking"

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-22, Bengt Richter schreef <[EMAIL PROTECTED]>: > On 21 Dec 2004 10:37:20 GMT, Antoon Pardon <[EMAIL PROTECTED]> wrote: > >>Op 2004-12-18, Bengt Richter schreef <[EMAIL PROTECTED]>: As it turns out, python makes no difference in difficulty for making either mutable or immutab

Re: Why are tuples immutable?

2004-12-22 Thread Antoon Pardon
Op 2004-12-22, Fredrik Lundh schreef <[EMAIL PROTECTED]>: > Antoon Pardon wrote: > >> But this was another subthread. > > oh, sorry, I was under the flawed assumption that the first few posts to a > thread should be seen in the context of the original post. So? In the mean time there have been mor

Threading Problem

2004-12-22 Thread Norbert
Hello *, i am experimenting with threads and get puzzling results. Consider the following example: # import threading, time def threadfunction(): print "threadfunction: entered" x = 10 while x < 40: time.sleep(1) # time unit is seconds print "threadf

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
Hi Lenard, Absolutely fantastic!! That worked like a charm. Now onto adapting it to send attachments. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: xmlrpclib question

2004-12-22 Thread writeson
Thanks for the responses, you were both on the right track, I just didn't provide enough of the right information. I solved the problem by changing "localhost" in the server code to actually contain the name of the machine, the same as it appears in our DNS. This enabled the client to connect to th

Re: Threading Problem

2004-12-22 Thread Steve Holden
Norbert wrote: Hello *, i am experimenting with threads and get puzzling results. Consider the following example: # import threading, time def threadfunction(): .print "threadfunction: entered" .x = 10 .while x < 40: .time.sleep(1) # time unit is seconds

Re: word to digit module

2004-12-22 Thread John Machin
Stephen Thorne wrote: > 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. > >

Mutable objects which define __hash__ (was Re: Why are tuples immutable?)

2004-12-22 Thread Nick Coghlan
OK, I think I need to recap a bit before starting my reply (for my own benefit, even if nobody else's). (The rest of this post will also include a fair bit of repeating things that have already been said elsewhere in the thread) The actual rule dictionaries use when deciding whether or not

Re: Threading Problem

2004-12-22 Thread Alan Kennedy
[Norbert] > i am experimenting with threads and get puzzling results. > Consider the following example: > # > import threading, time > > def threadfunction(): > print "threadfunction: entered" > x = 10 > while x < 40: > time.sleep(1) # time unit is seconds >

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

2004-12-22 Thread Nick Coghlan
Nick Coghlan wrote: def lazycall(x, *args, **kwds): """Executes x(*args, **kwds)() when called""" return lambda : x(*args, **kwds)() It occurred to me that this should be: def lazycall(x, *args, **kwds): """Executes x()(*args, **kwds) when called""" return lambda : x()(*args, **kwds) (Not

Re: Threading Problem

2004-12-22 Thread Norbert
Thanks a lot, Steve, for your fast reply. But the behaviour is the same if 'threadfunction' sleeps longer than just 1 second. 'threadfunction' is of course a dummy to show the problem, imagine a longrunning background-task. If you are right, the question remains 'How can I assure that the starting

Re: When was extended call syntax introduced?

2004-12-22 Thread Edward K. Ream
> > That was in Python 2.0, see Thanks very much, Martin. -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading Problem

2004-12-22 Thread Norbert
Thanks Alan, i hoped it would be something trivial :) Norbert -- http://mail.python.org/mailman/listinfo/python-list

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

2004-12-22 Thread Nick Coghlan
Steven Bethard wrote: There must be something wrong with this idea that I'm missing. . . Well, it does cost you some conciceness, as your examples show[1]: lazy(mul, x, y) v.s. :x * y lazy(itemgetter(i), x) v.s. :x[i] lazy(attrgetter("a"), x)v.s.

Re: Mutable objects which define __hash__ (was Re: Why are tuplesimmutable?)

2004-12-22 Thread Fredrik Lundh
Nick Coghlan wrote: > I have a different suggestion: an identity dictionary. > > It ignores __hash__, __cmp__ and __eq__, and instead uses id() and is. that's a rather common pattern, and you don't really need a special type to handle it: just replace d[k] with d[id(k)]. if you really need to st

Re: how to pass globals across modules (wxPython)

2004-12-22 Thread Jorge Luiz Godoy Filho
Fredrik Lundh, TerÃa 21 Dezembro 2004 16:33, wrote: > well, in my applications, subsystems usually consists of one or more > classes, or at least > one or more functions. code that needs the global context usually gets > the content either as a constructor argument, or as an argument to > individ

Re: Threading Problem

2004-12-22 Thread Fredrik Lundh
Steve Holden wrote: > Well, I don't believe there's any guarantee that a thread will get run > preference over its > starter - they're both threads, after all. Try putting a sleep after > th.start() and before the > print statement and you should see that the "worker" thread runs while the >

Re: A rational proposal

2004-12-22 Thread Nick Coghlan
Mike Meyer wrote: Well, you want to be able to add floats to rationals. The results shouldn't be rational, for much the same reason as you don't want to convert floats to rationals directly. I figure the only choice that leaves is that the result be a float. That and float(rational) should be the o

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

2004-12-22 Thread Nick Coghlan
John Machin wrote: Nick Coghlan wrote: [snip] delimeter. Hey, Terry, another varmint over here! Heh. Just don't get me started on the issues I have with typing apostrophes in the right spot. My *brain* knows where they go, but for some reason it refuses to let my fingers in on the secret. . . C

mathmatical expressions evaluation

2004-12-22 Thread Tonino
Hi, I have a task of evaluating a complex series (sorta) of mathematical expressions and getting an answer ... I have looked at the numarray (not really suited??) and pythonica (too simple??) and even tried using eval() ... but wondered if there were other packages/modules that would enable me to

Metaclasses

2004-12-22 Thread Bob . Cowdery
Title: Message Hi   I am trying to build a capability based API. That is, an instance of the api will reflect the capabilities of some underlying services. I could have several different instances of the api concurrently running against different back end services. A ui applet will bind to a

Re: Is this a good use for lambda

2004-12-22 Thread Nick Coghlan
Jeff Shannon wrote: Er, not as far as I can tell the 2.4 feature was what wouldn't work consistently; the corrected version, using list() and reverse(), doesn't look like it has anything that'll be a problem in my 2.2 installation, and probably not in 2.1 What he said :) Although if yo

Re: How to find unused methods

2004-12-22 Thread TZOTZIOY
On 22 Dec 2004 10:27:58 +0100, rumours say that Martin Drautzburg <[EMAIL PROTECTED]> might have written: >Is there an elegant way for finding unsent methods as in Smalltalk ? > >I am aware of the fact that due to pythons dynamic typing, no tool in >the world can find ALL unsent methods (same in

Re: Best GUI for small-scale accounting app?

2004-12-22 Thread kdahlhaus
> ZOPE could provide the workaround but ZOPE seems really huge to > me and an overkill for this. Or maybe it would work? I am intenionally *not* trying to argue web vs traditional gui for your app, but to tuck away for future apps, CherryPy2 is a lot easier than Zope to use and programming it does

Kamaelia Released

2004-12-22 Thread Michael Sparks
Hi, I've already posted an announcement in comp.lang.python.announce about this, but for those who were at Europython and remember me giving a lightning talk on Kamaelia who don't read c.l.p.a - this is just a quick note to say that we've been given the go ahead to release it as open source and t

Re: mathmatical expressions evaluation

2004-12-22 Thread beliavsky
There is QuantLib at http://quantlib.org/ . The site says "QuantLib is written in C++ with a clean object model, and is then exported to different languages such as Python, Ruby, and Scheme." I have not tried it -- if it is easily usable from Python please write back to c.l.p. There is a Python Fi

Newbie namespace question

2004-12-22 Thread [EMAIL PROTECTED]
I have a variable that I want to make global across all modules, i.e. I want it added to the builtin namespace. Is there a way to do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie namespace question

2004-12-22 Thread deelan
[EMAIL PROTECTED] wrote: I have a variable that I want to make global across all modules, i.e. I want it added to the builtin namespace. Is there a way to do this? i would not pollute built-ins namespace. how about: ### a.py FOO = "I'm a global foo!" ### b.py import a print a.FOO HTH, deelan -- @p

Re: Newbie namespace question

2004-12-22 Thread Steve Holden
[EMAIL PROTECTED] wrote: I have a variable that I want to make global across all modules, i.e. I want it added to the builtin namespace. Is there a way to do this? Of course: you can do *anything* in Python. I'm not sure this is to be recommended, but since you ask ... if you have # mymod.py pri

Re: embedding: forcing an interpreter to end

2004-12-22 Thread Peter Hansen
[EMAIL PROTECTED] wrote: 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 stop the interpreter. The best I could do is: void terminateInterpreter( PyInterpreterState *interp ) [...] PyThreadState_SetAsyncExc(interp->tst

Re: mathmatical expressions evaluation

2004-12-22 Thread aaronwmail-usenet
> have a task of evaluating a complex series (sorta) of mathematical > expressions and getting an answer ... If we assume that you are looking for functionality and speed is secondary, please have a look at the technique in http://cvs.sourceforge.net/viewcvs.py/xsdb/xsdbXML/xsdbXMLpy/functions.p

Re: PyCon is coming - we need your help

2004-12-22 Thread jfj
I wish it was in Amsterdam.. ;) Gerald -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression: perl ==> python

2004-12-22 Thread Doug Holton
Fredrik Lundh wrote: "JZ" <[EMAIL PROTECTED]> wrote: import re line = "The food is under the bar in the barn." if re.search(r'foo(.*)bar',line): print 'got %s\n' % _.group(1) Traceback (most recent call last): File "jz.py", line 4, in ? print 'got %s\n' % _.group(1) NameError: name '_' is

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

2004-12-22 Thread Alex Martelli
Mike Meyer <[EMAIL PROTECTED]> wrote: > > As in, say, calling > > x = ternary(c, lambda:t, lambda:f) > > ? The 'lambda:' is a (not nice-looking, but...) "indication of > > non-evaluation"... or am I misundertanding what you're saying? > > No, you're saying it exactly right. And that does, in

Re: Printing

2004-12-22 Thread Peter Hansen
Craig Ringer wrote: I don't have a windows box to test with - well, our NT4 server, but it doesn't have anything on the serial ports. I would think that one just: printerport = open("lpt1","w") but on my NT box that results in a file not found exception. lpt0 opens, but I have no idea if it works.

Re: Newbie namespace question

2004-12-22 Thread [EMAIL PROTECTED]
Here's my situation, I've created some scripts to configure WebSphere and the WAS scripting engine assigns the variable AdminConfig to a Java object. I have created classes that wrap the AdminConfig settings, simplifying the interface for those who want to script their server installs. At the com

Ack! Zombie processes won't die!

2004-12-22 Thread Brian
>From one script, I'm spawnv'ing another that will launch mpg123 to play a specified mp3. Problem is that After the second script has launched mpg123, it'll turn into a zombie process. It doesn't happen when I launch it from the command line, so there's something wrong with the way I'm callin

Re: regular expression: perl ==> python

2004-12-22 Thread JZ
Dnia Wed, 22 Dec 2004 10:27:39 +0100, Fredrik Lundh napisał(a): >> import re >> line = "The food is under the bar in the barn." >> if re.search(r'foo(.*)bar',line): >> print 'got %s\n' % _.group(1) > > Traceback (most recent call last): > File "jz.py", line 4, in ? > print 'got %s\n' % _.

Re: Ack! Zombie processes won't die!

2004-12-22 Thread Jp Calderone
On Wed, 22 Dec 2004 15:37:18 GMT, Brian <[EMAIL PROTECTED]> wrote: >>From one script, I'm spawnv'ing another that will launch mpg123 to play a > specified mp3. Problem is that After the second script has launched > mpg123, it'll turn into a zombie process. It doesn't happen when I launch > i

Peter Hansen [Re: newbie question]

2004-12-22 Thread Doug Holton
Peter Hansen wrote: Luis M. Gonzalez wrote: As far as I could see, everythime the word "boo" is typed, some sort of censorship or plain bashing comes up, and I think this is not fair. I think doing this by defending Doug's postings, however, might weaken the strength of your position just a little.

Re: regular expression: perl ==> python

2004-12-22 Thread Jp Calderone
On Wed, 22 Dec 2004 16:44:46 +0100, JZ <[EMAIL PROTECTED]> wrote: >Dnia Wed, 22 Dec 2004 10:27:39 +0100, Fredrik Lundh napisał(a): > > >> import re > >> line = "The food is under the bar in the barn." > >> if re.search(r'foo(.*)bar',line): > >> print 'got %s\n' % _.group(1) > > > > Traceback (m

Re: regular expression: perl ==> python

2004-12-22 Thread Fredrik Lundh
"JZ" wrote: > >> import re > >> line = "The food is under the bar in the barn." > >> if re.search(r'foo(.*)bar',line): > >> print 'got %s\n' % _.group(1) > > > > Traceback (most recent call last): > > File "jz.py", line 4, in ? > > print 'got %s\n' % _.group(1) > > NameError: name '_' is n

Re: newbie question

2004-12-22 Thread Stephen Waterbury
Luis M. Gonzalez wrote: Amyway, I wouldn't want to use this list to talk about Boo, because I think that the best place to do it is comp.lang.boo. However, since I think it is definetely python related (I know you disagree, but others don't) I see no harm in mentioning it here occasionally. Luis, t

Re: Newbie namespace question

2004-12-22 Thread Brandon
And I just realized that Jython doesn't support the __builtins__ variable... :( -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie namespace question

2004-12-22 Thread Peter Hansen
Steve Holden wrote: then in some other module (and here specifically in the interactive interpreter) you can bind a value to "myname" in __builtins__ and it will be seen by mymod.py when it's imported: >>> __builtins__.myname = "MyValue" Steve's basic premise is correct, but he's chosen the wro

Re: Threading Problem

2004-12-22 Thread Ishwor
On Wed, 22 Dec 2004 12:55:46 +, Alan Kennedy <[EMAIL PROTECTED]> wrote: > [Norbert] > > i am experimenting with threads and get puzzling results. > > Consider the following example: > > # > > import threading, time > > > > def threadfunction(): > > print "threadfunction:

Re: regular expression: perl ==> python

2004-12-22 Thread JZ
Dnia Wed, 22 Dec 2004 16:55:55 +0100, Fredrik Lundh napisał(a): > the "_" symbol has no special meaning when you run a Python program, That's right. So the final code will be: import re line = "The food is under the bar in the barn." found = re.search('foo(.*)bar',line) if found: print 'got %s

Re: Newbie namespace question

2004-12-22 Thread Brandon
Thanks, that worked to get me past the "problem". Did you see my post regarding my issue? I just know that there's a "Python way" to resolve my issue, so if anyone has a better way, I'm really interested. Not only does it feel like a hack, it looks like one too! Even worse! -- http://mail.pyth

Re: mod_python and xml.sax

2004-12-22 Thread Jeffrey Froman
Fredrik Lundh wrote: > iirc, both apache and python uses the expat parser; if you don't make sure > that both use the same expat version, you may get into trouble. Thank you very much Fredrik, this does seem to be the problem I was having. > this > poster claims to have a fix: > > http://www.m

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

2004-12-22 Thread Stephen Waterbury
Erik Max Francis 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. Amen! -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCon is coming - we need your help

2004-12-22 Thread Aahz
In article <[EMAIL PROTECTED]>, jfj <[EMAIL PROTECTED]> wrote: > >I wish it was in Amsterdam.. ;) Feel free to run one there! Then again, there's already EuroPython. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "19. A language that doesn't affect the way you th

Re: newbie question

2004-12-22 Thread Doug Holton
Stephen Waterbury wrote: Luis M. Gonzalez wrote: Amyway, I wouldn't want to use this list to talk about Boo, because I think that the best place to do it is comp.lang.boo. However, since I think it is definetely python related (I know you disagree, but others don't) I see no harm in mentioning it h

Re: File locking is impossible in Windows?

2004-12-22 Thread elbertlev
I just have written the program in "C", which does the same. It behaves almost the way you described. Tthe copy command gives such diagnostic: The process cannot access the file because another process has locked a portion of the file. 0 file(s) copied. BUT THE FILE IS ACTUALLY OVERWRITTEN.. I'

Re: Newbie namespace question

2004-12-22 Thread deelan
[EMAIL PROTECTED] wrote: (...) Run it and get a name error, which, makes sense. If I try to use the standard import solution as deelan suggests I have a circular reference on the imports and I get an error that it can't import class DataSource (presumbably because it hasn't gotten far enough throug

trouble building python2.4

2004-12-22 Thread Matthew Thorley
Greetings, I just downloaded the python2.4 source from python.org and built it the usual way, i.e. ./configure && make. What I don't understand is that the resulting binary, when run, prints this line Python 2.3.4 (#1, Nov 15 2004, 10:29:48) at the top of its banner. Further more, the poplib mo

Re: [Re: newbie question]

2004-12-22 Thread Reinhold Birkenfeld
Doug Holton wrote: > Peter Hansen wrote: >> Luis M. Gonzalez wrote: >> >>> As far as I could see, everythime the word "boo" is typed, some sort of >>> censorship or plain bashing comes up, and I think this is not fair. >> >> I think doing this by defending Doug's postings, however, might weaken >>

logging from severl classes

2004-12-22 Thread flupke
Hi, i'm trying to log to the same file (using logging module) from different classes but i can't seem to get it to work. File 1 is the main file which sets up the logger and then i want to also use the same logger in another class This is what i have file1 = import log

MIDI (was - Re: BASIC vs Python)

2004-12-22 Thread Bob van der Poel
Jan Dries wrote: 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 a

Re: Step by step: Compiling extensions with MS Visual C++ Toolkit 2003 - msvccompiler-patch.txt (0/1)

2004-12-22 Thread wjb131
... > d:\Python24\include\pyconfig.h(30) : fatal error C1083: Cannot open > include file > : 'io.h': No such file or directory > error: command '"D:\Programme\Microsoft Visual C++ Toolkit > 2003\bin\cl.exe"' fai > led with exit status 2 > > why? Under : HKEY_LOCAL_MACHINE\Software\Microsoft\Visual

Re: trouble building python2.4

2004-12-22 Thread Erik Max Francis
Matthew Thorley wrote: Greetings, I just downloaded the python2.4 source from python.org and built it the usual way, i.e. ./configure && make. What I don't understand is that the resulting binary, when run, prints this line Python 2.3.4 (#1, Nov 15 2004, 10:29:48) at the top of its banner. Furt

Re: [Re: newbie question]

2004-12-22 Thread Doug Holton
Reinhold Birkenfeld wrote: Doug Holton wrote: Peter Hansen wrote: As a result of all the activity in the "Boo who?" thread, however, that you started Apart from that it is considered disrespectful to put your "opponent's" name into the subject, this flame war is biting its tail already. So putting

Re: trouble building python2.4

2004-12-22 Thread Matthew Thorley
Erik Max Francis wrote: Matthew Thorley wrote: Greetings, I just downloaded the python2.4 source from python.org and built it the usual way, i.e. ./configure && make. What I don't understand is that the resulting binary, when run, prints this line Python 2.3.4 (#1, Nov 15 2004, 10:29:48) at the

Re: [Re: newbie question]

2004-12-22 Thread Ed Leafe
On Dec 22, 2004, at 11:38 AM, Reinhold Birkenfeld wrote: Apart from that it is considered disrespectful to put your "opponent's" name into the subject, this flame war is biting its tail already. You've missed the obvious: it's 'criticism' or 'observation' when it comes from Doug, but it's a 'flam

Re: newbie question

2004-12-22 Thread Richie Hindle
[Doug] > I'm only halfway through his message. It would take me all day to point > out all [Peter Hansen's] flames. Doug, this is not worth your time. It certainly isn't worth mine, nor that of the other thousands of people who are being subjected to this argument. Please, consider putting yo

Re: Ack! Zombie processes won't die!

2004-12-22 Thread Keith Dart
Brian wrote: From one script, I'm spawnv'ing another that will launch mpg123 to play a specified mp3. Problem is that After the second script has launched mpg123, it'll turn into a zombie process. It doesn't happen when I launch it from the command line, so there's something wrong with the way

Re: [Re: newbie question]

2004-12-22 Thread Steve Holden
Doug Holton wrote: Reinhold Birkenfeld wrote: Doug Holton wrote: Peter Hansen wrote: As a result of all the activity in the "Boo who?" thread, however, that you started Apart from that it is considered disrespectful to put your "opponent's" name into the subject, this flame war is biting its tail

RE: Metaclasses

2004-12-22 Thread Robert Brewer
Bob Cowdery wrote: > I am trying to build a capability based API. That is, > an instance of the api will reflect the capabilities > of some underlying services. I could have several > different instances of the api concurrently running > against different back end services. A ui applet will > bin

Re: [Re: newbie question]

2004-12-22 Thread Doug Holton
Steve Holden wrote: > 'Scuse me? This group has a long history of off-topic posting, and > anyway who decided that CPython should be the exclusive focus? Even > on-topic we can talk about Jython and PyPy as well as CPython. > > Off-topic we can talk about what we damned well please. Even boo :-) Th

Re: trouble building python2.4

2004-12-22 Thread Steve Holden
Matthew Thorley wrote: I have got to be the stupidest person on the face of the planet. I'll have you know I don't welcome newcomers to this newsgroup trying to steal my hard-won reputation, if you don't mind. keeping-it-light-ly y'rs - steve -- Steve Holden http://www.holdenweb.co

Re: win32 process name

2004-12-22 Thread Keith Dart
Fredrik Lundh wrote: "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

RE: Metaclasses

2004-12-22 Thread Bob . Cowdery
Title: RE: Metaclasses Robert Yes you understand exectly what I am trying to do, my test code was not much more than you show. You are right that to do the simple thing of adding attributes I can do that in-line as it were but there may be other customisations that I want to do. I am probabl

extract news article from web

2004-12-22 Thread Zhang Le
Hello, I'm writing a little Tkinter application to retrieve news from various news websites such as http://news.bbc.co.uk/, and display them in a TK listbox. All I want are news title and url information. Since each news site has a different layout, I think I need some template-based techniques to

Re: File locking is impossible in Windows? SOLUTION

2004-12-22 Thread Pekka Niiranen
Hi everybody: I played with the class Flock and changed the line win32con.FILE_SHARE_READ|win32con.FILE_SHARE_WRITE,\ to win32con.FILE_SHARE_READ,\ and now I cannot copy the file over which suits me. When file is NOT locked I get: E:\>copy d:\log.txt . Overwrite .\log.txt? (Yes/No/All): y 1

Re: regular expression: perl ==> python

2004-12-22 Thread Nick Craig-Wood
> 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? > How does one capture the $1? (I know it is \1 but it is still not clear > how I can simply print it. > thanks Fredrik Lundh <[E

Your message to plucker-dev awaits moderator approval

2004-12-22 Thread plucker-dev-admin
Your mail to 'plucker-dev' with the subject Delivery ([EMAIL PROTECTED]) Is being held until the list moderator can review it for approval. The reason it is being held: Post by non-member to a members-only list Either the message will get posted to the list, or you will receive notific

Re: Why are tuples immutable?

2004-12-22 Thread Jeff Shannon
Antoon Pardon wrote: Op 2004-12-21, Jeff Shannon schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: So show us a dictionary (i.e. hash table) implementation that can do this. Why should I, Do you doubt that it is possible? Yes. You'll need to be able to derive the old hash from the

wxPython help

2004-12-22 Thread km
Hi all, i am trying out some of the demo programs in wxPython. but i am getting an error: no module 'run' how do i circumvent this module and run the program with main.Loop() ? tia, KM -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >