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

ANN: SciPy 0.7.0

2009-02-11 Thread Jarrod Millman
I'm pleased to announce SciPy 0.7.0. SciPy is a package of tools for science and engineering for Python. It includes modules for statistics, optimization, integration, linear algebra, Fourier transforms, signal and image processing, ODE solvers, and more. This release comes sixteen months

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

Re: getopt

2009-02-11 Thread John Machin
On Feb 11, 5:46 pm, Matthew Sacks ntw...@gmail.com 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

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 ste...@remove.this.cybersource.com.au 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

Re: python3 tutorial for newbie

2009-02-11 Thread Ken
Gabriel Genellina gagsl-...@yahoo.com.ar wrote in message news:mailman.9312.1234332608.3487.python-l...@python.org... En Tue, 10 Feb 2009 16:22:36 -0200, Gary Wood python...@sky.com escribió: Can someone recommend a good tutorial for Python 3, ideally that has tasks or assignments at the

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 ste...@remove.this.cybersource.com.au 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

Re: Avoiding argument checking in recursive calls

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

Re: Avoiding argument checking in recursive calls

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

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

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

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 below

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 machine

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels scott.dani...@acm.org 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,

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

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

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

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

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 vzu...@volny.cz 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

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 12:10 pm, Robin Becker ro...@reportlab.com 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

Re: optparse versus getopt

2009-02-11 Thread Pete Forman
Robert Kern robert.k...@gmail.com 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

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-proof code, use //

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=',

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 1:28 pm, Robin robi...@gmail.com wrote: On Feb 11, 12:10 pm, Robin Becker ro...@reportlab.com 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

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 robi...@gmail.com wrote: On Feb 11, 12:10 pm, Robin Becker ro...@reportlab.com 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

Re: Pycon 2009 Hotel?

2009-02-11 Thread jay graves
On Feb 11, 9:13 am, jay graves jaywgra...@gmail.com 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

Re: Functional schmunctional...

2009-02-11 Thread Michele Simionato
On Feb 10, 9:28 pm, r0g aioe@technicalbloke.com 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

Re: Escaping my own chroot...

2009-02-11 Thread Nick Craig-Wood
r0g aioe@technicalbloke.com 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

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

[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 robi...@gmail.com wrote: On Feb 11, 12:10 pm, Robin Becker ro...@reportlab.com wrote: We've used forked fastcgi (flup) with success as that decouples the wsgi process (in our case django) from the main

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,

Re: Process crash with no reason

2009-02-11 Thread gil . shinar
On Feb 8, 5:31 pm, Stephen Hansen apt.shan...@gmail.com 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?

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 3:46 pm, Robin Becker ro...@reportlab.com 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,

Re: SOAP client

2009-02-11 Thread Robin
On Feb 11, 3:33 pm, mk mes...@gmail.com 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

Re: Pycon 2009 Hotel?

2009-02-11 Thread Mike Driscoll
On Feb 11, 9:17 am, jay graves jaywgra...@gmail.com wrote: On Feb 11, 9:13 am, jay graves jaywgra...@gmail.com 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

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

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 ro...@reportlab.com 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

Re: Escaping my own chroot...

2009-02-11 Thread Jean-Paul Calderone
On Wed, 11 Feb 2009 09:31:56 -0600, Nick Craig-Wood n...@craig-wood.com wrote: r0g aioe@technicalbloke.com 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

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

2009-02-11 Thread Mike Driscoll
On Feb 11, 10:28 am, W. eWatson notval...@sbcglobal.net 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

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

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 gagsl-...@yahoo.com.ar wrote: En Wed, 11 Feb 2009 00:31:26 -0200, mark.sea...@gmail.com 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

Re: generator object or 'send' method?

2009-02-11 Thread Aaron Brady
On Feb 11, 4:41 am, greg g...@cosc.canterbury.ac.nz 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

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:

Re: access to MS Access password-protected database?

2009-02-11 Thread imageguy
On Feb 11, 10:43 am, Ken McDonald kmmcdon...@medicine.wisc.edu 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,

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 gagsl-...@yahoo.com.ar wrote: En Wed, 11 Feb 2009 00:31:26 -0200, mark.sea...@gmail.com escribió: I like the ability to access elements of a struct such as with ctypes Structure:

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 bedoug...@earthlink.net 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!

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 goo...@mrabarnett.plus.com wrote: Steve Holden wrote: Matthew Sacks wrote: Hi List, I am getting an index out of range error when trying to parse

Re: Functional schmunctional...

2009-02-11 Thread wolfram . hinderer
On 10 Feb., 21:28, r0g aioe@technicalbloke.com 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

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels scott.dani...@acm.org 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,

Re: zlib interface semi-broken

2009-02-11 Thread Scott David Daniels
Paul Rubin wrote: Scott David Daniels scott.dani...@acm.org 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.

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 --

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 ð. Please help! You

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 notval...@sbcglobal.net 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)

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

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

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) File

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org 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

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

Re: zlib interface semi-broken

2009-02-11 Thread Paul Rubin
Scott David Daniels scott.dani...@acm.org 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

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
On Feb 11, 8:50 pm, Robin robi...@gmail.com 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

Re: Could you recommend job schedulling solution?

2009-02-11 Thread Martin
Hi, 2009/2/11 redbaron ivanov.ma...@gmail.com: 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

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org 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.

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 (+). So in

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Karen Tracey
On Wed, Feb 11, 2009 at 2:50 PM, jeffg jeffgem...@gmail.com wrote: On Feb 11, 2:35 pm, Albert Hopkins mar...@letterboxes.org 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.

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

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

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

Re: hpw to convert a linux python script ?

2009-02-11 Thread Alec Schueler
On Feb 11, 7:58 pm, Stef Mientki stef.mien...@gmail.com 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? --

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 stef.mien...@gmail.com 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

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
On Feb 11, 2:28 pm, MarcusD sto...@part-gmbh.de 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

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 --

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 display this

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, bearophile --

Re: hpw to convert a linux python script ?

2009-02-11 Thread rdmurray
Stef Mientki stef.mien...@gmail.com wrote: Alec Schueler wrote: On Feb 11, 7:58 pm, Stef Mientki stef.mien...@gmail.com 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: hpw to convert a linux python script ?

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 3:48 PM, Stef Mientki stef.mien...@gmail.comwrote: Alec Schueler wrote: On Feb 11, 7:58 pm, Stef Mientki stef.mien...@gmail.com 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

Re: re.sub and named groups

2009-02-11 Thread Paul McGuire
On Feb 4, 10:51 am, Emanuele D'Arrigo man...@gmail.com 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

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Mike Driscoll
On Feb 11, 2:54 pm, MarcusD sto...@part-gmbh.de 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

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 mar...@v.loewis.dewrote: 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

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 4:10 PM, Benjamin Kaplan benjamin.kap...@case.eduwrote: On Wed, Feb 11, 2009 at 3:57 PM, Martin v. Löwis mar...@v.loewis.dewrote: Having issue on Windows cmd. Python.exe a = u'\xf0' print a This gives a unicode error. Works fine in IDLE, PythonWin, and

  1   2   3   4   >