RE: Putting asterisks around text

2009-02-11 Thread Barak, Ron
[http://www.emofaces.com/en/emoticons/t/thumbs-up-emoticon.gif] -Original Message- From: D'Arcy J.M. Cain [mailto:da...@druid.net] Sent: Monday, February 09, 2009 20:21 To: todp...@hotmail.com Cc: python-list@python.org Subject: Re: Putting asterisks around text On Mon, 9 Feb 2009 10:09:2

Re: getopt

2009-02-11 Thread John Machin
On Feb 11, 5:46 pm, Matthew Sacks wrote: > I didn't realize that the no-value arguments, -b, -h, etc are required? required sense 1: the 2nd arg of the function is required; if there are to be no short options, the 2nd arg should be an empty string. required sense 2: you are required to specify

Re: Escaping my own chroot...

2009-02-11 Thread Christian Heimes
Dennis Lee Bieber schrieb: > That's the whole purpose of chroot()... As far as the process is > concerned, the chroot() path is now the top of the file system, so there > is no where above it you can get to... Yes, you can get with some hacks. > chroot() is meant for cases where one may be

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Aaron Brady
On Feb 10, 7:58 pm, Steven D'Aprano wrote: > I sometimes write recursive functions like this simple factorial: > > def fact(n): >     if n < 0: raise ValueError >     if n = 0: return 1 >     return fact(n-1)*n > > At the risk of premature optimization, I wonder if there is an idiom for > avoiding

Re: python3 tutorial for newbie

2009-02-11 Thread Ken
"Gabriel Genellina" wrote in message news:mailman.9312.1234332608.3487.python-l...@python.org... > En Tue, 10 Feb 2009 16:22:36 -0200, Gary Wood > escribió: > >> Can someone recommend a good tutorial for Python 3, ideally that has >> tasks or assignments at the end of each chapter. > > I don'

Re: import wx works interactive but not from script

2009-02-11 Thread jefm
ok, sorry for the long wait. I tried this on both my work (XP) and home PC (Vista64) and they are both consistent. I had both Python2.6 and Python 3.0 installed. wxPython didn't like that. As soon as I uninstalled Python3.0, my wxPython started running again. Must be some kind of registry thing.

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Terry Reedy
Steven D'Aprano writes: def fact(n): if n < 0: raise ValueError if n = 0: return 1 return fact(n-1)*n At the risk of premature optimization, I wonder if there is an idiom for avoiding the unnecessary test for n <= 0 in the subsequent recursive calls? Reverse the test order d

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Jervis Whitley
> You've merely replaced the 'test n<0' with 'not check' at the expense > of an additional parameter that has to be passed each time (and the > additional test 'n<0' for the first iteration). > -- > http://mail.python.org/mailman/listinfo/python-list > I think you have missed the point. The OP stat

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Jervis Whitley
> > You've merely replaced the 'test n<0' with 'not check' at the expense > of an additional parameter that has to be passed each time (and the > additional test 'n<0' for the first iteration). > -- > http://mail.python.org/mailman/listinfo/python-list > I think you have missed the point. The OP s

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Travis wrote: On Tue, Feb 10, 2009 at 01:36:21PM -0800, Scott David Daniels wrote: I personally would like it and bz2 to get closer to each other... Well, I like this idea; perhaps this is a good time to discuss the equivalent of some "abstract base classes", or "interfaces", for compress

best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
Hi, I am building some computational web services using soaplib. This creates a WSGI application. However, since some of these services are computationally intensive, and may be long running, I was looking for a way to use multiple processes. I thought about using multiprocessing.Process manually

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread andrew cooke
Terry Reedy wrote: > Reverse the test order > > def fact(n): > if n > 0: return fact(n-1)*n > if n == 0: return 1 > raise ValueError sweet! but is this generally possible? ie: did you think this up for this question or is it an idiom that you find yourself using often? andrew --

Re: ANN: Python 2.6 Quick Reference available

2009-02-11 Thread Thorsten Kampe
* Richard Gruet (Tue, 10 Feb 2009 20:38:24 +0100) > The Python 2.6 Quick Reference is available in HTML and PDF formats at > http://rgruet.free.fr/#QuickRef. THANK YOU! Thorsten -- http://mail.python.org/mailman/listinfo/python-list

urllib2.Request:: http Request sending successfully, but Response contains in valid data.

2009-02-11 Thread nRk
Hi I am trying to send Data to a website through "http" using "urllib.request" library using the bellow code. Response status code contains. 200 (OK) but Response contains nothing... With same data When I test using C# it working fine.. Response having.. some data in xml format. But I am using be

Re: Distributing simple tasks

2009-02-11 Thread Piet van Oostrum
Noam Aigerman wrote: > Hi, > > Suppose I have an array of functions which I execute in threads (each > thread get a slice of the array, iterates over it and executes each > function in it’s slice one after the other). Now I want to distribute > these tasks between two machines, i.e give each machi

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels writes: > Seems like we may want to say things like, "synchronization points are > too be silently ignored." That would completely break some useful possible applications, so should be avoided. -- http://mail.python.org/mailman/listinfo/python-list

Re: generator object or 'send' method?

2009-02-11 Thread greg
Aaron Brady wrote: It would receive the 'send' from a different point in control flow than its usual 'next'. Should it repeat a value if it receives a 'send'? No. This requirement clearly indicates that send() is the wrong tool for the job. I would use a class with a generator as a method, e

Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread c d saunter
I did a double take when debugging an error the other day. My problem was missing out a comma when building a list of strings. Much to my surprise the offending code still executed to cause problems later on: >>> txt = 'this', 'works' >>> print txt ('this', 'works') # As expected >>> txt = 'this

ANN: SuPy for Python 2.5 on Windows

2009-02-11 Thread Greg Ewing
SuPy 1.0 - Windows -- A Windows build for Python 2.5 is now available. http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/ What is SuPy? - SuPy is a plugin for the Sketchup 3D modelling application that lets you script it in Python. This is a first version and is

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread Quentin Gallet-Gilles
*Literal* string concatenation has always been a part of Python : http://docs.python.org/reference/lexical_analysis.html#string-literal-concatenation On Wed, Feb 11, 2009 at 12:06 PM, c d saunter < christopher.saun...@durham.ac.uk> wrote: > I did a double take when debugging an error the other d

Re: python is great

2009-02-11 Thread greg
python is great. No. Python is VERY GREAT !!! All right now, everyone... Every Python's sacred, every Python's great, If any Python's wasted, Guido gets irate! -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread Bruno Desthuilliers
c d saunter a écrit : I did a double take when debugging an error the other day. My problem was missing out a comma when building a list of strings. Much to my surprise the offending code still executed to cause problems later on: txt = 'this', 'works' print txt ('this', 'works') # As expect

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread c d saunter
Bruno Desthuilliers (bruno.42.desthuilli...@websiteburo.invalid) wrote: : c d saunter a écrit : : > I did a double take when debugging an error the other day. My : > problem was missing out a comma when building a list of strings. : > : > Much to my surprise the offending code still executed to c

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin Becker
Robin wrote: Hi, I am building some computational web services using soaplib. This creates a WSGI application. However, since some of these services are computationally intensive, and may be long running, I was looking for a way to use multiple processes. I thought about using multiprocessing.P

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread bearophileHUGS
christopher.saun...@durham.ac.uk (c d saunter): >I assume it is a feature of the compiler.< Yes it's a bug-prone antifeature that's probably a relic from C that doesn't have a concatenation operator among strings as Python does (+). So in Python it saves you to use + at the cost of possible bugs.

Re: cannot install

2009-02-11 Thread Benjamin Kaplan
2009/2/11 administrator > I tried as admin with Python-3.0 in my home directory but no success yet. > Is there another help? > > Macintosh:~ admin$ export > PATH=/opt/local/bin:/opt/local/sbin:/Developer/usr/bin:$PATH > Macintosh:~ admin$ echo $PATH > > /opt/local/bin:/opt/local/sbin:/Developer/u

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 12:10 pm, Robin Becker wrote: > We've used forked fastcgi (flup) with success as that decouples the wsgi > process > (in our case django) from the main server (in our case apache). Our reasons > for > doing that were to allow the backend to use modern pythons without having to > upgra

Re: optparse versus getopt

2009-02-11 Thread Pete Forman
Robert Kern writes: >> is there some way i can force the import based on the the absolute >> path to the module? > > Better would be for you to copy the optparse.py module onto your > Jython's import path. I'm not particularly familiar with the details > of Jython, so you will need to consult

Re: getopt index out of range

2009-02-11 Thread Steve Holden
Matthew Sacks wrote: > Hi List, > I am getting an index out of range error when trying to parse with getopt. > Probably something simple. Any suggestions are appreciated > > optlist, args = getopt.getopt(sys.argv[1:], 'h', ['connectPassword=', > 'adminServerURL=', 'action=', 'targets=', 'appDir=']

Re: Functional schmunctional...

2009-02-11 Thread Steve Holden
Terry Reedy wrote: > r0g wrote: > >> >> def inet2ip(n): >> p = (n/16777216) >> q = ((n-(p*16777216))/65536) >> r = ((n-((p*16777216)+(q*65536)))/256) >> s = ((n-((p*16777216)+(q*65536)+(r*256 >> return str(p)+"."+str(q)+"."+str(r)+"."+str(s) > > Beyond what other wrote: > To future-

Re: getopt index out of range

2009-02-11 Thread MRAB
Steve Holden wrote: Matthew Sacks wrote: Hi List, I am getting an index out of range error when trying to parse with getopt. Probably something simple. Any suggestions are appreciated optlist, args = getopt.getopt(sys.argv[1:], 'h', ['connectPassword=', 'adminServerURL=', 'action=', 'targets=',

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 1:28 pm, Robin wrote: > On Feb 11, 12:10 pm, Robin Becker wrote: > > > We've used forked fastcgi (flup) with success as that decouples the wsgi > > process > > (in our case django) from the main server (in our case apache). Our reasons > > for > > doing that were to allow the backend

Pycon 2009 Hotel?

2009-02-11 Thread jay graves
I'm attending Pycon this year and for the first time I have to pay for myself. (All training/conference budgets have been zeroed out at my company.) I would like to take the cheaper option by staying at the Crowne Plaza but as I understand it, the part of the conference I'll be attending will be

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Diez B. Roggisch
Robin wrote: > On Feb 11, 1:28 pm, Robin wrote: >> On Feb 11, 12:10 pm, Robin Becker wrote: >> >> > We've used forked fastcgi (flup) with success as that decouples the >> > wsgi process (in our case django) from the main server (in our case >> > apache). Our reasons for doing that were to allow

Re: Pycon 2009 Hotel?

2009-02-11 Thread jay graves
On Feb 11, 9:13 am, jay graves wrote: > I'm attending Pycon this year and for the first time I have to pay for > myself.  (All training/conference budgets have been zeroed out at my > company.) > > I would like to take the cheaper option by staying at the Crowne Plaza > but as I understand it, the

Re: Functional schmunctional...

2009-02-11 Thread Michele Simionato
On Feb 10, 9:28 pm, r0g wrote: > def ip2inet(a): >   li = a.split('.') >   assert len(li) == 4 or len(li) == 6 >   return reduce(add,[int(li[e])*(256**((len(li)-1)-e)) for e in > xrange(0,len(li))]) Aagh! Notice that functional programming is not about filter, map, reduce and other unreadable con

Re: Escaping my own chroot...

2009-02-11 Thread Nick Craig-Wood
r0g wrote: > I'm writing a linux remastering script in python where I need to chroot > into a folder, run some system commands and then come out and do some > tidying up, un-mounting proc & sys etc. > > I got in there with os.chroot() and I tried using that to get back out > but that didn't

SOAP client

2009-02-11 Thread mk
Hi, I'm trying to consume a SOAP web service using Python. So far I have found two libraries: SOAPpy and ZSI. Both of them rely on PyXML which is no longer maintained (and there is no build for 64bit Windows and the setup.py doesn't seem to know how to build it on Windows). Is there a live SOAP

[no subject]

2009-02-11 Thread João Rabelo
-- http://mail.python.org/mailman/listinfo/python-list

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin Becker
Robin wrote: .. Yes - I've done something very similar with ajp-wsgi (from the author of flup; and which incidently performs very well works really nicely) to go from apache -> wsgi. But the issue I'm asking about here is to have multiple WSGI processes - ie to allow concurrent execution

Re: urllib2.Request:: http Request sending successfully, but Response contains in valid data.

2009-02-11 Thread Tino Wildenhain
Hi, nRk wrote: Hi I am trying to send Data to a website through "http" using "urllib.request" library using the bellow code. Response status code contains. 200 (OK) but Response contains nothing... With same data When I test using C# it working fine.. Response having.. some data in xml format.

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread M.-A. Lemburg
On 2009-02-11 16:16, Diez B. Roggisch wrote: > Robin wrote: > >> On Feb 11, 1:28 pm, Robin wrote: >>> On Feb 11, 12:10 pm, Robin Becker wrote: >>> We've used forked fastcgi (flup) with success as that decouples the wsgi process (in our case django) from the main server (in our case >>>

access to MS Access password-protected database?

2009-02-11 Thread Ken McDonald
Can anyone direct me towards a code snippet showing how to use Python to insert data into a password-protected MS Access database? My google searches have been uninformative for dbs that are password-protected. Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: access to MS Access password-protected database?

2009-02-11 Thread Tim Golden
Ken McDonald wrote: Can anyone direct me towards a code snippet showing how to use Python to insert data into a password-protected MS Access database? My google searches have been uninformative for dbs that are password-protected. Caveat: I've never done it and I have no Access db to hand, but

Re: Process crash with no reason

2009-02-11 Thread gil . shinar
On Feb 8, 5:31 pm, Stephen Hansen wrote: > > Thanks a lot and sorry for the late response. My main suspect is the > > CherryPy. > > I'm still investigating it. > > You're asking for advice but not listening to what people are saying > here -- why is CherryPy on the top of your list? > > What versi

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 3:46 pm, Robin Becker wrote: > well the flup server for fast cgi supports forking if the server is declared > as > an external process in apache. Then the top level of the flup process handles > each request and passes it off to a forked worker. I cannot recall exactly, > but > I beli

Re: SOAP client

2009-02-11 Thread Robin
On Feb 11, 3:33 pm, mk wrote: > Hi, > > I'm trying to consume a SOAP web service using Python.  So far I have > found two libraries: SOAPpy and ZSI.  Both of them rely on PyXML which > is no longer maintained (and there is no build for 64bit Windows and > the setup.py doesn't seem to know how to b

Re: Pycon 2009 Hotel?

2009-02-11 Thread Mike Driscoll
On Feb 11, 9:17 am, jay graves wrote: > On Feb 11, 9:13 am, jay graves wrote: > > > I'm attending Pycon this year and for the first time I have to pay for > > myself.  (All training/conference budgets have been zeroed out at my > > company.) > > > I would like to take the cheaper option by stayin

Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson
My program in IDLE bombed with: == Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\Sandia_Meteors\New_Sentinel_Development\Sentuser_Utilities_Related\sentuser\sen

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin Becker
Robin wrote: On Feb 11, 3:46 pm, Robin Becker wrote: well the flup server for fast cgi supports forking if the server is declared as an external process in apache. Then the top level of the flup process handles each request and passes it off to a forked worker. I cannot recall exactly, but I be

Re: Escaping my own chroot...

2009-02-11 Thread Jean-Paul Calderone
On Wed, 11 Feb 2009 09:31:56 -0600, Nick Craig-Wood wrote: r0g wrote: I'm writing a linux remastering script in python where I need to chroot into a folder, run some system commands and then come out and do some tidying up, un-mounting proc & sys etc. I got in there with os.chroot() and I

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Mike Driscoll
On Feb 11, 10:28 am, "W. eWatson" wrote: > My program in IDLE bombed with: > == > Exception in Tkinter callback > Traceback (most recent call last): >    File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ >      return self.func(*args) >    File > "C:\Sandia_Meteors\New_S

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Steve Holden
W. eWatson wrote: > My program in IDLE bombed with: > == > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ > return self.func(*args) > File > "C:\Sandia_Meteors\New_Sentinel_Development\Sentuse

Could you recommend job schedulling solution?

2009-02-11 Thread redbaron
I've sinlge 8-way node dedicated for executing long running tasks. To be able to execute multiple tasks on this node it shoud spawn each task in another process. At the same time it should accept network connection with new tasks without blocking of client and put it on job queue. What is "task"

Re: Iterable Ctypes Struct

2009-02-11 Thread mark . seagoe
On Feb 10, 9:52 pm, "Gabriel Genellina" wrote: > En Wed, 11 Feb 2009 00:31:26 -0200, escribió: > > > I like the ability to access elements of a struct such as with ctypes > > Structure: > myStruct.elementName1 > > 4 > > > What I like about it is there are no quotes needed. > > > What I don't

Re: generator object or 'send' method?

2009-02-11 Thread Aaron Brady
On Feb 11, 4:41 am, greg wrote: > Aaron Brady wrote: > > It would receive the 'send' from a different point in control > > flow than its usual 'next'.  Should it repeat a value if it receives a > > 'send'? > > No. This requirement clearly indicates that send() is > the wrong tool for the job. > >

RE: Could you recommend job schedulling solution?

2009-02-11 Thread bruce
hi... not sure exactly what you're looking for, but "condor" has a robust job scheduling architecture for dealing with grid/distributed setups over multiple systems.. give us more information, and there might be other suggestions! -Original Message- From: python-list-bounces+bedouglas=e

Re: access to MS Access password-protected database?

2009-02-11 Thread imageguy
On Feb 11, 10:43 am, Ken McDonald wrote: > Can anyone direct me towards a code snippet showing how to use Python   > to insert data into a password-protected MS Access database? My google   > searches have been uninformative for dbs that are password-protected. > > Thanks, > Ken You post is a lit

Re: SOAP client

2009-02-11 Thread JBW
On Wed, 11 Feb 2009 07:33:29 -0800, mk wrote: > I'm trying to consume a SOAP web service using Python. Suds (ibid) -- accept no substitute! -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterable Ctypes Struct

2009-02-11 Thread mark . seagoe
On Feb 11, 9:01 am, mark.sea...@gmail.com wrote: > On Feb 10, 9:52 pm, "Gabriel Genellina" > wrote: > > > > > > > En Wed, 11 Feb 2009 00:31:26 -0200, escribió: > > > > I like the ability to access elements of a struct such as with ctypes > > > Structure: > > myStruct.elementName1 > > > 4 > >

Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
Having issue on Windows cmd. > Python.exe >>>a = u'\xf0' >>>print a This gives a unicode error. Works fine in IDLE, PythonWin, and my Macbook but I need to run this from a windows batch. Character should look like this "ð". Please help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterable Ctypes Struct

2009-02-11 Thread mark . seagoe
In last post, I mixed code w/ 'p' and 'point'. Should be: >>> point._fields_.append(('z', c_int)) >>> point.z = 30 >>> print 'List:', list(point) List: [10, 20, 30] -- http://mail.python.org/mailman/listinfo/python-list

Re: Could you recommend job schedulling solution?

2009-02-11 Thread redbaron
On 11 фев, 20:26, "bruce" wrote: > hi... > > not sure exactly what you're looking for, but "condor" has a robust job > scheduling architecture for dealing with grid/distributed setups over > multiple systems.. > > give us more information, and there might be other suggestions! Condor, Globus or a

Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
>because the traceback says the index is 0 and there's only one line with a 0 >in it! Indeed. Thank you. On Wed, Feb 11, 2009 at 7:11 AM, MRAB wrote: > Steve Holden wrote: >> >> Matthew Sacks wrote: >>> >>> Hi List, >>> I am getting an index out of range error when trying to parse with >>> geto

Re: Functional schmunctional...

2009-02-11 Thread wolfram . hinderer
On 10 Feb., 21:28, r0g wrote: > def inet2ip(n, l=[], c=4): >   if c==0: return ".".join(l) >   p = 256**( c-1 ) >   l.append( str(n/p) ) >   return inet2ip( n-(n/p)*p, l, c-1 ) > The results for 1 > iterations of each were as follows... > > 0.113744974136 seconds for old INET->IP method > 27

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels writes: Seems like we may want to say things like, "synchronization points are too be silently ignored." That would completely break some useful possible applications, so should be avoided. No, I mean that we, _the_users_of_the_interface_, may want to sa

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels writes: I suspect that is why such an interface never came up (If you can clone states, then you can say: "compress this, then use the resultant state to compress/decompress others." The zlib C interface supports something like that. It is just not expo

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Scott David Daniels wrote: ... I've wanted to do some low-level (C-coded) search w/o bothering to create strings until a match Here's a more common use case: signature gathering on the contents. --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-li

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Albert Hopkins
On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: > Having issue on Windows cmd. > > Python.exe > >>>a = u'\xf0' > >>>print a > > This gives a unicode error. > > Works fine in IDLE, PythonWin, and my Macbook but I need to run this > from a windows batch. > > Character should look like this "ð". >

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson
Mike Driscoll wrote: On Feb 11, 10:28 am, "W. eWatson" wrote: My program in IDLE bombed with: == Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\Sandia_Meteo

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread W. eWatson
Steve Holden wrote: W. eWatson wrote: My program in IDLE bombed with: == Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\Sandia_Meteors\New_Sentinel_Development\

Re: Replace unknow string varible in file.

2009-02-11 Thread namire
Thanks to Vlastimil Brom for his example and r0g for his helpful attitude and hyperlinks I was able to made program do what was needed. Terry the comments in the html are not important I was just saying that if I could cover the undesired strings in html comment tags then they would not should up

openOffic, windows, and Python 2.5

2009-02-11 Thread John Fabiani
Hi, OpenOffice 3 on windows uses python 2.3.x (I have no idea why). Does anyone know where I can get whatever is needed to get python 2.5 working. I don't want to learn how recompile openoffice because it has a steep learning curve and is just to much when I can just use M$ word. BTW using the o

Re: Who's on First, IDLE or pythonWin? Dialog Problem?

2009-02-11 Thread Steve Holden
W. eWatson wrote: > Steve Holden wrote: >> W. eWatson wrote: >>> My program in IDLE bombed with: >>> == >>> Exception in Tkinter callback >>> Traceback (most recent call last): >>> File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ >>> return self.func(*args) >>> F

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 2:35 pm, Albert Hopkins wrote: > On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: > > Having issue on Windows cmd. > > > Python.exe > > >>>a = u'\xf0' > > >>>print a > > > This gives a unicode error. > > > Works fine in IDLE, PythonWin, and my Macbook but I need to run this > > from a wi

Re: re.sub and named groups

2009-02-11 Thread Shawn Milochik
> > Book recommendation: _Mastering Regular Expressions_, Jeffrey Friedl > -- > Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/ I wholeheartedly second this! The third edition is out now. -- http://mail.python.org/mailman/listinfo/python-list

hpw to convert a linux python script ?

2009-02-11 Thread Stef Mientki
hello, I've a python script, written for some Linux version, now I want to run it under windows. It complains of not finding files in /usr/share/tinybldLin/ where is the directory where the script is located and started from. As there are a whole lot of these lines, in a whole lot of

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels writes: > >> Seems like we may want to say things like, "synchronization points are > >> too be silently ignored." > No, I mean that we, _the_users_of_the_interface_, may want to say, > That is, I'd like that behavior as an option. I don't see any reason to want that (rat

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
On Feb 11, 8:50 pm, Robin wrote: > Hi, > > I am building some computational web services using soaplib. This > creates a WSGI application. > > However, since some of these services are computationally intensive, > and may be long running, I was looking for a way to use multiple > processes. I thou

Re: Could you recommend job schedulling solution?

2009-02-11 Thread Martin
Hi, 2009/2/11 redbaron : > should accept network > connection with new tasks without blocking of client and put it on job > queue. > > What is "task" ? Executing just ordinary python function will be > enough. If solution contain some client library which allow easy task > submit it will be great.

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 2:50 PM, jeffg wrote: > On Feb 11, 2:35 pm, Albert Hopkins wrote: > > On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: > > > Having issue on Windows cmd. > > > > Python.exe > > > >>>a = u'\xf0' > > > >>>print a > > > > > This gives a unicode error. > > > > > Works fine in

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread Jason
On Feb 11, 5:16 am, bearophileh...@lycos.com wrote: > christopher.saun...@durham.ac.uk (c d saunter): > > >I assume it is a feature of the compiler.< > > Yes it's a bug-prone antifeature that's probably a relic from C that > doesn't have a concatenation operator among strings as Python does > (+).

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Karen Tracey
On Wed, Feb 11, 2009 at 2:50 PM, jeffg wrote: > On Feb 11, 2:35 pm, Albert Hopkins wrote: > > On Wed, 2009-02-11 at 10:35 -0800, jeffg wrote: > > > Having issue on Windows cmd. > > > > Python.exe > > > >>>a = u'\xf0' > > > >>>print a > > > > > This gives a unicode error. > > > > > Works fine in

Re: access to MS Access password-protected database?

2009-02-11 Thread Kenneth McDonald
Sorry for the vagueness. I do have access to the file and can open it using Access. I haven't yet done anything involving Python and Access (or Python and Win interfacing, for that matter.) Thanks, Ken On Feb 11, 2009, at 12:01 PM, imageguy wrote: On Feb 11, 10:43 am, Ken McDonald wrot

Clearing the keyboard buffer (wxPython)

2009-02-11 Thread MarcusD
Platform: MSW (XP) Python 2.5 wxPython 2.8 Topic: Clear Keyboard buffer Hi, I hope I am not off topic asking a wxpython question. I'm writing a Score counter for Dart games. The software shows graphical output on a Canvas and accepts keyboard input (no buttons, no widgest). A stripped version loo

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread alex goretoy
GAE (Google App Engine) uses WSGI for webapps. You don't have to overhead of managing a server and all it's services this way as well. Just manage dns entries. Although, there are limitations depending on your project needs of what libs you need to use. appengine.google.com -Alex Goretoy http://w

Re: hpw to convert a linux python script ?

2009-02-11 Thread Alec Schueler
On Feb 11, 7:58 pm, Stef Mientki wrote: > As there are a whole lot of these lines, in a whole lot of files, > I wonder if there's a simple trick to point >   /usr/share/tinybldLin/ > to my directory ? > > thanks, > Stef Find and replace? -- http://mail.python.org/mailman/listinfo/python-list

Re: hpw to convert a linux python script ?

2009-02-11 Thread Stef Mientki
Alec Schueler wrote: On Feb 11, 7:58 pm, Stef Mientki wrote: As there are a whole lot of these lines, in a whole lot of files, I wonder if there's a simple trick to point /usr/share/tinybldLin/ to my directory ? thanks, Stef Find and replace? well I was thinking of a more elega

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
On Feb 11, 2:28 pm, "MarcusD" wrote: > Platform: MSW (XP) Python 2.5 wxPython 2.8 > Topic: Clear Keyboard buffer > > Hi, > I hope I am not off topic asking a wxpython question. > I'm writing a Score counter for Dart games. The software > shows graphical output on a Canvas and accepts keyboard > in

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread MarcusD
Whow. Thanks for the fast and comprehensive answer. To be honest I would have posted to wxpython.org but the server seems to be down for the last couple of days. I'll check this wx.Yield thing that I never heard of. And let's see what else we get here. Thanks again marcus -- http://mail.pyth

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Martin v. Löwis
> Having issue on Windows cmd. >> Python.exe a = u'\xf0' print a > > This gives a unicode error. > > Works fine in IDLE, PythonWin, and my Macbook but I need to run this > from a windows batch. > > Character should look like this "ð". > > Please help! Well, your terminal just cannot

Re: Unexpected string behaviour: txt = 'this' ' works'

2009-02-11 Thread bearophileHUGS
Jason: > It's such a minor optimization, that you probably wouldn't see any > effect on your program. >>> from dis import dis >>> def f(): ... return 'This is ' + 'an example.' ... >>> dis(f) 2 0 LOAD_CONST 3 ('This is an example.') 3 RETURN_VALUE Bye, bea

Re: hpw to convert a linux python script ?

2009-02-11 Thread rdmurray
Stef Mientki wrote: > Alec Schueler wrote: > > On Feb 11, 7:58 pm, Stef Mientki wrote: > > > >> As there are a whole lot of these lines, in a whole lot of files, > >> I wonder if there's a simple trick to point > >> /usr/share/tinybldLin/ > >> to my directory ? > >> > >> thanks, > >> Stef >

Re: hpw to convert a linux python script ?

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 3:48 PM, Stef Mientki wrote: > Alec Schueler wrote: > >> On Feb 11, 7:58 pm, Stef Mientki wrote: >> >> >>> As there are a whole lot of these lines, in a whole lot of files, >>> I wonder if there's a simple trick to point >>> /usr/share/tinybldLin/ >>> to my directory ? >>

Re: re.sub and named groups

2009-02-11 Thread Paul McGuire
On Feb 4, 10:51 am, "Emanuele D'Arrigo" wrote: > Hi everybody, > > I'm having a ball with the power of regular expression Don't forget the ball you can have with the power of ordinary Python strings, string methods, and string interpolation! originalString = "spam:%(first)s ham:%(second)s" print

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
On Feb 11, 2:54 pm, "MarcusD" wrote: > Whow. Thanks for the fast and comprehensive answer. To be honest I would > have posted to wxpython.org but the server seems to be down for the last > couple of days. > > I'll check this wx.Yield thing that I never heard of. And let's see what > else we get he

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 3:57 PM, "Martin v. Löwis" wrote: > > Having issue on Windows cmd. > >> Python.exe > a = u'\xf0' > print a > > > > This gives a unicode error. > > > > Works fine in IDLE, PythonWin, and my Macbook but I need to run this > > from a windows batch. > > > > Character

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 4:10 PM, Benjamin Kaplan wrote: > > > On Wed, Feb 11, 2009 at 3:57 PM, "Martin v. Löwis" wrote: > >> > Having issue on Windows cmd. >> >> Python.exe >> a = u'\xf0' >> print a >> > >> > This gives a unicode error. >> > >> > Works fine in IDLE, PythonWin, and my Mac

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Terry Reedy
andrew cooke wrote: Terry Reedy wrote: Reverse the test order def fact(n): if n > 0: return fact(n-1)*n if n == 0: return 1 raise ValueError sweet! but is this generally possible? I believe so, for some meaning of 'generally'. > ie: did you think this up for this question

Re: hpw to convert a linux python script ?

2009-02-11 Thread John Machin
On Feb 12, 7:48 am, Stef Mientki wrote: > Alec Schueler wrote: > > On Feb 11, 7:58 pm, Stef Mientki wrote: > > >> As there are a whole lot of these lines, in a whole lot of files, > >> I wonder if there's a simple trick to point > >>   /usr/share/tinybldLin/ > >> to my directory ? > > >> thanks,

  1   2   >