which language has syntax that visually represent a tree? [was X#]

2009-02-11 Thread Xah Lee
syntax that represent a tree purely [was X#] On Jan 21, 3:13 am, Pascal Costanza wrote: > LOL: http://www.xsharp.org/samples/ Today, i was nosing about some blogs, which made me come to: http://blog.fogus.me/2009/02/06/yegge-clojure-arc-and-lolita-or-days-of-future-past in which he wrote: «Now

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Gerard Flanagan
Jason wrote: Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, very tired & flaccid @ the moment I have a list of objects, simply called "list". I ne

RE: TTS in windows

2009-02-11 Thread Jonathan Chacón
-Mensaje original- De: Mark Hammond [mailto:skippy.hamm...@gmail.com] Enviado el: jueves, 12 de febrero de 2009 6:47 >It appears this is doable from COM. With the pywin32 package: Well, I have problems to install pywin32 (pywin32-212.win32-py2.5.exe) I'll try to solve that problem l

Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
On Feb 11, 10:36 pm, "Hendrik van Rooyen" wrote: > "birdsong" wrote: > > 8<--- select not blocking on empty file stuff - > > > Any help on what I'm missing would be appreciated. > > Why do you expect it to block? > It is ready to read, to return end of file. > I expected it

Re: Python binaries with VC++ 8.0?

2009-02-11 Thread Tim Roberts
Paul Rubin wrote: >In case anyone is interested: Gideon Smeding of the University of >Utrecht has written a masters' thesis titled "An executable >operational semantics for Python". That's an interesting grammatical construct. I would have said either "Executable o

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Mark Tolonen
"Jason" wrote in message news:8158439d-faae-4889-a1cf-8d9fee112...@v39g2000yqm.googlegroups.com... Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, ver

Re: select.poll.poll() never blocks

2009-02-11 Thread Hendrik van Rooyen
"birdsong" wrote: 8<--- select not blocking on empty file stuff - > Any help on what I'm missing would be appreciated. Why do you expect it to block? It is ready to read, to return end of file. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Thank you, Tkinter. (easy to use)

2009-02-11 Thread r
Hello, Tkinter is a great GUI toolkit, for what it lacks in prettiness it more than makes up for in simple and quick GUI building. I think this is the main reason Tkinter continues to be Python's built-in GUI toolkit. It is a great place to start for those with no GUI experience. Sure it will neve

Re: Functional schmunctional...

2009-02-11 Thread Hendrik van Rooyen
"Steve Holden" wrote: > Jeez, doesn't anyone read the fine manual any more? I hope this was just > an academic exercise. > > >>> socket.inet_ntoa(struct.pack("!l", 10)) > '59.154.202.0' > >>> > > Holden's rule: when it looks simple enough to be worth including in the > standard library

Re: how can this iterator be optimized?

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 20:26:12 -0800, Basilisk96 wrote: >> Don't use a generator then. If you're going to finally return a list >> (and sorted does exactly that), build a list right from the start: > > Good point. However, for the sake of argument, what if I removed the > sorting requirement and si

Re: Avoiding argument checking in recursive calls

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 04:31:10 -0500, Terry Reedy wrote: >> 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

Re: explain

2009-02-11 Thread Python Nutter
If your use is to Generically "want to use python on Windows XP" you install the standard/generic Python that you download from python.org Without any details to decide with, I would also say download version 2.5.4 of Python from python.org 2009/2/12 Saeed Iravani : > Hello, I want to use python

Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
On Feb 11, 7:47 pm, "Rhodri James" wrote: > On Thu, 12 Feb 2009 03:01:16 -, birdsong   > wrote: > > > So I guess I didn't have a complete understanding of poll, I thought > > it returned file descriptors that had registered an event that the > > user asked to watch for.  In my case, select.PO

Re: explain

2009-02-11 Thread gofkuckyourself
Saeed, The standard Python distribution is community supported and available on Windows http://www.python.org/download/windows/ ActivePython is ActiveState's version of Python with extra libraries and commercial support available VPython I am not familiar with, perhaps someone else can speak to thi

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 20:58:28 -0800, Jason wrote: > I have a list of objects, simply called "list". Generally speaking, that's not a good choice of names, because it over- writes ("shadows") the built-in function list(). > I need to break it into > an array (list of lists) wherein each sublist

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Terry Reedy
Jason wrote: I have a list of objects, simply called "list". Bad idea. I need to break it into an array (list of lists) wherein each sublist is the length of the variable "items_per_page". So array[0] would go from array[0][0] to array[0][items_per_page], then bump up to array[1][0] - arra

Re: Programmatically changing network proxy settings on the Mac

2009-02-11 Thread Python Nutter
OS X is POSIX/UNIX system so your basic plan of going about things: 1. Learn what proxy/network subsystem Tiger uses 2. Learn what proxy/network subsystem Leopard uses (same as 1., or has it changed?) 3. Based on 1 and 2 learn the config file names and locations. 4. Based on 3 you will determine if

explain

2009-02-11 Thread Saeed Iravani
Hello, I want to use python but I do not know that I install Python or ActivePython or VPython or Jython? My operating system is Windows XP SP2. Please explain for me completely. -- http://mail.python.org/mailman/listinfo/python-list

Re: Another optimization request :-)

2009-02-11 Thread Terry Reedy
jeffg wrote: If anyone wants to take this on... I would really really like to have the spring_layout modified to support multi-threading if at all possible. My test data is 20,000, which makes this process 20,000 x 20,000 or 400,000,000 (400 million) calculations. This is taking somewhere betwee

Need an application sends from paricular port

2009-02-11 Thread Sambit Samal
Hi I am new to Python world I need a python script , which binds at a user defind port & sends to other enity , which waits at particular port. The other enity will respond & Python script should receive that at the defined port The communication will happen over UDP e.g *Python Appl* IP: 10

Re: TTS in windows

2009-02-11 Thread Mark Hammond
On 12/02/2009 3:58 PM, Jonathan Chacón wrote: Hello, I need to use SAPI5 text to speech with python but I don't find anything that lets me manage speech, tone, volume, etc Does anybody know anything to do this? It appears this is doable from COM. With the pywin32 package: >>> import win32c

Re: Breaking Python list into set-length list of lists

2009-02-11 Thread Mensanator
On Feb 11, 10:58�pm, Jason wrote: > Hey everyone-- > > I'm pretty new to Python, & I need to do something that's incredibly > simple, but combing my Python Cookbook & googling hasn't helped me out > too much yet, and my brain is very, very tired & flaccid @ the > moment > > I have a list of ob

Re: how can this iterator be optimized?

2009-02-11 Thread Terry Reedy
Basilisk96 wrote: Don't use a generator then. If you're going to finally return a list (and sorted does exactly that), build a list right from the start: Good point. However, for the sake of argument, what if I removed the sorting requirement and simply wanted the generator? Write a generato

Thank you, Tkinter. (easy to use)

2009-02-11 Thread argo785
Tonight I needed to draw a series of simple shapes in a window using a bit of math but didn't have much time to do it. I've got very little GUI toolkit experience. Briefly had a look at the usually-recommended heavyweight GUI toolkits, but I didn't want to inherit from widget classes or override pa

Breaking Python list into set-length list of lists

2009-02-11 Thread Jason
Hey everyone-- I'm pretty new to Python, & I need to do something that's incredibly simple, but combing my Python Cookbook & googling hasn't helped me out too much yet, and my brain is very, very tired & flaccid @ the moment I have a list of objects, simply called "list". I need to break it

TTS in windows

2009-02-11 Thread Jonathan Chacón
Hello, I need to use SAPI5 text to speech with python but I don't find anything that lets me manage speech, tone, volume, etc Does anybody know anything to do this? Thanks and regards Jonathan Chacón -- http://mail.python.org/mailman/listinfo/python-list

Re: how can this iterator be optimized?

2009-02-11 Thread Basilisk96
> Don't use a generator then. If you're going to finally return a list (and   > sorted does exactly that), build a list right from the start: Good point. However, for the sake of argument, what if I removed the sorting requirement and simply wanted the generator? I usually strive for comprehension

Re: Another optimization request :-)

2009-02-11 Thread jeffg
On Feb 11, 9:56 pm, "andrew cooke" wrote: > sorry, that was stupid.  there is no inversion (apart from 1/m), just the > integration. > > still, improving the integration would allow larger steps. > > andrew > > andrew cooke wrote: > > > why are you dong this point by point?  surely you can express

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 10:00 pm, "Gabriel Genellina" wrote: > En Wed, 11 Feb 2009 23:11:37 -0200, jeffg escribió: > > > > > On Feb 11, 6:30 pm, "Martin v. Löwis" wrote: > >> > Thanks, I ended up using encode('iso-8859-15', "replace") > >> > Perhaps more up to date than cp1252...?? > >> If you encode as iso-

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

2009-02-11 Thread W. eWatson
It looks like I got an accidentally case of send message 3 times. Well, here's a correct below. The question now is what can I do about it? reboot? Just to re-iterate the answer I provided to *>the question to a post above<*, I'm using Tkinter for the program's GUI. --

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

2009-02-11 Thread W. eWatson
So, how do I get rid of it? reboot? Just to re-iterate the I provided the question to above, I'm using Tkinter for the program's GUI. -- W. eWatson (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time) Obz Site: 39° 15' 7" N, 121° 2'

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

2009-02-11 Thread W. eWatson
The two separate loops being PyWin (which uses MFC) and your program (which uses Tkinter). You just can't mix GUIs in the same process like that, sorry. regards Stedve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ Deja-vu! htt

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

2009-02-11 Thread W. eWatson
drobi...@gmail.com wrote: On Feb 11, 2:51 pm, Steve Holden wrote: 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

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

2009-02-11 Thread W. eWatson
drobi...@gmail.com wrote: On Feb 11, 2:51 pm, Steve Holden wrote: 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

Re: select.poll.poll() never blocks

2009-02-11 Thread Miles
On Wed, Feb 11, 2009 at 10:47 PM, Rhodri James wrote: > If you want to > do it in Python, the only thing that springs to mind is > periodically checking the size of the file and reading more > when that changes. You'll need to be very careful to keep > what size you think the file is in sync with

Re: select.poll.poll() never blocks

2009-02-11 Thread Rhodri James
On Thu, 12 Feb 2009 03:01:16 -, birdsong wrote: So I guess I didn't have a complete understanding of poll, I thought it returned file descriptors that had registered an event that the user asked to watch for. In my case, select.POLLIN ConstantMeaning POLLIN There is data to read

Re: Iterable Ctypes Struct

2009-02-11 Thread Gabriel Genellina
En Thu, 12 Feb 2009 00:02:12 -0200, escribió: On Feb 11, 5:51 pm, Marc 'BlackJack' Rintsch wrote: On Wed, 11 Feb 2009 17:33:23 -0800, mark.seagoe wrote: > Not sure what generic attribute container is.  I am reading in from > xml file all reg names for a chip. Are you using instances of t

Re: select.poll.poll() never blocks

2009-02-11 Thread birdsong
So I guess I didn't have a complete understanding of poll, I thought it returned file descriptors that had registered an event that the user asked to watch for. In my case, select.POLLIN ConstantMeaning POLLIN There is data to read ...there ins't any data to be read. The file is readabl

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Gabriel Genellina
En Wed, 11 Feb 2009 23:11:37 -0200, jeffg escribió: On Feb 11, 6:30 pm, "Martin v. Löwis" wrote: > Thanks, I ended up using encode('iso-8859-15', "replace") > Perhaps more up to date than cp1252...?? If you encode as iso-8859-15, but this is not what your terminal expects, it certainly won't

Re: Another optimization request :-)

2009-02-11 Thread andrew cooke
sorry, that was stupid. there is no inversion (apart from 1/m), just the integration. still, improving the integration would allow larger steps. andrew andrew cooke wrote: > > why are you dong this point by point? surely you can express the physics > as a set of equations and invert the mat

Re: select.poll.poll() never blocks

2009-02-11 Thread Jean-Paul Calderone
On Wed, 11 Feb 2009 18:44:53 -0800 (PST), birdsong wrote: I'm pretty sure I've exhausted all searches and read all the forums Google will turn up related to this issue. I touch an empty file in a sh shell, fire up the python shell, open the file for reading(tried all buffering options), regist

select.poll.poll() never blocks

2009-02-11 Thread birdsong
I'm pretty sure I've exhausted all searches and read all the forums Google will turn up related to this issue. I touch an empty file in a sh shell, fire up the python shell, open the file for reading(tried all buffering options), register it with a poll object for select.POLLIN and call poll(), bu

Re: Another optimization request :-)

2009-02-11 Thread andrew cooke
why are you dong this point by point? surely you can express the physics as a set of equations and invert the matrix? wouldn't that be a lot faster? you'd replace the iteration over all combinations of points with a faster matrix inversion. see for example http://www.medwelljournals.com/fullte

Re: Iterable Ctypes Struct

2009-02-11 Thread mark . seagoe
On Feb 11, 5:51 pm, Marc 'BlackJack' Rintsch wrote: > On Wed, 11 Feb 2009 17:33:23 -0800, mark.seagoe wrote: > > Not sure what generic attribute container is.  I am reading in from xml > > file all reg names for a chip. > > Are you using instances of that class to interface C code or to read/ > wr

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

2009-02-11 Thread drobi...@gmail.com
On Feb 11, 2:51 pm, Steve Holden wrote: > 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

Re: Iterable Ctypes Struct

2009-02-11 Thread Marc 'BlackJack' Rintsch
On Wed, 11 Feb 2009 17:33:23 -0800, mark.seagoe wrote: > Not sure what generic attribute container is. I am reading in from xml > file all reg names for a chip. Are you using instances of that class to interface C code or to read/ write data intended to be read or written by a C program? If not

Another optimization request :-)

2009-02-11 Thread jeffg
If anyone wants to take this on... I would really really like to have the spring_layout modified to support multi-threading if at all possible. My test data is 20,000, which makes this process 20,000 x 20,000 or 400,000,000 (400 million) calculations. This is taking somewhere between 2-3 hours an

Re: CPython loading modules into memory

2009-02-11 Thread sjbrown
On Feb 11, 2:00 pm, "Martin v. Löwis" wrote: > > Can someone describe the details of how Python loads modules into > > memory?  I assume once the .py file is compiled to .pyc that it is > > mmap'ed in.  But that assumption is very naive.  Maybe it uses an > > anonymous mapping?  Maybe it does othe

Re: Iterable Ctypes Struct

2009-02-11 Thread mark . seagoe
Hi Gabriel; Not sure what generic attribute container is. I am reading in from xml file all reg names for a chip. So then I'd be able to use python scripts to access the regs. So eventually this class will get subclassed w/ hw access instead of just saving in int. So I want to call this modu

Re: how can this iterator be optimized?

2009-02-11 Thread Gabriel Genellina
En Wed, 11 Feb 2009 23:22:26 -0200, Basilisk96 escribió: def MakePairs(path): import os import operator join = os.path.join rawPairs = ( (join(path, s), func(s)) for s in os.listdir(path) if func(s) is not None and func(s).endswith("some criterion")

how can this iterator be optimized?

2009-02-11 Thread Basilisk96
Hello all, I have the following function that uses an intermediate iterator "rawPairs": def MakePairs(path): import os import operator join = os.path.join rawPairs = ( (join(path, s), func(s)) for s in os.listdir(path) if func(s) is not None and func(s).end

Re: SQL error

2009-02-11 Thread John Machin
On Feb 12, 11:57 am, Dan McKenzie wrote: > Hi Guys, > > I am trying to move data from a file into our mysql database. > > The format of the text file is - ipaddress ipaddress bytes packets   > interface-in interface-out eg: 192.168.1.1 192.168.1.2 1522 12 * rob > > The sql table is 'ipflows' > > T

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 6:30 pm, "Martin v. Löwis" wrote: > > Thanks, I ended up using encode('iso-8859-15', "replace") > > Perhaps more up to date than cp1252...?? > > > It still didn't print correctly, but it did write correctly, which was > > my main problem. > > If you encode as iso-8859-15, but this is no

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

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 12:57:31 -0800, bearophileHUGS wrote: > 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

SQL error

2009-02-11 Thread Dan McKenzie
Hi Guys, I am trying to move data from a file into our mysql database. The format of the text file is - ipaddress ipaddress bytes packets interface-in interface-out eg: 192.168.1.1 192.168.1.2 1522 12 * rob The sql table is 'ipflows' This is the code: ___

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

2009-02-11 Thread Steven D'Aprano
On Wed, 11 Feb 2009 01:56:19 -0800, 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... No it doesn't, you say so later: it contains a set of ba

Re: ANN: Python 2.6 Quick Reference available

2009-02-11 Thread python
Richard, An excellent tool. Great job!!! Thank you for sharing this with the Python community. Regards, Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Python 2.6 Quick Reference available

2009-02-11 Thread Markus Schreyer
Great stuff! Waiting for the 3.0 version.. :) -- http://mail.python.org/mailman/listinfo/python-list

Embed a web browser into a page

2009-02-11 Thread Carbon Man
Hi, I need to embed a web browser into a python page. I am coming from the MS world where I created an app that all of it's interfaces were actually web pages rendered in an Internet Explorer activex control. There was a object hook that allowed you to call into the host environment from javascr

Re: Can I 'LOOK' through urllib?

2009-02-11 Thread Grant Edwards
On 2009-02-12, Grant Edwards wrote: > On 2009-02-11, Muddy Coder wrote: >> Hi Folks, >> >> I feel good after played urllib with fun! >> >> Now I want to LOOK to server through urllib. I read the urllib docs, >> but I did not find such a function. For example, if there are many >> files located in

Re: Can I 'LOOK' through urllib?

2009-02-11 Thread Grant Edwards
On 2009-02-11, Muddy Coder wrote: > Hi Folks, > > I feel good after played urllib with fun! > > Now I want to LOOK to server through urllib. I read the urllib docs, > but I did not find such a function. For example, if there are many > files located in http://www.somedomain.com/data_folder, but I

Re: Can I 'LOOK' through urllib?

2009-02-11 Thread Christian Heimes
Muddy Coder schrieb: > Hi Folks, > > I feel good after played urllib with fun! > > Now I want to LOOK to server through urllib. I read the urllib docs, > but I did not find such a function. For example, if there are many > files located in http://www.somedomain.com/data_folder, but I don't > know

Re: re.sub and named groups

2009-02-11 Thread Rhodri James
On Wed, 11 Feb 2009 21:05:53 -, Paul McGuire wrote: 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 interpolati

Re: Can I 'LOOK' through urllib?

2009-02-11 Thread Paul Rubin
Muddy Coder writes: > Now I want to LOOK to server through urllib. I read the urllib docs, > but I did not find such a function. For example, if there are many > files located in http://www.somedomain.com/data_folder, but I don't > know what the filenames are residing in the data_folder. I wish ur

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Martin v. Löwis
> Thanks, I ended up using encode('iso-8859-15', "replace") > Perhaps more up to date than cp1252...?? > > It still didn't print correctly, but it did write correctly, which was > my main problem. If you encode as iso-8859-15, but this is not what your terminal expects, it certainly won't print c

Re: Can I 'LOOK' through urllib?

2009-02-11 Thread Chris Rebert
On Wed, Feb 11, 2009 at 3:17 PM, Muddy Coder wrote: > Hi Folks, > > I feel good after played urllib with fun! > > Now I want to LOOK to server through urllib. I read the urllib docs, > but I did not find such a function. For example, if there are many > files located in http://www.somedomain.com/d

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

2009-02-11 Thread W. eWatson
Mike Driscoll wrote: On Feb 11, 3:27 pm, "W. eWatson" wrote: Steve Holden wrote: 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"

Re: where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
On Feb 11, 4:01 pm, Daniel wrote: > I've just been reading the docs to help me with a SocketServer issue. > I found in the docs (http://docs.python.org/library/socketserver.html) > a reference to a member attribute timeout and a member function > handle_timeout() is made.  I am using python 2.5 an

Can I 'LOOK' through urllib?

2009-02-11 Thread Muddy Coder
Hi Folks, I feel good after played urllib with fun! Now I want to LOOK to server through urllib. I read the urllib docs, but I did not find such a function. For example, if there are many files located in http://www.somedomain.com/data_folder, but I don't know what the filenames are residing in t

where is handle_timeout in SocketServer

2009-02-11 Thread Daniel
I've just been reading the docs to help me with a SocketServer issue. I found in the docs (http://docs.python.org/library/socketserver.html) a reference to a member attribute timeout and a member function handle_timeout() is made. I am using python 2.5 and there's no indication that these were add

Re: Clearing the keyboard buffer (wxPython)

2009-02-11 Thread Antoine De Groote
yes, the server seems to have been down :-( 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

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
On Feb 12, 9:19 am, Robin wrote: > On Feb 11, 7:59 pm, Graham Dumpleton > wrote: > > > > > 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 co

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread alex goretoy
> > > GAE is definitely not suitable in this case... The servers are >> provided and maintained as part of a large scientific project for >> which I am providing just a few services... Other groups are running >> services in other platforms on tomcat through soaplab/instantsoap - >> but I was hopin

Re: Unicode issue on Windows cmd line

2009-02-11 Thread Benjamin Kaplan
On Wed, Feb 11, 2009 at 5:10 PM, jeffg wrote: > On Feb 11, 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

Re: ANN: Python 2.6 Quick Reference available

2009-02-11 Thread Giampaolo Rodola'
On Feb 10, 8:38 pm, Richard Gruet <"rgruet at free dot fr"> wrote: > The Python 2.6 Quick Reference is available in HTML and PDF formats > athttp://rgruet.free.fr/#QuickRef. > > This time I was helped by Josh Stone for the update. > > As usual, your feedback is welcome (pqr at rgruet.net). > > Che

Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
Keep your threadiquette to yourself. On Wed, Feb 11, 2009 at 1:48 PM, John Machin wrote: > On Feb 11, 6:16 am, 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 >> >> optlis

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 9:32 pm, Graham Dumpleton wrote: > 2009/2/12 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 pro

Re: getopt index out of range

2009-02-11 Thread Matthew Sacks
Perhaps you can give me a call privately and I will explain it to you. Regards, Matthew On Wed, Feb 11, 2009 at 1:48 PM, John Machin wrote: > On Feb 11, 6:16 am, Matthew Sacks wrote: >> Hi List, >> I am getting an index out of range error when trying to parse with getopt. >> Probably something s

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Robin
On Feb 11, 7:59 pm, Graham Dumpleton wrote: > 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 runni

Re: Unicode issue on Windows cmd line

2009-02-11 Thread jeffg
On Feb 11, 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 should look like th

Re: Iterable Ctypes Struct

2009-02-11 Thread Gabriel Genellina
En Wed, 11 Feb 2009 16:32:41 -0200, escribió: 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: > > Wh

Re: CPython loading modules into memory

2009-02-11 Thread Martin v. Löwis
> Can someone describe the details of how Python loads modules into > memory? I assume once the .py file is compiled to .pyc that it is > mmap'ed in. But that assumption is very naive. Maybe it uses an > anonymous mapping? Maybe it does other special magic? This is all > very alien to me, so i

Re: getopt index out of range

2009-02-11 Thread John Machin
On Feb 11, 6:16 am, 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=', 't

Re: CPython loading modules into memory

2009-02-11 Thread Robert Kern
On 2009-02-11 15:30, sjbrown wrote: Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This i

Re: openOffic, windows, and Python 2.5

2009-02-11 Thread Terry Reedy
John Fabiani wrote: Hi, OpenOffice 3 on windows uses python 2.3.x (I have no idea why). I presume because no one has volunteered to do the update for the Py-UNO bridge. In any case, why do you consider that to be a problem. It is common for apps to include the Python they are known to work

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

2009-02-11 Thread Mike Driscoll
On Feb 11, 3:27 pm, "W. eWatson" wrote: > Steve Holden wrote: > > 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:\Python2

CPython loading modules into memory

2009-02-11 Thread sjbrown
Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This is all very alien to me, so if someone

Re: Unicode issue on Windows cmd line

2009-02-11 Thread MRAB
Benjamin Kaplan wrote: [snip] Whoops. Didn't mean to hit send there. I was going to say, you can't have everything when Microsoft is only willing to break the programs that average people are going to use on a daily basis. I mean, why would they do something nice for the international community

Re: best way to serve wsgi with multiple processes

2009-02-11 Thread Graham Dumpleton
2009/2/12 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. GAE is not

Re: Locating python

2009-02-11 Thread David Sevilla
> On Feb 3, 7:30 pm, andrew cooke wrote: > > > the exact details of what you are reporting seem a bit odd, but i have > > seen a similar error because i have tried to use my own account to > > install the package, instead of using root. > > > what i believe happens is that easy_install first tries

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

2009-02-11 Thread W. eWatson
Steve Holden wrote: 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 "C:\

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,

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

  1   2   >