Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message <77fv7jf1h44c...@mid.uni-berlin.de>, Diez B. Roggisch wrote: > I have had many troubles with SVN + permissions. I create a custom captive user to own write access to the repository, with access only to keys belonging to authorized users via svn+ssh. Problem solved. -- http://mail.p

Re: Subversion commit from Python?

2009-05-19 Thread Lawrence D'Oliveiro
In message <5f7f9840-0e17-48fb-acf9-04186fb1b...@r3g2000vbp.googlegroups.com>, Jack Trades wrote: > On May 19, 3:53 am, Lawrence D'Oliveiro > wrote: > >> Possibly your CGI scripts are running as some user like "nobody", which >> doesn't have the right access to the files/directories. Changing A

Re: Python mail truncate problem

2009-05-19 Thread Tim Roberts
David wrote: > >I am writing Python script to process e-mails in a user's mail >account. What I want to do is to update that e-mail's Status to 'R' >after processing it, however, the following script truncates old e- >mails even though it updates that e-mail's Status correctly. Anybody >knows how

Re: distutils and building an distribution that includes other packages

2009-05-19 Thread Paul Hemans
On May 20, 3:01 pm, Chris Rebert wrote: > > "Chris Rebert" wrote in message > >news:mailman.426.1242792992.8015.python-l...@python.org... > >> On Tue, May 19, 2009 at 8:55 PM, Paul Hemans wrote: > >>> Hi, > >>> I am new to Python, and after a lot of sweat and tears, I have my first > >>> app. >

Re: package with executable

2009-05-19 Thread A. Cavallo
Hi, > Matplotlib and Numpy, and a command line program. My goal is to create a > distributable package, that should ideally contain both the "gnucal" > package and the command line program. > * where should the executable module be wrt setup.py and/or the > package directory in the s

Re: Adding a Par construct to Python?

2009-05-19 Thread Steven D'Aprano
On Tue, 19 May 2009 21:41:08 -0700, Aaron Brady wrote: > On May 19, 11:20 pm, Paul Rubin wrote: >> Steven D'Aprano writes: >> > (4) the caller is responsible for making sure he never shares data >> > while looping over it. >> >> > I don't think I've missed any possi

How to get Form values in Python code and Send Email

2009-05-19 Thread Kalyan Chakravarthy
Hi All, I have one doubt, I have feedback form (HTML Page) in one website user enters all the details and after submitting the page, in back end Python class i want to get all those data and send to one email id. for this please any one can guide me how to do it in Python( how to get HTML fo

Re: Conceptual flaw in pxdom?

2009-05-19 Thread Damien Neil
"Diez B. Roggisch" wrote: > APIs such as ElementTree don't try to burden themselves with the > language-agnosticism, and thus are much more powerful. Having used both ElementTree and xml.dom, I don't see that ET is any more powerful. Both APIs let you manipulate an XML tree in pretty much any

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

2009-05-19 Thread Joshua Judson Rosen
Ulrich Eckhardt writes: > > That said, an IDE that provides auto-completion (e.g. that gives you a list > of available class members) is a good thing in Java, because you don't have > to browse the documentation as often. While I find at least some types of autocompletion to be laudable features

Re: distutils and building an distribution that includes other packages

2009-05-19 Thread Chris Rebert
> "Chris Rebert" wrote in message > news:mailman.426.1242792992.8015.python-l...@python.org... >> On Tue, May 19, 2009 at 8:55 PM, Paul Hemans wrote: >>> Hi, >>> I am new to Python, and after a lot of sweat and tears, I have my first >>> app. >>> Now I need to deploy it to end-users. The applicat

Re: Adding a Par construct to Python?

2009-05-19 Thread Aaron Brady
On May 19, 11:20 pm, Paul Rubin wrote: > Steven D'Aprano writes: > > (4) the caller is responsible for making sure he never shares data while > > looping over it. > > > I don't think I've missed any possibilities. You have to pick one of > > those four. > > I wonder

Re: distutils and building an distribution that includes other packages

2009-05-19 Thread Paul Hemans
Hi Chris, Yes I do intend to use py2exe for windows installation but I don't understand how it will help me distribute lxml and sqlAlchemy as part of the install, or am I missing something? "Chris Rebert" wrote in message news:mailman.426.1242792992.8015.python-l...@python.org... > On Tue, May

Re: Adding a Par construct to Python?

2009-05-19 Thread Paul Rubin
Steven D'Aprano writes: > (4) the caller is responsible for making sure he never shares data while > looping over it. > > I don't think I've missed any possibilities. You have to pick one of > those four. I wonder if the compiler can check that a given function doesn't change any data. Then:

Re: distutils and building an distribution that includes other packages

2009-05-19 Thread Chris Rebert
On Tue, May 19, 2009 at 8:55 PM, Paul Hemans wrote: > Hi, > I am new to Python, and after a lot of sweat and tears, I have my first app. > Now I need to deploy it to end-users. The application includes the use of > lxml and sqlAlchemy so I need those to install automatically as part of the > insta

distutils and building an distribution that includes other packages

2009-05-19 Thread Paul Hemans
Hi, I am new to Python, and after a lot of sweat and tears, I have my first app. Now I need to deploy it to end-users. The application includes the use of lxml and sqlAlchemy so I need those to install automatically as part of the installation process. I really don't want the users having to dow

Re: Adding a Par construct to Python?

2009-05-19 Thread Steven D'Aprano
On Tue, 19 May 2009 05:52:04 -0500, Grant Edwards wrote: > 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,

Re: strip char from list of strings

2009-05-19 Thread alex23
On May 20, 12:55 am, Laurent Luce wrote: > 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] Your initial requirement stated that you needed this to happen in- place. What you're doing

Re: Adding a Par construct to Python?

2009-05-19 Thread Steven D'Aprano
On Tue, 19 May 2009 03:57:43 -0700, jeremy wrote: >> you want it so simple to use that amateurs can mechanically replace >> 'for' with 'par' in their code and everything will Just Work, no effort >> or thought required. > > Yes I do want the par construction to be simple, but of course you can't

Re: How can i use Spread Sheet as Data Store

2009-05-19 Thread alex23
On May 19, 11:57 pm, "D'Arcy J.M. Cain" wrote: > I hear you but I'm not so sure that that is an absolute.  There are > many applications that allow you to have your password emailed to you. > For something with low risk that's perfectly acceptable. Having -any- password stored in plaintext is una

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

2009-05-19 Thread Steven D'Aprano
On Tue, 19 May 2009 14:38:19 -0700, walterbyrd wrote: > 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 >> > we

Re: sqlite3, qmarks, and NULL values

2009-05-19 Thread John Machin
On May 20, 10:54 am, MRAB wrote: > Mitchell L Model wrote: > > Suppose I have a simple query in sqlite3 in a function: > > >     def lookupxy(x, y): > >         conn.execute("SELECT * FROM table WHERE COL1 = ? AND COL2 = ?", > >                      (x, y)) > > > However, COL2 might be NULL. I can

Re: sqlite3, qmarks, and NULL values

2009-05-19 Thread MRAB
Mitchell L Model wrote: Suppose I have a simple query in sqlite3 in a function: def lookupxy(x, y): conn.execute("SELECT * FROM table WHERE COL1 = ? AND COL2 = ?", (x, y)) However, COL2 might be NULL. I can't figure out a value for y that would retrieve rows fo

Re: Adding a Par construct to Python?

2009-05-19 Thread Aaron Brady
On May 17, 7:05 am, 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: >     updatePartition(i) > > There would be no locking and it would be t

sqlite3, qmarks, and NULL values

2009-05-19 Thread Mitchell L Model
Suppose I have a simple query in sqlite3 in a function: def lookupxy(x, y): conn.execute("SELECT * FROM table WHERE COL1 = ? AND COL2 = ?", (x, y)) However, COL2 might be NULL. I can't figure out a value for y that would retrieve rows for which COL2 is NULL. It s

Re: package with executable

2009-05-19 Thread MRAB
Ben Finney wrote: Stefano Costa writes: 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] That is a great use of Python, and sounds like interesting work. I would highly recommend you change the n

Re: Package problem

2009-05-19 Thread David Lyon
On Tue, 19 May 2009 13:29:47 +0100, "A. Cavallo" wrote: > You could try: > > http://download.opensuse.org/repositories/home:/cavallo71:/python-opt/ > > This is a python interpreter installed under /opt/opt-python-2.7a0. > All you have to do is sourcing /opt/opt-python-2.7a0/opt-python-env.sh > f

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

2009-05-19 Thread John Machin
On May 20, 7:38 am, walterbyrd wrote: > 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. > > > > -- > > > --- > > > I think you should provide much more information, primarily

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

2009-05-19 Thread Ben Finney
walterbyrd writes: > On May 8, 5:55 pm, John Yeung wrote: > > On May 8, 3:03 pm,walterbyrd wrote: > > I think you should provide much more information, primarily why you > > want to do this.  What is the larger goal you are trying to achieve? > > I am just looking for a less verbose, more elega

Re: package with executable

2009-05-19 Thread Ben Finney
Stefano Costa writes: > 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] That is a great use of Python, and sounds like interesting work. I would highly recommend you change the name, though. Yo

Re: optparse options

2009-05-19 Thread Ben Finney
icarus writes: > parser = optparse.OptionParser(usage="%prog [-p dir] [--part=dir] ", > version="%prog 1.0") > > parser.add_option( "-p", "--part", dest="directory", > help="process target directory", metavar="dir") > (options, args) = parser.parse_args(

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

2009-05-19 Thread Rhodri James
On Tue, 19 May 2009 22:38:19 +0100, walterbyrd wrote: 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('

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

2009-05-19 Thread Terry Reedy
walterbyrd wrote: 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: Seeking old post on developers who like IDEs vs developers who like simple languages

2009-05-19 Thread Colin J. Williams
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 support needed to be reasonably productive in heavy-weight languages (e.g. Java). On the

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >