Error when installing the Python Imaging Library

2006-11-28 Thread Tim Adler
Hey everybody, I'm quite new to Python. I'm working on a webproject with Django and need to install the Python Imaging Library. It worked fine under Mac OS but when I try it on my Linux server. It gives me this error: PasteBin Link: http://phpfi.com/179314 I don't really know what is wrong. Can

Re: Error when installing the Python Imaging Library

2006-11-28 Thread Fredrik Lundh
Tim Adler wrote: > I'm quite new to Python. I'm working on a webproject with Django and > need to install the Python Imaging Library. It worked fine under Mac OS > but when I try it on my Linux server. It gives me this error: > > PasteBin Link: http://phpfi.com/179314 > > I don't really know wha

Re: How to increase the speed of this program?

2006-11-28 Thread Paul McGuire
"HYRY" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I want to join two mono wave file to a stereo wave file by only using > the default python module. > Here is my program, but it is much slower than the C version, so how > can I increase the speed? > I think the problem is at line

Re: Error when installing the Python Imaging Library

2006-11-28 Thread Tim Adler
Thx, I got it. I installed PIL through the automatic install tool. Which resolved some dependencies. Fredrik Lundh schrieb: > Tim Adler wrote: > > > I'm quite new to Python. I'm working on a webproject with Django and > > need to install the Python Imaging Library. It worked fine under Mac OS > >

Libgmail

2006-11-28 Thread linuxfreak
hi guys, just starting out on python and libgmail... any documentation for libgmail outthere... basically what i want to do is develop an application to use gmail like and ftp server... should be able to upload files and download them as well thanks -- http://mail.python.org/mailman/listin

Re: Using SimpleXMLRPCServer in a Windows Service

2006-11-28 Thread Rudy Schockaert
I found the problem. Actually both pieces of code work now. The problem was that when I run the SimpleXMLRPCService in a Windows Service, the STDERR needs to be redirected to a real file. I guess some kind of buffer overflow occurs when you don't do this. I added the following lines: def SvcStop

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
HYRY wrote: > I want to join two mono wave file to a stereo wave file by only using > the default python module. > Here is my program, but it is much slower than the C version, so how > can I increase the speed? > I think the problem is at line #1, #2, #3. > oarray = array.array("h", [0]*(len(lar

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
HYRY wrote: > I want to join two mono wave file to a stereo wave file by only using > the default python module. > Here is my program, but it is much slower than the C version, so how > can I increase the speed? > I think the problem is at line #1, #2, #3. > oarray = array.array("h", [0]*(len(lar

Re: How to increase the speed of this program?

2006-11-28 Thread HYRY
I think oarray = array.array("h", [0]*(len(larray)+len(rarray))) #1 oarray[0::2] = larray#2 oarray[1::2] = rarray#3 will be executed at C level, but if I use itertools, the program is executed at Python level. So the itertools

Accessing file metadata on windows XP

2006-11-28 Thread wileyregister22
When rightclicking a, for example, pdf file on windows, one normally gets a screen with three or four tags. Clicking on one of the summary tag one can get some info like "title", "Author", "category", "keyword" etc.. My question is how can I programmatically read and change these data with python

Re: How to increase the speed of this program?

2006-11-28 Thread HYRY
Peter Otten wrote: > HYRY wrote: > > > I want to join two mono wave file to a stereo wave file by only using > > the default python module. > > Here is my program, but it is much slower than the C version, so how > > can I increase the speed? > > I think the problem is at line #1, #2, #3. > > > oa

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
Peter Otten wrote: > HYRY wrote: > >> I want to join two mono wave file to a stereo wave file by only using >> the default python module. >> Here is my program, but it is much slower than the C version, so how >> can I increase the speed? >> I think the problem is at line #1, #2, #3. > >> oarray

Re: Python script and C++

2006-11-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Ravi Teja wrote: >> I am new to python and currently I am working on a traffic simulation >> which I plan to define the various agents using scripting. It's kind of like >> scripting for non-playable character in games. I am thinking of using python >> for this but I a

Re: Calling a thread asynchronously with a callback

2006-11-28 Thread Duncan Booth
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Edwin Gomez wrote: > >> I'm a C# developer and I'm new to Python. I would like to know if >> the concept of Asynchronous call-backs exists in Python. Basically >> what I mean is that I dispatch a thread and when the thread completes >> it invokes

Re: "fork and exit" needed?

2006-11-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Vincent Delporte wrote: > Anyone knows if those lines are necessary, why, and what their > alternative is in Python? > > --- > open STDOUT, '>/dev/null'; sys.stdout = open(os.devnull, 'w') Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/li

Re: Libgmail

2006-11-28 Thread Jussi Salmela
linuxfreak wrote: > hi guys, > > just starting out on python and libgmail... any documentation for > libgmail outthere... basically what i want to do is develop an > application to use gmail like and ftp server... should be able to > upload files and download them as well > > thanks > My b

Re: Libgmail

2006-11-28 Thread linuxfreak
Funny enough I find the same "Google" in my browser too. and if my memory serves me correct I did the same search which you allude to. It is only after series of exhaustive searches rummaging through websites with incomplete (or non existent ) docs that i posed the question here :) thanks for

Re: How to increase the speed of this program?

2006-11-28 Thread Leo Kislov
Peter Otten wrote: > Peter Otten wrote: > > > HYRY wrote: > > > >> I want to join two mono wave file to a stereo wave file by only using > >> the default python module. > >> Here is my program, but it is much slower than the C version, so how > >> can I increase the speed? > >> I think the problem

Re: screen output problem

2006-11-28 Thread Ritesh Raj Sarraf
On Sunday 26 November 2006 13:07, Calvin Spealman wrote: > Take a look at this: > http://cheeseshop.python.org/pypi/progressbar Hi, Sorry for being a little late in replying. The progressbar implementation is excellent but it has the same problems that the current progressbar implementation I u

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
Leo Kislov wrote: > > Peter Otten wrote: >> Peter Otten wrote: >> >> > HYRY wrote: >> > >> >> I want to join two mono wave file to a stereo wave file by only using >> >> the default python module. >> >> Here is my program, but it is much slower than the C version, so how >> >> can I increase the

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
Peter Otten wrote: > Leo Kislov wrote: > >> >> Peter Otten wrote: >>> Peter Otten wrote: >>> >>> > HYRY wrote: >>> > >>> >> I want to join two mono wave file to a stereo wave file by only using >>> >> the default python module. >>> >> Here is my program, but it is much slower than the C version,

RE: Accessing file metadata on windows XP

2006-11-28 Thread Tim Golden
[EMAIL PROTECTED] | When rightclicking a, for example, pdf file on windows, one normally | gets a screen with three or four tags. Clicking on one of the summary | tag one can get some info like "title", "Author", "category", | "keyword" | etc.. [warning: not my area of expertise] That informat

Re: "fork and exit" needed?

2006-11-28 Thread Nick Craig-Wood
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Vincent Delporte wrote: > > > Anyone knows if those lines are necessary, why, and what their > > alternative is in Python? > > > > open STDOUT, '>/dev/null'; > > sys.stdout = open(os.devnull, 'w') This doesn't hav

Modifying every alternate element of a sequence

2006-11-28 Thread [EMAIL PROTECTED]
I have a list of numbers and I want to build another list with every second element multiplied by -1. input = [1,2,3,4,5,6] wanted = [1,-2,3,-4,5,-6] I can implement it like this: input = range(3,12) wanted = [] for (i,v) in enumerate(input): if i%2 == 0: wanted.append(v) else:

How to secure your network

2006-11-28 Thread akhtar
How to secure your network Check this article to know how a network analyzer continuously monitors traffic on network and provides detailed information about critical problems, virus attacks and even generates traffic to stress test your network http://www.network-analyzer.blogspot.com -- http://

HTML Table-of-Content Extraction Script

2006-11-28 Thread robert
I'm looking for a function which extracts a table of contents of HTML file(s) from ... and possibly auto-creates the ancors. Maybe something already exists? Robert -- http://mail.python.org/mailman/listinfo/python-list

RE: Accessing file metadata on windows XP

2006-11-28 Thread Tim Golden
[Dennis Lee Bieber] | > When rightclicking a, for example, pdf file on windows, one normally | > gets a screen with three or four tags. Clicking on one of | the summary | > tag one can get some info like "title", "Author", | "category", "keyword" | > etc.. | > | Doesn't for me... Right-clicking

RE: Accessing file metadata on windows XP

2006-11-28 Thread Tim Golden
[EMAIL PROTECTED] | When rightclicking a, for example, pdf file on windows, one normally | gets a screen with three or four tags. Clicking on one of the summary | tag one can get some info like "title", "Author", "category", | "keyword" | etc.. This (Delphi) article is about the most informativ

Re: How to increase the speed of this program?

2006-11-28 Thread Leo Kislov
HYRY wrote: > Peter Otten wrote: > > HYRY wrote: > > > > > I want to join two mono wave file to a stereo wave file by only using > > > the default python module. > > > Here is my program, but it is much slower than the C version, so how > > > can I increase the speed? > > > I think the problem is a

Reading GDSII layouts

2006-11-28 Thread Vincent Arnoux
Hello, I am looking for a library for reading GDSII layout files structures (hierarchy, cells names, ...). I found IPKISS (http://www.photonics.intec.ugent.be/research/facilities/design/ipkiss/default.htm), but it looks to be a generator and not a reader. Thank you, Vincent -- http://mail.pyt

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Tim Chase
> I have a list of numbers and I want to build another list with every > second element multiplied by -1. > > input = [1,2,3,4,5,6] > wanted = [1,-2,3,-4,5,-6] > > I can implement it like this: > > input = range(3,12) > wanted = [] > for (i,v) in enumerate(input): > if i%2 == 0: > wa

os.walk return hex excapes

2006-11-28 Thread Alex S
Hi, os.walk return hex excape sequence inside a files name, and when i try to feed it back to os.remove i get OSError: [Errno 22] Invalid argument: 'C:\\Temp\\?p?\xbfS\xbf\xac?G\xaba ACDSee \xbb?a??n a???\xac\xb5\xbfn.exe' -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying every alternate element of a sequence

2006-11-28 Thread John Hicken
[EMAIL PROTECTED] wrote: > I have a list of numbers and I want to build another list with every > second element multiplied by -1. > > input = [1,2,3,4,5,6] > wanted = [1,-2,3,-4,5,-6] > > I can implement it like this: > > input = range(3,12) > wanted = [] > for (i,v) in enumerate(input): > if

SAX2 Download

2006-11-28 Thread Mike P
Does anyone know where i can download acopy of the SAX2 module? Cheers Mike -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Leo Kislov
[EMAIL PROTECTED] wrote: > I have a list of numbers and I want to build another list with every > second element multiplied by -1. > > input = [1,2,3,4,5,6] > wanted = [1,-2,3,-4,5,-6] > > I can implement it like this: > > input = range(3,12) > wanted = [] > for (i,v) in enumerate(input): > if

Re: "fork and exit" needed?

2006-11-28 Thread Fredrik Lundh
Nick Craig-Wood wrote: > If you run this > > import os,sys,time > print os.getpid() > sys.stdout = open(os.devnull, 'w') > time.sleep(60) > > It prints its pid. and not only that, if you run print "world", print "hello" it prints "hello world" in the wrong order! --

Re: SAX2 Download

2006-11-28 Thread Fredrik Lundh
Mike P wrote: > Does anyone know where i can download acopy of the SAX2 module? the built-in xml.sax module implements the SAX 2 protocol, if that's what you're looking for: http://docs.python.org/lib/module-xml.sax.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Antoon Pardon
On 2006-11-28, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have a list of numbers and I want to build another list with every > second element multiplied by -1. > > input = [1,2,3,4,5,6] > wanted = [1,-2,3,-4,5,-6] > > I can implement it like this: > > input = range(3,12) > wanted = [] > for (

Re: os.walk return hex excapes

2006-11-28 Thread Leo Kislov
Alex S wrote: > Hi, > os.walk return hex excape sequence inside a files name, and when i try > to feed it back to os.remove i get > > OSError: [Errno 22] Invalid argument: > 'C:\\Temp\\?p?\xbfS\xbf\xac?G\xaba ACDSee \xbb?a??n a???\xac\xb5\xbfn.exe' It's not escape sequences that are the problem bu

Re: os.walk return hex excapes

2006-11-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Alex S wrote: > os.walk return hex excape sequence inside a files name, and when i try > to feed it back to os.remove i get > > OSError: [Errno 22] Invalid argument: > 'C:\\Temp\\?p?\xbfS\xbf\xac?G\xaba ACDSee \xbb?a??n a???\xac\xb5\xbfn.exe' There is no hex escape in th

Re: How to increase the speed of this program?

2006-11-28 Thread John Machin
Peter Otten wrote: > Peter Otten wrote: > > > Leo Kislov wrote: > > > >> > >> Peter Otten wrote: > >>> Peter Otten wrote: > >>> > >>> > HYRY wrote: > >>> > > >>> >> I want to join two mono wave file to a stereo wave file by only using > >>> >> the default python module. > >>> >> Here is my program

Re: How to increase the speed of this program?

2006-11-28 Thread Fredrik Lundh
John Machin wrote: > I'm extremely agnostic about the spelling :-) IOW I'd be very glad of > any way [pure Python; e.g. maintaining my own version of the array > module doesn't qualify] to simply and rapidly create an array.array > instance with typecode t and number of elements n with each elemen

Re: Modifying every alternate element of a sequence

2006-11-28 Thread [EMAIL PROTECTED]
Wow, I was in fact searching for this syntax in the python tutorial. It is missing there. Is there a reference page which documents all possible list comprehensions. -- Suresh Leo Kislov wrote: > [EMAIL PROTECTED] wrote: > > I have a list of numbers and I want to build another list with every > >

Re: SAX2 Download

2006-11-28 Thread Mike P
Fredrik Lundh wrote: > Mike P wrote: > > > Does anyone know where i can download acopy of the SAX2 module? > > the built-in xml.sax module implements the SAX 2 protocol, if that's > what you're looking for: > > http://docs.python.org/lib/module-xml.sax.html > > Perfect thanks -- http://m

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Roberto Bonvallet
[EMAIL PROTECTED] wrote: > I have a list of numbers and I want to build another list with every > second element multiplied by -1. [...] > But is there any other better way to do this. I think the best way is the one that uses slices, as somebody suggested in this thread. This is another (worse)

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Steven D'Aprano
On Tue, 28 Nov 2006 02:38:09 -0800, [EMAIL PROTECTED] wrote: > I have a list of numbers and I want to build another list with every > second element multiplied by -1. > > input = [1,2,3,4,5,6] > wanted = [1,-2,3,-4,5,-6] > > I can implement it like this: > > input = range(3,12) > wanted = [] >

Re: Python script and C++

2006-11-28 Thread Jorgen Grahn
On Tue, 28 Nov 2006 10:12:23 +0100, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > In <[EMAIL PROTECTED]>, Ravi Teja > wrote: > >>> I am new to python and currently I am working on a traffic simulation >>> which I plan to define the various agents using scripting. It's kind of like >>>

Re: Modifying every alternate element of a sequence

2006-11-28 Thread Leo Kislov
[EMAIL PROTECTED] wrote: > Wow, I was in fact searching for this syntax in the python tutorial. It > is missing there. > Is there a reference page which documents all possible list > comprehensions. There is actually only two forms of list comprehensions: http://docs.python.org/ref/lists.html [bl

Dynamic/runtime code introspection/compilation

2006-11-28 Thread Thomas W
Maybe a stupid subject, but this is what I want to do : I got some python code stored in a string: somecode = """ from somemodule import ISomeInterface class Foo(ISomeInterface): param1 = ... param2 = """ and I want to compile that code so that I can use the Foo-class and check w

Re: Accessing file metadata on windows XP

2006-11-28 Thread Rob Williscroft
wrote in news:[EMAIL PROTECTED] in comp.lang.python: > When rightclicking a, for example, pdf file on windows, one normally > gets a screen with three or four tags. Clicking on one of the summary > tag one can get some info like "title", "Author", "category", "keyword" > etc.. > > My question

Re: How to increase the speed of this program?

2006-11-28 Thread Peter Otten
Fredrik Lundh wrote: > John Machin wrote: > >> I'm extremely agnostic about the spelling :-) IOW I'd be very glad of >> any way [pure Python; e.g. maintaining my own version of the array >> module doesn't qualify] to simply and rapidly create an array.array >> instance with typecode t and number

Re: Accessing file metadata on windows XP

2006-11-28 Thread Roger Upole
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > When rightclicking a, for example, pdf file on windows, one normally > gets a screen with three or four tags. Clicking on one of the summary > tag one can get some info like "title", "Author", "category", "keyword" > etc.. > > My quest

Re: Dynamic/runtime code introspection/compilation

2006-11-28 Thread Fredrik Lundh
Thomas W wrote: > from somemodule import ISomeInteface > > d = compile(sourcecode) > > myfoo = d.Foo() > > print ISomeInterface in myfoo.__bases__ > > Any hints? Python is a dynamic language, so compiling something won't tell you much about what the code actually does. the only reliable way

Problem with imaplib (weird result if mailbox contains a %)

2006-11-28 Thread Antoon Pardon
This little program gives IMO a strange result. import imaplib user = "cpapen" cyr = imaplib.IMAP4("imap.vub.ac.be") cyr.login("cyrus", "cOn-A1r") rc, lst = cyr.list('""', "user/%s/*" % user) for el in lst: print "%r" % (el,) And the result is: '(\\HasNoChildren) "/" "user/cpapen/Out"' '(\\H

Re: Dynamic/runtime code introspection/compilation

2006-11-28 Thread Leo Kislov
Thomas W wrote: > Maybe a stupid subject, but this is what I want to do : > > I got some python code stored in a string: > > somecode = """ > > from somemodule import ISomeInterface > > class Foo(ISomeInterface): > param1 = ... > param2 = > > """ > > and I want to compile that code so

Re: Libgmail

2006-11-28 Thread Jussi Salmela
linuxfreak wrote: > Funny enough I find the same "Google" in my browser too. and if my > memory serves me correct I did the same search which you allude to. It > is only after series of exhaustive searches rummaging through websites > with incomplete (or non existent ) docs that i posed the questi

Re: Inheritance from builtin list and override of methods.

2006-11-28 Thread Michalis Giannakidis
On Tuesday 28 November 2006 06:12, OKB (not okblacke) wrote: > Carsten Haese wrote: > > You can change the behavior of a list's sort method by overriding > > sort. You can't change the behavior of sort by overriding > > __getitem__ and __setitem__, because sort does not call __getitem__ > > or __se

Re: "fork and exit" needed?

2006-11-28 Thread Nick Craig-Wood
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Tue, 28 Nov 2006 04:30:09 -0600, Nick Craig-Wood > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > > If you run this > > > > import os,sys,time > > print os.getpid() > > sys.stdout = open(os.devnull, 'w') > > tim

Re: Question about import and sys.path

2006-11-28 Thread Rob Wolfe
Frank Millman wrote: > Hi all > > I am writing a business/accounting application. Once a user has logged > in they are presented with a menu. Each menu option has a description > and an associated file name and program name. The file name is the name > of a .py file (impName) and the program name

'locals' argument of PyEval_EvalCode

2006-11-28 Thread Daniel Trstenjak
Hi all, I would like to know the definition of the 'locals' object given to PyEval_EvalCode. Has 'locals' to be a python dictionary or a subtype of a python dictionary, or is it enough if the object implements the necessary protocols? The python implementation behaves different for the two follo

Re: Dynamic/runtime code introspection/compilation

2006-11-28 Thread Thomas W
Great !!! That works like charm. Thanks alot. Thomas Leo Kislov wrote: > Thomas W wrote: > > Maybe a stupid subject, but this is what I want to do : > > > > I got some python code stored in a string: > > > > somecode = """ > > > > from somemodule import ISomeInterface > > > > class Foo(ISomeIn

Re: Inheritance from builtin list and override of methods.

2006-11-28 Thread Fredrik Lundh
Michalis Giannakidis wrote: > I perfectly understand that this adds significant penalty to the execution of > code. But in the way things are, I have to know ( or guess ?) how its > function has been implemented. and that's different from how object orientation usually works in exactly what wa

Re: HTML Table-of-Content Extraction Script

2006-11-28 Thread Thomas Guettler
robert wrote: > I'm looking for a function which extracts a table of contents of HTML file(s) > from ... and possibly auto-creates the ancors. > Maybe something already exists? You can try mine: http://www.thomas-guettler.de/scripts/number-html-headings.py.txt -- Thomas Güttler, http://www.tho

Re: Inheritance from builtin list and override of methods.

2006-11-28 Thread Carl Banks
OKB (not okblacke) wrote: > Carsten Haese wrote: > > > You can change the behavior of a list's sort method by overriding > > sort. You can't change the behavior of sort by overriding > > __getitem__ and __setitem__, because sort does not call __getitem__ > > or __setitem__. > > Why doesn't it

Re: Inheritance from builtin list and override of methods.

2006-11-28 Thread Fredrik Lundh
Carl Banks wrote: > Because the concerns of thousands of legitimate programmers who want > good performance out of their sorts outweigh the concerns of the one or > two hax0r d00ds who think it would be cool to hook into sort internals. ... and haven't yet realized that using sorted() and convert

Re: Problem with imaplib (weird result if mailbox contains a %)

2006-11-28 Thread Leo Kislov
Antoon Pardon wrote: > This little program gives IMO a strange result. > > import imaplib > > user = "cpapen" > > cyr = imaplib.IMAP4("imap.vub.ac.be") > cyr.login("cyrus", "cOn-A1r") > rc, lst = cyr.list('""', "user/%s/*" % user) > for el in lst: > print "%r" % (el,) > > And the result is: > >

Error handling. Python embedded into a C++ app.

2006-11-28 Thread Wolfram
I have a problem with displaying errors in an embedded situation. The "main program" I want to embed Python into is a windows, MFC, non-console, C++ application. My issue is that I have not been able to "catch" error messages from python, for example syntax errors. PyRun_SimpleFile() crashed, pr

Re: HTML Table-of-Content Extraction Script

2006-11-28 Thread Fredrik Lundh
robert wrote: > I'm looking for a function which extracts a table of contents > of HTML file(s) from ... > and possibly auto-creates the ancors. > Maybe something already exists? that's the kind of stuff you'll write in approximately two minutes using BeautifulSoup (or if you prefer the Elemen

Re: Reading GDSII layouts

2006-11-28 Thread Paddy
Vincent Arnoux wrote: > Hello, > I am looking for a library for reading GDSII layout files structures > (hierarchy, cells names, ...). > I found IPKISS > (http://www.photonics.intec.ugent.be/research/facilities/design/ipkiss/default.htm), > but it looks to be a generator and not a reader. > > Th

SPE (Stani's Python Editor) web site?

2006-11-28 Thread John DeRosa
SPE's site (http://pythonide.stani.be/) has been inaccessible to me for at least a day. Can anyone else get to it? I looked on Google and didn't see any new locations for SPE. Has it recently moved to somewhere else? I dimly recall a post by Stani wherein he said he might move the site, but I c

Re: SPE (Stani's Python Editor) web site?

2006-11-28 Thread Larry Bates
John DeRosa wrote: > SPE's site (http://pythonide.stani.be/) has been inaccessible to me > for at least a day. Can anyone else get to it? > > I looked on Google and didn't see any new locations for SPE. Has it > recently moved to somewhere else? I dimly recall a post by Stani > wherein he said

Re: Reading GDSII layouts

2006-11-28 Thread Jacob Rael
Funny, I started writing one this past weekend as a learning exercise (handling large files and start to use classes). If ipkiss does not work out, let me know specifically what you need and maybe my hack will work. jr Vincent Arnoux wrote: > Hello, > I am looking for a library for reading GDSII

Re: pyxpcom

2006-11-28 Thread Trent Mick
hg wrote: > Hi, > > Can one tell me what the status of this project is ?. I did google ... > but not much out there. PyXPCOM source is in the main Mozilla CVS tree. It is being maintained by Mark Hammond (the original developer of the extension). There isn't a lot of activity on it, I think, be

Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread Jacob Rael
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to learn/try a full blown parsing module. My simple script works well until it runs into functions that straddle

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread Larry Bates
Jacob Rael wrote: > Hello, > > I have a simple script to parse a text file (a visual basic program) > and convert key parts to tcl. Since I am only working on specific > sections and I need it quick, I decided not to learn/try a full blown > parsing module. My simple script works well until it run

Reading text labels from a Win32 window

2006-11-28 Thread geskerrett
Does anyone know of a way to read text labels from a Win32 application. I am familiar with using pywin32 and the SendMessage function to capture text from Buttons,text boxex, comboboxes, etc, however, the text I am would like to capture doesn't appear to be in a control. -- http://mail.python.org

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread Roberto Bonvallet
Jacob Rael wrote: [...] > I would line to identify if a line continues (if line.endswith('_')) > and concate with the next line: > > line = line + nextLine > > How can I get the next line when I am in a for loop using readlines? Don't use readlines. # NOT TESTED program = open(fileName)

Re: pyxpcom

2006-11-28 Thread hg
Trent Mick wrote: > hg wrote: >> Hi, >> >> Can one tell me what the status of this project is ?. I did google ... >> but not much out there. > > PyXPCOM source is in the main Mozilla CVS tree. It is being maintained > by Mark Hammond (the original developer of the extension). There isn't a > lot o

Re: How to increase the speed of this program?

2006-11-28 Thread John Machin
Fredrik Lundh wrote: > John Machin wrote: > > > I'm extremely agnostic about the spelling :-) IOW I'd be very glad of > > any way [pure Python; e.g. maintaining my own version of the array > > module doesn't qualify] to simply and rapidly create an array.array > > instance with typecode t and numbe

Re: SPE (Stani's Python Editor) web site?

2006-11-28 Thread Fuzzyman
John DeRosa wrote: > SPE's site (http://pythonide.stani.be/) has been inaccessible to me > for at least a day. Can anyone else get to it? > > I looked on Google and didn't see any new locations for SPE. Has it > recently moved to somewhere else? I dimly recall a post by Stani > wherein he said

Re: How to increase the speed of this program?

2006-11-28 Thread Fredrik Lundh
John Machin wrote: > Thanks, that's indeed faster than array(t, [v]*n) but what I had in > mind was something like an additional constructor: > > array.filledarray(typecode, repeat_value, repeat_count) > > which I speculate should be even faster. before you add a new API, you should probably st

Re: How to increase the speed of this program?

2006-11-28 Thread Klaas
John Machin wrote: > Thanks, that's indeed faster than array(t, [v]*n) but what I had in > mind was something like an additional constructor: > > array.filledarray(typecode, repeat_value, repeat_count) > > which I speculate should be even faster. Looks like I'd better get a > copy of arraymodule.c

Wrapping A Shell

2006-11-28 Thread Jeremy Moles
I'm not sure if this is really the right place to ask this question, but since the implementation is in Python, I figured I'd give it a shot. I want to "wrap" a shell process using popen inside of python program rather than creating a new shell process for each line I process in the app. For examp

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread John Machin
Jacob Rael wrote: > Hello, > > I have a simple script to parse a text file (a visual basic program) > and convert key parts to tcl. Since I am only working on specific > sections and I need it quick, I decided not to learn/try a full blown > parsing module. My simple script works well until it runs

IEC Controller and element

2006-11-28 Thread Danny Scaleno
Hello, using IEC Controller, anybody knows how to capture the head part of an html page like this one? Object=window.open('test.html','test1','name="test1"'); Object.focus() it seems IEC is able to capture only the part. I need to parse the string inside the tag

Re: Modifying every alternate element of a sequence

2006-11-28 Thread bearophileHUGS
Leo Kislov: > input[1::2] = [-item for item in input[1::2]] > If you don't want to do it in-place, just make a copy: > wanted = input[:] > wanted[1::2] = [-item for item in wanted[1::2]] Very nice solution. I have tried few versions like: from itertools import imap, islice from operator import neg

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread Tim Hochberg
John Machin wrote: > Jacob Rael wrote: >> Hello, >> >> I have a simple script to parse a text file (a visual basic program) >> and convert key parts to tcl. Since I am only working on specific >> sections and I need it quick, I decided not to learn/try a full blown >> parsing module. My simple scri

Re: Reading text labels from a Win32 window

2006-11-28 Thread [EMAIL PROTECTED]
[EMAIL PROTECTED] schrieb: > Does anyone know of a way to read text labels from a Win32 application. > I am familiar with using pywin32 and the SendMessage function to > capture text from Buttons,text boxex, comboboxes, etc, however, the > text I am would like to capture doesn't appear to be in a

Re: SPE (Stani's Python Editor) web site?

2006-11-28 Thread Bernard
I can send you the latest tar.gz ( SPE-0.8.3.c-wx2.6.1.0.tar ) file if you want it :) Bernard John DeRosa wrote: > SPE's site (http://pythonide.stani.be/) has been inaccessible to me > for at least a day. Can anyone else get to it? > > I looked on Google and didn't see any new locations for SPE

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread John Machin
Tim Hochberg wrote: [snip] > I agree that mixing the line assembly and parsing is probably a mistake > although using next explicitly is fine as long as your careful with it. > For instance, I would be wary to use the mixed for-loop, next strategy > that some of the previous posts suggested. Here'

wanna stop by my homemade glory hole?

2006-11-28 Thread WESTPAC851
have you used the cubby hole before? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to increase the speed of this program?

2006-11-28 Thread Klaas
Klaas wrote: > In fact, you can make it about 4x faster by balancing: > > [EMAIL PROTECTED] ~]$ python -m timeit -s "from array import array" > "array('c','\0'*200)*500" > 1 loops, best of 3: 32.4 usec per loop This is an unclean minimally-tested patch which achieves reasonable performance (

Re: urllib2 spinning CPU on read

2006-11-28 Thread kdotsky
> I didn't try looking at your example, but I think it's likely a bug > both in that site's HTTP server and in httplib. If it's the same one > I saw, it's already reported, but nobody fixed it yet. > > http://python.org/sf/1411097 > > > John Thanks. I tried the example in the link you gave, and

How to refer to Python?

2006-11-28 Thread Sebastian Bassi
I am writing a paper where I refer to Python. Is there a paper that I can refer the reader to? Or just use the Python web page as a reference? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to refer to Python?

2006-11-28 Thread Fredrik Lundh
Sebastian Bassi wrote: > I am writing a paper where I refer to Python. Is there a paper that I > can refer the reader to? Or just use the Python web page as a > reference? http://effbot.org/pyfaq/are-there-any-published-articles-about-python-that-i-can-reference.htm -- http://mail.python.org/

Re: Simple text parsing gets difficult when line continues to next line

2006-11-28 Thread Jacob Rael
Thanks all. I think I'll follow the "don't do that" advice. jr Jacob Rael wrote: > Hello, > > I have a simple script to parse a text file (a visual basic program) > and convert key parts to tcl. Since I am only working on specific > sections and I need it quick, I decided not to learn/try a full

Re: pyxpcom

2006-11-28 Thread Trent Mick
> My need is as follows: I have developed an activex component to access a > smart card on the client side / do some web site logon. > > Are xpcom / pyxpcom advanced/stable enough for such an implementation > under Linux / Windows ? You mean to provide the equivalent functionality for Firefox tha

Re: SPE (Stani's Python Editor) web site?

2006-11-28 Thread John DeRosa
On 28 Nov 2006 13:16:41 -0800, "Bernard" <[EMAIL PROTECTED]> wrote: > >I can send you the latest tar.gz ( SPE-0.8.3.c-wx2.6.1.0.tar ) file if >you want it :) I'm looking for SPE for Python 2.5 and wxPython 2.7.2.0, on Windows. Do you have that? -- http://mail.python.org/mailman/listinfo/python-l

Re: ANN: CherryPy 3.0 RC1

2006-11-28 Thread Ben Finney
"Christian Wyglendowski" <[EMAIL PROTECTED]> writes: > I'm happy to announce the first release candidate for CherryPy 3.0. Congratulations, I'm glad to see an announcement for CherryPy. Please, in future, don't send HTML message bodies to public forums; plain text is far better for such a wide a

Re: Wrapping A Shell

2006-11-28 Thread [EMAIL PROTECTED]
Jeremy Moles wrote: > I'm not sure if this is really the right place to ask this question, but > since the implementation is in Python, I figured I'd give it a shot. > > I want to "wrap" a shell process using popen inside of python program > rather than creating a new shell process for each line I

  1   2   >