Re: How to build Python 2.6.2 on HP-UX Itanium with thread support?

2009-05-19 Thread henning . vonbargen
Daniel: > What do you get with: > import thread > thread.start_new_thread(int, ('1',2)) > This results in the same error message: thread.error: can't start new thread Aahz: > You probably want to start by figuring out which threading library is > being used -- Python normally wants Posix threads,

strip char from list of strings

2009-05-19 Thread Laurent Luce
I have the following list: [ 'test\n', test2\n', 'test3\n' ] I want to remove the '\n' from each string in place, what is the most efficient way to do that ? Regards, Laurent -- http://mail.python.org/mailman/listinfo/python-list

Re: UDP reading on multiple sockets

2009-05-19 Thread thomas . vogel
On 17 Mai, 04:22, Grant Edwards wrote: > On 2009-05-17, Thomas Vogel wrote: > > > I'm currently have the problem that I try to read UDP messages from > > multiple sockets in parallel. So let's say I get UDP packets from the > > same IP on the ports 2000, 2001, 2002,... > > Is there any reason you

Re: UDP reading on multiple sockets

2009-05-19 Thread Guido Goldstein
Hi! On Mon, 18 May 2009 06:19:01 -0700 (PDT) thomas.vo...@likeabird.de wrote: [...] > The only honest answer would be that I'm totaly unfamiliar with select > and also the documentation I found wasn't able to clear the picture. > So are there examples of using select together with sockets avail

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-19 Thread Steve Ferg
Thanks. Your observations would make good comments on the original blog message that I'm seeking. Do you have a link to that blog? -- http://mail.python.org/mailman/listinfo/python-list

identifying live hosts on a network

2009-05-19 Thread hunteroakesgun
HI I am new to python and am having trouble coming up with a script that idenifies all the live hosts on my network. thanks Hunter -- http://mail.python.org/mailman/listinfo/python-list

Re: strip char from list of strings

2009-05-19 Thread David Stanek
On Mon, May 18, 2009 at 3:30 PM, Laurent Luce wrote: > > I have the following list: > > [ 'test\n', test2\n', 'test3\n' ] > > I want to remove the '\n' from each string in place, what is the most > efficient way to do that ? > What have you tried so far? -- David blog: http://www.traceback.org

Re: Subversion commit from Python?

2009-05-19 Thread Tim Golden
Jack Trades wrote: I'm wondering if there's an easy way to do a 'svn commit' on a directory from Python. http://pysvn.tigris.org/ and in particular: http://pysvn.tigris.org/docs/pysvn_prog_guide.html TJG -- http://mail.python.org/mailman/listinfo/python-list

Re: Subversion commit from Python?

2009-05-19 Thread Duncan Booth
Jack Trades wrote: > Originally I had the 'data' directory in the same directory as the cgi > scripts and was using os.system("svn commit"), however I kept running > into weird bugs with this method. So I moved the data directory out > of the cgi directory and plan to use a separate repository.

Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message , Jack Trades wrote: > On May 19, 12:26 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > >> In message <2904e7de-0a8d-4697-9c44- >> >> c83bb5319...@s31g2000vbp.googlegroups.com>, Jack Trades wrote: >> > Originally I had the 'data' directory in the same directory as the cgi >>

Re: issue: Permissions in odfpy

2009-05-19 Thread Krishnakant
Through the python code, chmod 400 happy hacking. Krishnakant. On Tue, 2009-05-19 at 12:21 +0530, shruti surve wrote: > hey, > i am using odfpy and generating spreadsheet in open office..but > nobody should modify the file..so can anybody tell me how can we give > permissions (read only) to spre

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-19 Thread Duncan Booth
Ben Finney wrote: > MRAB writes: > >> Gunter Henriksen wrote: >> > If there is a function which triggers a one-shot switch, I like to >> > have a way to find out if it has already been triggered, I prefer >> > to have the function tell me if it triggered the switch or not, but >> > I would not

problems with PyML: ImportError: No module named _ckernel

2009-05-19 Thread Francesco Stablum
Hello, I am trying PyML ( http://PyML.sf.net ) with little success. I tried to do the test: from PyML.demo import pyml_test but all I got is that backtrace: Traceback (most recent call last): File "./test.py", line 2, in from PyML.demo import pyml_test File "/usr/src/PyML-0.7.2/PyML/__ini

Re: strip char from list of strings

2009-05-19 Thread Jeremiah Dodds
On Mon, May 18, 2009 at 8:30 PM, Laurent Luce wrote: > > I have the following list: > > [ 'test\n', test2\n', 'test3\n' ] > > I want to remove the '\n' from each string in place, what is the most > efficient way to do that ? > > Regards, > > Laurent > -- > http://mail.python.org/mailman/listinfo/p

Re: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-19 Thread Marco Mariani
Chris Rebert wrote: On the other hand there are developers who much prefer to keep things light-weight and simple. Would it be fair to say the first type tends to congregate in herds, particularly in corporate IT departments, while the latter tends to operate on a more individual basis? That

Re: strip char from list of strings

2009-05-19 Thread Piet van Oostrum
> Laurent Luce (LL) wrote: >LL> I have the following list: >LL> [ 'test\n', test2\n', 'test3\n' ] >LL> I want to remove the '\n' from each string in place, what is the >LL> most efficient way to do that ? I suppose you mean you have lists similar to the one given because with a list of 3

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-19 Thread Ben Finney
Gunter Henriksen writes: > If there is a function which triggers a one-shot switch, I like to > have a way to find out if it has already been triggered, I prefer to > have the function tell me if it triggered the switch or not, but I > would not want that to be by raising an exception. In this c

Re: Adding a Par construct to Python?

2009-05-19 Thread Steven D'Aprano
On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > Let me clarify what I think par, pmap, pfilter and preduce would mean > and how they would be implemented. [...] Just for fun, I've implemented a parallel-map function, and done a couple of tests. Comments, criticism and improvements welcome!

python3 module for dbus ?

2009-05-19 Thread Timothy Madden
Hello Sorry if this is not the right newsgroup for python modules, I found no other appropriate one. I would like to start a project in python and I think it would be good to start with python3.0, but I need tu use glib, dbus, wxWidgets and postgresql. Do you know if I can get dbus binding

Re: Adding a Par construct to Python?

2009-05-19 Thread Grant Edwards
On 2009-05-19, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > >> Let me clarify what I think par, pmap, pfilter and preduce would mean >> and how they would be implemented. > [...] > > Just for fun, I've implemented a parallel-map function, and done a couple > of te

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 19 May, 00:32, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > > However I *do* actually want to add syntax to the language. I think that > > 'par' makes sense as an official Python construct - we already have had > > this in the Occam programming language for twent

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 19 May, 03:31, Carl Banks wrote: > On May 18, 1:52 pm, jer...@martinfamily.freeserve.co.uk wrote: > > > As I understand it the reason for the GIL is to prevent problems with > > garbage collection in multi-threaded applications. > > Not really.  It's main purpose to prevent context switches fro

Best library to make XSLT 2.0 transformation

2009-05-19 Thread wdveloper
Hi there, I need to make xml transformation using XSLT 2.0 (since i want to use the powerful tag to produce multiple files). In your experience, which kind of library out there is better? Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-19 Thread MRAB
Duncan Booth wrote: Ben Finney wrote: MRAB writes: Gunter Henriksen wrote: If there is a function which triggers a one-shot switch, I like to have a way to find out if it has already been triggered, I prefer to have the function tell me if it triggered the switch or not, but I would not wa

Re: Best library to make XSLT 2.0 transformation

2009-05-19 Thread Diez B. Roggisch
wdveloper wrote: > Hi there, > > I need to make xml transformation using XSLT 2.0 (since i want to use > the powerful tag to produce multiple files). > In your experience, which kind of library out there is better? XSLT is a standard, so if you find a library that implements it, there shouldn't

Re: UDP reading on multiple sockets

2009-05-19 Thread Grant Edwards
On 2009-05-18, thomas.vo...@likeabird.de wrote: > On 17 Mai, 04:22, Grant Edwards wrote: >> On 2009-05-17, Thomas Vogel wrote: >> >> > I'm currently have the problem that I try to read UDP messages from >> > multiple sockets in parallel. So let's say I get UDP packets from the >> > same IP on th

Re: strip char from list of strings

2009-05-19 Thread Casey Webster
On May 18, 3:30 pm, Laurent Luce wrote: > I have the following list: > > [ 'test\n', test2\n', 'test3\n' ] > > I want to remove the '\n' from each string in place, what is the most > efficient way to do that ? > > Regards, > > Laurent Do you _really_ need to do this in place? If not, the simple

Re: Package problem

2009-05-19 Thread A. Cavallo
> > It is solved in other languages.. for example perl.. and delphi > I don't know much about perl, and even less about delphi, but I am > pretty sure it does not solve the problem of overwriting files from a > package with an installation outside the control of the package > manager. On a sytem a

Re: How can i use Spread Sheet as Data Store

2009-05-19 Thread D'Arcy J.M. Cain
On Tue, 19 May 2009 10:51:57 +0530 Kalyan Chakravarthy wrote: > Actually my requirement is > in an web application when user enters User name and Password, > back end i needs to check, is it they entered correct user name with > password ( here i want to read the Spread Sheet Data in Python code

Re: Package problem

2009-05-19 Thread Benjamin Kaplan
On Tue, May 19, 2009 at 2:45 AM, David Cournapeau wrote: > On Tue, May 19, 2009 at 2:35 PM, David Lyon > wrote: > > On Tue, 19 May 2009 13:53:18 +0900, David Cournapeau > > > wrote: > >> Given that nobody has managed to solve this problem, I doubt you will > >> find a solution. > > > > It is sol

Re: How to build Python 2.6.2 on HP-UX Itanium with thread support?

2009-05-19 Thread Aahz
In article , wrote: >Aahz: >> >> You probably want to start by figuring out which threading library is >> being used -- Python normally wants Posix threads, but IIRC, that's not >> the default on HP-UX, and you may need to fix the build process to use >> Posix. > >You're probably right, but I'm l

Re: UDP reading on multiple sockets

2009-05-19 Thread Jean-Paul Calderone
On Mon, 18 May 2009 06:19:01 -0700 (PDT), thomas.vo...@likeabird.de wrote: On 17 Mai, 04:22, Grant Edwards wrote: On 2009-05-17, Thomas Vogel wrote: > I'm currently have the problem that I try to read UDP messages from > multiple sockets in parallel. So let's say I get UDP packets from the >

PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
Hi, I have the following problem using python on windows. I crated a binary extension called pymsgque.dll on windows. The same extension works fine on UNIX/Linux. The problem is on Windows. The build is no problem but python is not able to load this extension with im

Re: identifying live hosts on a network

2009-05-19 Thread Aahz
In article <069f821d-1b73-4ed9-b298-09e7c0548...@p6g2000pre.googlegroups.com>, wrote: > >I am new to python and am having trouble coming up with a script that >idenifies all the live hosts on my network. First you need to define what constitutes a "live host". -- Aahz (a...@pythoncraft.com)

Re: Subversion commit from Python?

2009-05-19 Thread Jack Trades
On May 19, 3:46 am, Duncan Booth wrote: > Jack Trades wrote: > > Originally I had the 'data' directory in the same directory as the cgi > > scripts and was using os.system("svn commit"), however I kept running > > into weird bugs with this method.  So I moved the data directory out > > of the cgi

Re: Subversion commit from Python?

2009-05-19 Thread Jack Trades
On May 19, 3:53 am, Lawrence D'Oliveiro wrote: > In message > d9e205be7...@s31g2000vbp.googlegroups.com>, Jack Trades wrote: > > On May 19, 12:26 am, Lawrence D'Oliveiro > central.gen.new_zealand> wrote: > > >> In message <2904e7de-0a8d-4697-9c44- > > >> c83bb5319...@s31g2000vbp.googlegroups.com

Re: Adding a Par construct to Python?

2009-05-19 Thread Terry Reedy
jer...@martinfamily.freeserve.co.uk wrote: "In 1999 Greg Stein created a patch set for the interpreter that removed the GIL, but added granular locking around sensitive interpreter operations. This patch set had the direct effect of speeding up threaded execution, but made single threaded execut

Re: How can i use Spread Sheet as Data Store

2009-05-19 Thread Terry Reedy
D'Arcy J.M. Cain wrote: On Tue, 19 May 2009 10:51:57 +0530 Kalyan Chakravarthy wrote: Actually my requirement is in an web application when user enters User name and Password, back end i needs to check, is it they entered correct user name with password ( here i want to read the Spread Sheet Da

Re: How can i use Spread Sheet as Data Store

2009-05-19 Thread D'Arcy J.M. Cain
On Tue, 19 May 2009 09:50:18 -0400 Terry Reedy wrote: > D'Arcy J.M. Cain wrote: > > I can't answer your question about reading Google spreadsheets but I do > > wonder why you are trying to solve a database problem with a > > Hardly even a database problem. OP only needs a dict mapping username

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread MRAB
Andreas Otto wrote: Hi, I have the following problem using python on windows. I crated a binary extension called pymsgque.dll on windows. The same extension works fine on UNIX/Linux. The problem is on Windows. The build is no problem but python is not able to load this exte

Re: Annoying feedparser issues

2009-05-19 Thread J Kenneth King
John Nagle writes: > This really isn't the fault of the "feedparser" module, but it's > worth mentioning. > > I have an application which needs to read each new item from a feed > as it shows up, as efficiently as possible, because it's monitoring multiple > feeds. I want exactly one cop

Re: Package problem

2009-05-19 Thread David Lyon
On Tue, 19 May 2009 15:45:42 +0900, David Cournapeau wrote: > There is no simple solution to the following situation: >- install setuptools from ubuntu... When I have a ubuntu system I will try it > But still, the whole > value of ..(python).. is to have a whole set of packages which > a

pyparsing question: single word values with a double quoted string every once in a while

2009-05-19 Thread hubritic
I want to parse a log that has entries like this: [2009-03-17 07:28:05.545476 -0500] rprt s=d2bpr80d6 m=2 mod=mail cmd=msg module=access rule=x_dynamic_ip action=discard attachments=0 rcpts=1 routes=DL_UK_ALL,NOT_DL_UK_ALL,default_inbound,firewallsafe,mail01_mail02,spfsafe size=4363 guid=291f0f108

Re: Advanced Python books?

2009-05-19 Thread Mike Driscoll
On May 18, 3:04 pm, kj wrote: > I have read a couple of "learn Python"-type books, and now I'm > looking for some more advanced books on Python, something analogous > to "Effective Java" or "High-Order Perl".  I've only been able to > find "Advanced Python 3 Programming Techniques", which, as far

Re: Subversion commit from Python?

2009-05-19 Thread Diez B. Roggisch
Jack Trades wrote: > On May 19, 3:53 am, Lawrence D'Oliveiro central.gen.new_zealand> wrote: >> In message > >> d9e205be7...@s31g2000vbp.googlegroups.com>, Jack Trades wrote: >> > On May 19, 12:26 am, Lawrence D'Oliveiro > > central.gen.new_zealand> wrote: >> >> >> In message <2904e7de-0a8d-4697-

Re: identifying live hosts on a network

2009-05-19 Thread Matias Surdi
hunteroakes...@gmail.com escribió: HI I am new to python and am having trouble coming up with a script that idenifies all the live hosts on my network. thanks Hunter I've done this in the past with the great help of nmap: # nmap -sP 192.168.0.0/23 this will find hosts "alive" from 192.168.0.

Re: strip char from list of strings

2009-05-19 Thread Laurent Luce
I had a simple loop stripping each string but I was looking for something concise and efficient. I like the following answer: x = [s.rstrip('\n') for s in x] David Stanek wrote: > On Mon, May 18, 2009 at 3:30 PM, Laurent Luce wrote: >> I have the following list: >> >> [ 'test\n', test2\n', 'test3

Re: strip char from list of strings

2009-05-19 Thread Laurent Luce
Thanks Casey. I like your solution. Casey Webster wrote: > On May 18, 3:30 pm, Laurent Luce wrote: >> I have the following list: >> >> [ 'test\n', test2\n', 'test3\n' ] >> >> I want to remove the '\n' from each string in place, what is the most >> efficient way to do that ? >> >> Regards, >> >>

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
MRAB wrote: > Andreas Otto wrote: >> Hi, >> >> I have the following problem using python on windows. >> I crated a binary extension called >> >> pymsgque.dll >> >> on windows. The same extension works fine on UNIX/Linux. >> >> The problem is on Windows. The build is no problem

Re: Conceptual flaw in pxdom?

2009-05-19 Thread Emanuele D'Arrigo
On May 19, 6:50 am, Stefan Behnel wrote: > It's pretty easy to write unmaintainable code that uses the DOM API, though. I'm finding that at my own expenses... Why would anybody want to use the DOM? I suppose the main reason is that it is one of the most reliable standards around. It might be mor

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Christian Heimes
Andreas Otto wrote: > 1. on LINUX I create a "pymsgque.so" and I can load this library > with "import pymsgque" > > 2. in WINDOWS, I expect to create a "pymsgque.dll" and do the > same as on unix "import pymgque" > > -> is this behaviour is supported or not ??? > >

I was able to use pyInstaller as a python library

2009-05-19 Thread 鎌土記良
Hello, Everyone. I was able to use pyInstaller as a python library http://moco.sakura.ne.jp/pyInstaller.zip and This library test code is available in http://moco.sakura.ne.jp/pyi_test.zip This library implements only a function to output windows binary. and I don't add the change to the conte

how to get the spesific line of the text in the clipboard

2009-05-19 Thread zhouhaifeng
I want to get the eighth line in the text of the text in the clipboad, but when I call GetClipboardData I only get a string, how can I repair it? thanks a lot. My code is here : try: win32clipboard.OpenClipboard(hWnd) #win32api.Sleep(500) text = win32

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Scott David Daniels
Andreas Otto wrote: Does this help? http://pyfaq.infogami.com/is-a-pyd-file-the-same-as-a-dll this link is nice but I'm still confused ... 1. on LINUX I create a "pymsgque.so" and I can load this library with "import pymsgque" And my bathroom is covered in wallpaper. 2. in WIN

Re: Package problem

2009-05-19 Thread David Cournapeau
On Tue, May 19, 2009 at 9:29 PM, A. Cavallo wrote: >> > It is solved in other languages.. for example perl.. and delphi >> I don't know much about perl, and even less about delphi, but I am >> pretty sure it does not solve the problem of overwriting files from a >> package with an installation out

Re: Advanced Python books?

2009-05-19 Thread Thomas Guettler
kj schrieb: > I have read a couple of "learn Python"-type books, and now I'm > looking for some more advanced books on Python, ... > Basically I'm looking for a book that assumes that one has the > basics of the language down, and instead focuses on standard problems > of software development, such

Re: Conceptual flaw in pxdom?

2009-05-19 Thread Peter Otten
Emanuele D'Arrigo wrote: > This is all good and dandy and it works, mostly. However, if you look > at the code below for the method __getattr__, it appears to be > attempting to prevent direct access to -any- variable starting with an > underscore. > > def __getattr__(self, key): > if

Re: Which C compiler?

2009-05-19 Thread Jorgen Grahn
On Mon, 18 May 2009 15:47:41 -0700, norseman wrote: > I suspect that if all python users were in the same room and the > question "Are you NOT happy with python's upgrade requirements?" was > asked you would find most hands in the air. I have said it before - the > current attitude of 'new me

Re: how to get the spesific line of the text in the clipboard

2009-05-19 Thread MRAB
zhouhaifeng wrote: I want to get the eighth line in the text of the text in the clipboad, but when I call GetClipboardData I only get a string, how can I repair it? thanks a lot. My code is here : try: win32clipboard.OpenClipboard(hWnd) #win32api.Sleep(500)

Re: UDP reading on multiple sockets

2009-05-19 Thread Steve Howell
On May 18, 6:19 am, thomas.vo...@likeabird.de wrote: > On 17 Mai, 04:22, Grant Edwards wrote: > > > On 2009-05-17, Thomas Vogel wrote: > > > > I'm currently have the problem that I try to read UDP messages from > > > multiple sockets in parallel. So let's say I get UDP packets from the > > > same

Re: strip char from list of strings

2009-05-19 Thread Jorgen Grahn
On Tue, 19 May 2009 10:25:35 +0200, Piet van Oostrum wrote: >> Laurent Luce (LL) wrote: > >>LL> I have the following list: > >>LL> [ 'test\n', test2\n', 'test3\n' ] > >>LL> I want to remove the '\n' from each string in place, what is the >>LL> most efficient way to do that ? > > I suppose yo

Re: Conceptual flaw in pxdom?

2009-05-19 Thread Diez B. Roggisch
Emanuele D'Arrigo wrote: > On May 19, 6:50 am, Stefan Behnel wrote: >> It's pretty easy to write unmaintainable code that uses the DOM API, >> though. > > I'm finding that at my own expenses... > > Why would anybody want to use the DOM? I suppose the main reason is > that it is one of the most

Re: how to get the spesific line of the text in the clipboard

2009-05-19 Thread Tim Chase
I want to get the eighth line in the text of the text in the clipboad, but when I call GetClipboardData I only get a string, how can I repair it? [snip] Split the string into lines and take the eighth line (at index 7). I've limited the number of splits to 8 because I'm not interested in any o

Re: DOM implementation

2009-05-19 Thread Emanuele D'Arrigo
Hello Paul, sorry for the long delay, I was trying to wrap my mind around DOM and Events implementations... On May 15, 7:08 pm, Paul Boddie wrote: > Another implementation is probably a good thing, though, since I don't > trust my own interpretation of the specifications. ;-) Tell me about it. I

Re: how to get the spesific line of the text in the clipboard

2009-05-19 Thread MRAB
Tim Chase wrote: I want to get the eighth line in the text of the text in the clipboad, but when I call GetClipboardData I only get a string, how can I repair it? [snip] Split the string into lines and take the eighth line (at index 7). I've limited the number of splits to 8 because I'm not i

Re: Best library to make XSLT 2.0 transformation

2009-05-19 Thread John Krukoff
On Tue, 2009-05-19 at 13:42 +0200, Diez B. Roggisch wrote: > wdveloper wrote: > > > Hi there, > > > > I need to make xml transformation using XSLT 2.0 (since i want to use > > the powerful tag to produce multiple files). > > In your experience, which kind of library out there is better? > > XSL

Re: UDP reading on multiple sockets

2009-05-19 Thread Gabriel Rossetti
thomas.vo...@likeabird.de wrote: On 17 Mai, 04:22, Grant Edwards wrote: On 2009-05-17, Thomas Vogel wrote: I'm currently have the problem that I try to read UDP messages from multiple sockets in parallel. So let's say I get UDP packets from the same IP on the ports 2000, 2001, 2002,.

Re: Which C compiler?

2009-05-19 Thread norseman
Jorgen Grahn wrote: On Mon, 18 May 2009 15:47:41 -0700, norseman wrote: I suspect that if all python users were in the same room and the question "Are you NOT happy with python's upgrade requirements?" was asked you would find most hands in the air. I have said it before - the current attit

Re: python3 module for dbus ?

2009-05-19 Thread Aahz
In article <4a1281ef$0$90271$14726...@news.sunsite.dk>, Timothy Madden wrote: > >Sorry if this is not the right newsgroup for python modules, I found no >other appropriate one. You're in the right place! >I would like to start a project in python and I think it would be good >to start with py

Re: Question about locals()

2009-05-19 Thread Gökhan SEVER
Thank you all for great explanation on this subject. Maybe a few sentences from these conversations could be added to locals() documentation. I will make double sure myself while using locals() to end up with valid identifiers. Gökhan On Tue, May 19, 2009 at 1:06 AM, Steven D'Aprano < ste...@re

Re: Best library to make XSLT 2.0 transformation

2009-05-19 Thread Stefan Behnel
wdveloper wrote: > I need to make xml transformation using XSLT 2.0 (since i want to use > the powerful tag to produce multiple files). > In your experience, which kind of library out there is better? I'm not aware of a Python library that implements XSLT 2.0, although you might want to look arou

Performance java vs. python

2009-05-19 Thread Mohan Parthasarathy
On Mon, May 18, 2009 at 5:56 AM, Aahz wrote: > In article , > Ulrich Eckhardt wrote: > >Steve Ferg wrote: > >> > >> On the one hand, there are developers who love big IDEs with lots of > >> features (code generation, error checking, etc.), and rely on them to > >> provide the high level of supp

Import and absolute file names, sys.path including ''... or not

2009-05-19 Thread Jean-Michel Pichavant
Hi fellows, I spent quite a time on a malicious issue. I found out that there is a slight difference on the sys.path content when either executing code from a shell or from within a script. This difference is the '' item, which is present in the shell form of sys.path. For instance, let's wr

Re: Performance java vs. python

2009-05-19 Thread Daniel Fetchinson
>> >> On the one hand, there are developers who love big IDEs with lots of >> >> features (code generation, error checking, etc.), and rely on them to >> >> provide the high level of support needed to be reasonably productive >> >> in heavy-weight languages (e.g. Java). >> >> >> >> On the other han

Python, Tkinter and popen problem

2009-05-19 Thread norseman
r received. This is a case of Python running a Python program that contains Tkinter. So what is going on and what can I do? I want the master to echo the slave's print statements and the slave get the 'continue' character so it will. Today is: 20090519 Versions noted above. Steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Performance java vs. python

2009-05-19 Thread Krishnakant
On Tue, 2009-05-19 at 10:42 -0700, Daniel Fetchinson wrote: > Benchmarks always test for a given feature. The available benchmarks > will most likely not test the feature relevant for your particular > application simply because there are about a gazillion different ways > of using a web framework.

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 19 May, 10:24, Steven D'Aprano wrote: > On Mon, 18 May 2009 02:27:06 -0700, jeremy wrote: > > Let me clarify what I think par, pmap, pfilter and preduce would mean > > and how they would be implemented. > > [...] > > Just for fun, I've implemented a parallel-map function, and done a couple > of

Re: Adding a Par construct to Python?

2009-05-19 Thread jeremy
On 17 May, 13:37, jer...@martinfamily.freeserve.co.uk wrote: > On 17 May, 13:05, jer...@martinfamily.freeserve.co.uk wrote:> From a user > point of view I think that adding a 'par' construct to > > Python for parallel loops would add a lot of power and simplicity, > > e.g. > > > par i in list: > >

Re: Adding a Par construct to Python?

2009-05-19 Thread Diez B. Roggisch
Hi Steven, I am impressed by this - it shows the potential speedup that pmap could give. Although the GIL would be a problem as things for speed up of pure Python code. Do Jython and Iron Python include the threading module? Jython does, and AFAIK IronPython also. Jython also has no GIL I thi

Re: Best library to make XSLT 2.0 transformation

2009-05-19 Thread Diez B. Roggisch
John Krukoff schrieb: On Tue, 2009-05-19 at 13:42 +0200, Diez B. Roggisch wrote: wdveloper wrote: Hi there, I need to make xml transformation using XSLT 2.0 (since i want to use the powerful tag to produce multiple files). In your experience, which kind of library out there is better? XSLT

Re: Performance java vs. python

2009-05-19 Thread Mohan Parthasarathy
On Tue, May 19, 2009 at 10:42 AM, Daniel Fetchinson < fetchin...@googlemail.com> wrote: > >> >> On the one hand, there are developers who love big IDEs with lots of > >> >> features (code generation, error checking, etc.), and rely on them to > >> >> provide the high level of support needed to be

Re: Performance java vs. python

2009-05-19 Thread CTO
> Ah! I should have been careful before asking such "general" question about > performance. I agree with you. But mine was more academic. I should not given > a specific example. > > AFAIK, for java on the client side, JVM performance is one of the critical > things which has been tuned to death

package with executable

2009-05-19 Thread Stefano Costa
Hi, my name is Stefano Costa, I am an archaeologist and I am developing GNUCal, a radiocarbon calibration program released under the GNU GPL. [1][2] Currently the program consists of a small "library", largely based on Matplotlib and Numpy, and a command line program. My goal is to create a distri

Mock Form Post

2009-05-19 Thread Scooter
Let me qualify this by saying I'm very new to python. I'm doing some work with mod_python and in a function I have defined I am passing in the form and then iterating through the form keys. I'm currently writing my unit tests and I'm trying to mock up a form object with kids so I can emulate my tru

Re: Adding a Par construct to Python?

2009-05-19 Thread Adam Olsen
On May 19, 5:05 am, jer...@martinfamily.freeserve.co.uk wrote: > Thanks for explaining a few things to me. So it would seem that > replacing the GIL with something which allows better scalability of > multi-threaded applications, would be very complicated. The paper by > Jesse Nolle which I referen

Re: package with executable

2009-05-19 Thread Jeff McNeil
On May 19, 2:54 pm, Stefano Costa wrote: > Hi, > my name is Stefano Costa, I am an archaeologist and I am developing > GNUCal, a radiocarbon calibration program released under the GNU GPL. > [1][2] > > Currently the program consists of a small "library", largely based on > Matplotlib and Numpy, an

Re: Mock Form Post

2009-05-19 Thread Scooter
On May 19, 3:40 pm, Scooter wrote: > Let me qualify this by saying I'm very new to python. I'm doing some > work with mod_python and in a function I have defined I am passing in > the form and then iterating through the form keys. I'm currently > writing my unit tests and I'm trying to mock up a f

optparse options

2009-05-19 Thread icarus
Why do I need to put two options for this script to print the path? if I just specify the option and argument... $ python

Re: Advanced Python books?

2009-05-19 Thread James Matthews
I found Core Python Programming to cater to my needs as a Pro book. On Tue, May 19, 2009 at 6:48 PM, Thomas Guettler wrote: > kj schrieb: > > I have read a couple of "learn Python"-type books, and now I'm > > looking for some more advanced books on Python, > ... > > Basically I'm looking for a b

Re: Is there a better way to chose a slice of a list?

2009-05-19 Thread walterbyrd
On May 8, 5:55 pm, John Yeung wrote: > On May 8, 3:03 pm,walterbyrd wrote: > > > This works, but it seems like there should be a better way. > > > -- > > week = ['sun','mon','tue','wed','thu','fri','sat'] > > for day in week[week.index('tue'):week.index('fri')]: > >    print day > > --

Re: Performance java vs. python

2009-05-19 Thread namekuseijin
someone said: If you took a look at Java, you would notice that the core language syntax is much simpler than Python's. thanks for the laughs whoever you are! -- a game sig: http://tinyurl.com/d3rxz9 -- http://mail.python.org/mailman/listinfo/python-list

Re: Conceptual flaw in pxdom?

2009-05-19 Thread Paul Boddie
On 19 Mai, 18:16, "Diez B. Roggisch" wrote: > > Sorry to say so, but that's nonsense. DOM is not complicated because it > contains anything superior - the reason (if any) is that it is formulated > as language-agnostic as possible, with the unfortunate result it is rather > clumsy to use in all la

Re: optparse options

2009-05-19 Thread Robert Kern
On 2009-05-19 16:07, icarus wrote: Why do I need to put two options for this script to print the path? if I just specify the option and argument... $ python

Re: Performance java vs. python

2009-05-19 Thread David Stanek
On Tue, May 19, 2009 at 5:43 PM, namekuseijin wrote: > someone said: > > If you took a look at Java, you would > notice that the core language syntax is much simpler than Python's. > > thanks for the laughs whoever you are! > I'm no Java fan, but I do agree that the core language is a

Re: Context manager, atexit processing, and PEP 3143 DaemonContext.close

2009-05-19 Thread Gunter Henriksen
> > If there is a function which triggers a one-shot switch, I like > > to have a way to find out if it has already been triggered, I > > prefer to have the function tell me if it triggered the switch > > or not, but I would not want that to be by raising an exception. > > In this case, though, we'

Re: Mock Form Post

2009-05-19 Thread Diez B. Roggisch
Scooter schrieb: On May 19, 3:40 pm, Scooter wrote: Let me qualify this by saying I'm very new to python. I'm doing some work with mod_python and in a function I have defined I am passing in the form and then iterating through the form keys. I'm currently writing my unit tests and I'm trying to

Re: Performance java vs. python

2009-05-19 Thread Chris Rebert
On Tue, May 19, 2009 at 3:21 PM, David Stanek wrote: > On Tue, May 19, 2009 at 5:43 PM, namekuseijin wrote: >> someone said: >> >> If you took a look at Java, you would >> notice that the core language syntax is much simpler than Python's. >> >> thanks for the laughs whoever you are!

Re: Package problem

2009-05-19 Thread David Lyon
On Wed, 20 May 2009 00:40:28 +0900, David Cournapeau wrote: > The discussion has nothing to do with setuptools, or even python for > that matter. It has everything to do with python > on any system (including windows). That's why you should avoid > installing from sources into the location

Re: Performance java vs. python

2009-05-19 Thread Gunter Henriksen
My experience has been that if the execution stays inside the VM, then for a "server side" application, the JVM is faster, and proportionally even faster when there are more threads ready to do something. When the VM has to do a lot of interaction with the OS, then I think it is difficult to make

Re: issue: Permissions in odfpy

2009-05-19 Thread Philipp Hagemeister
Hi Shruti, your message is kind of hard to read. Please note the following: · Do not put useless junk("issue") in title. · Multiple exclamation marks convey a sure sign of a diseased mind, especially syntactically interesting constructions such as "??.." · You didn't purchase your keyboard in Aug

  1   2   >