Re: Convert xml symbol notation

2007-04-07 Thread dumbkiwi
On Apr 7, 5:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > dumbkiwi wrote: > > I'm working on a script to download and parse a web page, and it > > includes xml symbol notation, such as ' for the ' character. Does > > anyone know of a pre-existing python script/lib to convert the xml > >

Re: Understanding Python's interpreter

2007-04-07 Thread Gabriel Genellina
Rafael Almeida wrote: > I'm studying compilers now on my university and I can't quite > understand one thing about the python interpreter. Why is its input a > binary file (pyc)? The LOAD_CONST opcode is 100 (dec) and STORE_FAST's > is 125 (dec). The translation of the following code: > > foo.py:

Re: block scope?

2007-04-07 Thread James Stroud
Paul Rubin wrote: > John Nagle <[EMAIL PROTECTED]> writes: >> In a language with few declarations, it's probably best not to >> have too many different nested scopes. Python has a reasonable >> compromise in this area. Functions and classes have a scope, but >> "if" and "for" do not. That wo

Re: Convert xml symbol notation

2007-04-07 Thread Gabriel Genellina
dumbkiwi wrote: > On Apr 7, 5:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: >>Try the htmlentitydefs module. > > Is that a standard module? I can't see it anywhere - googled it. Sure! For quite a while, at least, since Python 1.5 (I can't go earlier in time...) http://svn.python.org/v

Re: Custom Python Runtime

2007-04-07 Thread Kay Schluehr
On Apr 7, 1:52 am, "Jack" <[EMAIL PROTECTED]> wrote: > Since the full installation of Python (from either the standard installer or > ActiveState installer) is too big for my intended use, I'd like to build a > custom distribution of Python for Windows platform, omitting some lib files, > such as a

Re: Understanding Python's interpreter

2007-04-07 Thread Rafael Almeida
On Sat, 07 Apr 2007 04:35:49 +0200 Gabriel Genellina <[EMAIL PROTECTED]> wrote: > Speed? Eficiency? File size? Ease of use? > A .pyc *could* be written in ASCII, but what do you gain? Replacing a > few trivial functions in the Python core with a printf/scanf equivalent? > At the same time you

Re: SWIG, Python, C++, and Coca-Cola

2007-04-07 Thread Martin v. Löwis
> Any clues as to what is happening here or what to do next? Apparently, it tries to wrap the main() function. It should not do that: main should not be callable from Python. Most likely, you have a declaration of main somewhere so it thinks it should wrap it. You should not have a declaration of

Re: Convert xml symbol notation

2007-04-07 Thread Martin v. Löwis
> I'm working on a script to download and parse a web page, and it > includes xml symbol notation, such as ' for the ' character. Does > anyone know of a pre-existing python script/lib to convert the xml > notation back to the actual symbol it represents? If you have this given in an XML file (ra

Re: Why NOT only one class per file?

2007-04-07 Thread Hendrik van Rooyen
"Bart Willems" <[EMAIL PROTECTED]> wrote: > Steven D'Aprano wrote: > > On Wed, 04 Apr 2007 14:23:19 -0700, Chris Lasher wrote: > > > >> A friend of mine with a programming background in Java and Perl places > >> each class in its own separate file in . I informed him that keeping > >> all relate

os.path.isfile() error

2007-04-07 Thread 7stud
Here's the code: import os, os.path, pprint mydir = "/Users/me/2testing" files = [file for file in os.listdir(mydir)] pprint.pprint(files) print os.path.join(mydir, "helloWorld.py") files = [file for file in os.listdir(mydir) if os.path.isfile(os.path.join(dir, file) ) ] pprint.pp

Re: Understanding Python's interpreter

2007-04-07 Thread Martin v. Löwis
>> Why harder? Once you read the file, they're just numbers. Anyway, being >> harder to program the *interpreter* is not a problem, if you gain >> something like speed or eficiency for the interpreted language. > > Well, it's harder to get 4 bytes and create an int out of it in a > portable way

Re: os.path.isfile() error

2007-04-07 Thread Peter Otten
7stud wrote: > Here's the code: > > import os, os.path, pprint > > mydir = "/Users/me/2testing" > > files = [file for file in os.listdir(mydir)] > pprint.pprint(files) > > print os.path.join(mydir, "helloWorld.py") > > files = [file > for file in os.listdir(mydir) > if os.path.isf

Re: Welch essential for learning Tkinter well?

2007-04-07 Thread Dick Moores
At 10:36 AM 4/6/2007, Russell E. Owen wrote: >In article <[EMAIL PROTECTED]>, > Kevin Walzer <[EMAIL PROTECTED]> wrote: > > > James Stroud wrote: > > >This begs the > > > question, is anyone truly an expert in Tkinter? > > > > Frederick Lundh is, if anyone is. > > > > http://www.pythonware.com/lib

Re: os.path.isfile() error

2007-04-07 Thread John Machin
On Apr 7, 6:56 pm, "7stud" <[EMAIL PROTECTED]> wrote: > Here's the code: > > import os, os.path, pprint > > mydir = "/Users/me/2testing" > > files = [file for file in os.listdir(mydir)] > pprint.pprint(files) > > print os.path.join(mydir, "helloWorld.py") > > files = [file > for file i

Re: Custom Python Runtime

2007-04-07 Thread Martin v. Löwis
> Is there a way to customize the Windows build? In my case, there is no need > to build an installer. The best way is to have everything in a directory, as > long as I know where to find Python and Python knows where to find the > necessary libs. Any online docs describing this? Thanks! The i

Re: os.path.isfile() error

2007-04-07 Thread mik3l3374
On Apr 7, 4:56 pm, "7stud" <[EMAIL PROTECTED]> wrote: > Here's the code: > > import os, os.path, pprint > > mydir = "/Users/me/2testing" > > files = [file for file in os.listdir(mydir)] > pprint.pprint(files) > > print os.path.join(mydir, "helloWorld.py") > > files = [file > for file i

Re: Convert xml symbol notation

2007-04-07 Thread Martin v. Löwis
>> I'm working on a script to download and parse a web page, and it >> includes xml symbol notation, such as ' for the ' character. Does >> anyone know of a pre-existing python script/lib to convert the xml >> notation back to the actual symbol it represents? > > Try the htmlentitydefs module. T

Re: os.path.isfile() error

2007-04-07 Thread 7stud
On Apr 7, 2:56 am, "7stud" <[EMAIL PROTECTED]> wrote: > Here's the code: > > import os, os.path, pprint > > mydir = "/Users/me/2testing" > > files = [file for file in os.listdir(mydir)] > pprint.pprint(files) > > print os.path.join(mydir, "helloWorld.py") > > files = [file > for file i

Re: tuples, index method, Python's design

2007-04-07 Thread 7stud
On Apr 6, 1:24 pm, Carsten Haese <[EMAIL PROTECTED]> wrote: > Except that that wasn't the only justification. GvR also said: > > """ > For tuples, I suspect such a function would rarely be used; I think > that is most cases where x.index() would be useful, x is generally a > list, whose contents va

Re: Welch essential for learning Tkinter well?

2007-04-07 Thread James Stroud
Dick Moores wrote: > At 10:36 AM 4/6/2007, Russell E. Owen wrote: >> I find Welch's book and the on-line tcl/tk help very helpful for Tkinter >> programming--especially some of the more obscure details. But to use >> either of these resources comfortably you must learn the basics of >> Tkinter firs

Re: Understanding Python's interpreter

2007-04-07 Thread Steve Holden
Rafael Almeida wrote: > On Sat, 07 Apr 2007 04:35:49 +0200 > Gabriel Genellina <[EMAIL PROTECTED]> wrote: > >> Speed? Eficiency? File size? Ease of use? >> A .pyc *could* be written in ASCII, but what do you gain? Replacing a >> few trivial functions in the Python core with a printf/scanf equival

Re: Debugging multithreaded program using Eclipse/Pydev

2007-04-07 Thread Ritesh Raj Sarraf
John Henry wrote: >>From what I can gather, it appears the only real option I have is to > debug under Eclipse/Pydev.  I did a google search of this newsgroup > and didn't turn up too many hits.  Before I invest the time to learn > Eclipse/Pydev, I like to hear from somebody that have gone this pa

Re: block scope?

2007-04-07 Thread Neal Becker
James Stroud wrote: > Paul Rubin wrote: >> John Nagle <[EMAIL PROTECTED]> writes: >>> In a language with few declarations, it's probably best not to >>> have too many different nested scopes. Python has a reasonable >>> compromise in this area. Functions and classes have a scope, but >>> "if

Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
I accidentally stumbled across the Turtle Graphics module (turtle.py) the other day and have been having some fun with it. Now I'm wondering if there is a way to build into a script the saving of each window just before it is cleared. For example, here are a couple that I've saved by screen cap

Re: os.path.isfile() error

2007-04-07 Thread Steve Holden
[EMAIL PROTECTED] wrote: > On Apr 7, 4:56 pm, "7stud" <[EMAIL PROTECTED]> wrote: >> Here's the code: >> >> import os, os.path, pprint >> >> mydir = "/Users/me/2testing" >> >> files = [file for file in os.listdir(mydir)] >> pprint.pprint(files) >> >> print os.path.join(mydir, "helloWorl

Re: Welch essential for learning Tkinter well?

2007-04-07 Thread Dick Moores
At 03:43 AM 4/7/2007, James Stroud wrote: >Dick Moores wrote: > > At 10:36 AM 4/6/2007, Russell E. Owen wrote: > >> I find Welch's book and the on-line tcl/tk help very helpful for Tkinter > >> programming--especially some of the more obscure details. But to use > >> either of these resources comfo

Python - ogr2ogr

2007-04-07 Thread Szkandera . Karel
Hi, I need to do web service, which will be convert vector formats, like shapefile, dgn, mapinfo..(and other formats, which are supported in ogr2ogr). I want to do it with using ogr2ogr in the ogr python module, but i am newbie in python, so here is my questions. Is here anybody, who wrote any

Automated email response

2007-04-07 Thread tonydevlin
I currently have the python code obj=sti.object creator = obj.Creator() history = sti.getHistory() wf_tool = context.portal_workflow mMsg = """ Content has been submitted for your review. The url was %s. The reason was %s. """ member = context.portal_membership.getMemberById(creator)

subprocess.Popen output to file?

2007-04-07 Thread John Pye
Hi all I am trying to set up a python script to manage backups of a mysql database the 'right way' using pipes. I want to send the output of the 'mysqldump' command to a file. Using a normal shell script this would be easy using a ">" operator. What is the efficient and best way to do this using p

Re: block scope?

2007-04-07 Thread irstas
On Apr 7, 6:48 am, James Stroud <[EMAIL PROTECTED]> wrote: > Neal Becker wrote: > > One thing I sometimes miss, which is common in some other languages (c++), > > is idea of block scope. It would be useful to have variables that did not > > outlive their block, primarily to avoid name clashes. Th

Can't Get Email Interface Working

2007-04-07 Thread Eric Price
Hi; I'm writing a script that includes an email function. So I went to the cookbook and dug up this, and tweaked it just a bit to make it easier to get it to work, but it throws an error: >>>def createMail(sender, recipient, subject, html, text): ... import MimeWriter, mimetools, cStringIO .

Re: Getting Stack Trace on segfault

2007-04-07 Thread [EMAIL PROTECTED]
After a night's rest, I was able to add a function trace to pydb, command option --fntrace, short option -F, and set/show command "fntrace". It's still a little bit funky. (Hey, I didn't get *that* good of a rest). But it's out there in pydb's CVS in case folks want to try it. Also, following an

Re: tuples, index method, Python's design

2007-04-07 Thread bearophileHUGS
Carsten Haese: > The lack of convincing use cases is still a pertinent reason today. Note > that the original poster on this thread did not present a use case for > tuple.index, they were only asking out of curiosity. > If you have a use case for tuple.index, please show it to me, and I'll > show y

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: > I accidentally stumbled across the Turtle Graphics module (turtle.py) > the other day and have been having some fun with it. > > Now I'm wondering if there is a way to build into a script the saving of > each window just before it is cleared. For example, here are a couple

Re: Understanding Python's interpreter

2007-04-07 Thread Mike C. Fletcher
Steve Holden wrote: > Rafael Almeida wrote: > ... > Because they aer smarter than you, without wishing to be too rude. > Replace that with "more experienced", please. Otherwise it is a bit rude, despite your wishes. We've always been newbie positive on Python-list, and new compiler writer

Re: tuples, index method, Python's design

2007-04-07 Thread Carsten Haese
On Sat, 2007-04-07 at 06:45 -0700, [EMAIL PROTECTED] wrote: > Carsten Haese: > > The lack of convincing use cases is still a pertinent reason today. Note > > that the original poster on this thread did not present a use case for > > tuple.index, they were only asking out of curiosity. > > If you ha

Re: subprocess.Popen output to file?

2007-04-07 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, John Pye wrote: > I am trying to set up a python script to manage backups of a mysql > database the 'right way' using pipes. I want to send the output of the > 'mysqldump' command to a file. Using a normal shell script this would > be easy using a ">" operator. What is the

What happened to http://www.pythonware.com/daily and http://mechanicalcat.net/pyblagg.html?

2007-04-07 Thread asker
These sites are not updated since almost one month. Does anybody knows why? -- http://mail.python.org/mailman/listinfo/python-list

Re: Hide the python-script from user

2007-04-07 Thread hlubenow
hlubenow wrote: > hlubenow wrote: > >> ts-dev wrote: >> >>> On Apr 6, 3:19 pm, hlubenow <[EMAIL PROTECTED]> wrote: recently there was a thread about hiding the python-script from the user. The OP could use >>> >>> Interesting - thanks >> >> Well, testing it, it doesn't seem to work v

1 Thread = 3 interpreter launched ???

2007-04-07 Thread nono240
Hi all, and thanks for reading ! I'm using Python 2.4.2 with an embedded platform (16MB RAM) running Linux 2.6.20. My main script use a thread for some reasons (more precisely a periodic timer within a separate module). While looking at the memory consumption, here's what i found : PID USER

Checking whether list element exists

2007-04-07 Thread Rehceb Rotkiv
I want to check whether, for example, the element myList[-3] exists. So far I did it like this: index = -3 if len(myList) >= abs(index): print myList[index] Another idea I had was to (ab-?)use the try...except structure: index = -3 try: print myList[index] except: print

Re: Can't Get Email Interface Working

2007-04-07 Thread hlubenow
Eric Price wrote: > Hi; > I'm writing a script that includes an email function. So I went to the > cookbook and dug up this, and tweaked it just a bit to make it easier to > get it to work, but it throws an error: > def createMail(sender, recipient, subject, html, text): > ... import Mime

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 06:50 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > > I accidentally stumbled across the Turtle Graphics module (turtle.py) > > the other day and have been having some fun with it. > > > > Now I'm wondering if there is a way to build into a script the saving of > > e

Re: Checking whether list element exists

2007-04-07 Thread Wojciech Muła
Rehceb Rotkiv wrote: > I want to check whether, for example, the element myList[-3] exists. So > far I did it like this: > > index = -3 > if len(myList) >= abs(index): > print myList[index] IMHO it is good way. > Another idea I had was to (ab-?)use the try...except structure: > > index =

How to tell when a file is opened

2007-04-07 Thread Adam
Hello, I want to know if it possible to tell when a file is opened. However I don't want it to be the last access time. I want to know how many times a file opened so I can generate statistics of file usage. I will be wanting to watch all files on a server so this will be on quite a large scale.

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: >> Turtle module uses Tk canvas element to draw graphics ('_canvas' >> attribute). I've written module, that exports canvas graphics to SVG >> file: http://wmula.republika.pl/proj/canvas2svg/ -- it may be useful >> for you. > > I afraid I'm totally unfamiliar with SVG. Would it

Re: tuples, index method, Python's design

2007-04-07 Thread bearophileHUGS
Carsten Haese: > Adding useless features always makes a product worse. What's your use > case for tuple.index? Ruby is a bit younger than Python, it has shown that few things may be better done in a different way. An advantage of PyPy is that it allows faster and simpler ways to perform language e

Re: Checking whether list element exists

2007-04-07 Thread Rehceb Rotkiv
> In general case it won't work, because lists accept negative indexes: > http://docs.python.org/lib/typesseq.html, 3rd note. Yes, I know! I _want_ the "3rd last list element", i.e. list[-3]. But it may be that the list does not have 3 elements. In this case, list[-3] will throw an error, cf.:

Re: Checking whether list element exists

2007-04-07 Thread [EMAIL PROTECTED]
On Apr 7, 10:37�am, Wojciech Mula <[EMAIL PROTECTED]> wrote: > Rehceb Rotkiv wrote: > > I want to check whether, for example, the element myList[-3] exists. So > > far I did it like this: > > > index = -3 > > if len(myList) >= abs(index): > > � �print myList[index] > > IMHO it is good way. > > > An

Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
Good grief! And they call a 722-line program "simple"?! LOL! I did what I need to do with a __one_line_shell_script__ LOL! Naw, if I have to go through all that, I'll skip on python this time around, thank you very much! Eric >From: hlubenow <[EMAIL PROTECTED]> >To: python-list@python.org >Subje

Re: Checking whether list element exists

2007-04-07 Thread [EMAIL PROTECTED]
On Apr 7, 10:52�am, Rehceb Rotkiv <[EMAIL PROTECTED]> wrote: > > In general case it won't work, because lists accept negative indexes: > >http://docs.python.org/lib/typesseq.html, 3rd note. > > Yes, I know! I _want_ the "3rd last list element", i.e. list[-3]. But it > may be that the list does not

Re: How to tell when a file is opened

2007-04-07 Thread Tim Golden
Adam wrote: > I want to know if it possible to tell when a file is opened. However I > don't want it to be the last access time. I want to know how many > times a file opened so I can generate statistics of file usage. > > I will be wanting to watch all files on a server so this will be on > quite

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 08:48 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > >> Turtle module uses Tk canvas element to draw graphics ('_canvas' > >> attribute). I've written module, that exports canvas graphics to SVG > >> file: http://wmula.republika.pl/proj/canvas2svg/ -- it may be useful

Re: Checking whether list element exists

2007-04-07 Thread Gary Herron
Rehceb Rotkiv wrote: > I want to check whether, for example, the element myList[-3] exists. So > far I did it like this: > > index = -3 > if len(myList) >= abs(index): > print myList[index] > > Another idea I had was to (ab-?)use the try...except structure: > > index = -3 > try: > prin

Debugging embedded python

2007-04-07 Thread kalita
I'm a Python newbie, and I'm looking for a way to debug Python scripts run from a C++ program by using PyRun_FileEx() function. So far I tried pdb, but it only raises bdb.BdbQuit exception in a line immediately after pdb.set_trace() is called. I guess it's because it is not running under normal Py

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Wojciech Muła
Dick Moores wrote: > What do I do to see this? For example Opera 9 and Firefox 1.5+ are able to view SVG files; there is a free plugin for IrfanView. w. -- http://mail.python.org/mailman/listinfo/python-list

Test Tube Zealots: The American Chemical Society Terminates the Membership of Chemists from Iran

2007-04-07 Thread stj911
http://counterpunch.org/rahni04072007.html Test Tube Zealots: The American Chemical Society Terminates the Membership of Chemists from Iran By DAVID N. RAHNI The American Chemical Society (ACS) has once again led the way, with its "zealot" interpretation of "embargo" by the Department of Treasur

Re: Pyserial example program error: win32file.SetupComm reports 'Incorrect function.'

2007-04-07 Thread hg
Ron Jackson wrote: > Dennis Lee Bieber wrote: >> On Wed, 07 Feb 2007 11:14:39 -0800, Ron Jackson >> <[EMAIL PROTECTED]> declaimed the following in >> comp.lang.python: >> >> >>>I am using Python 2.5 on Windows XP. I have installed Pyserial and >>>win32all extensions. >>> >> >> 2.4 on XP Pro SP2

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Peter Otten
Dick Moores wrote: > OK, thanks, now I've got [an svg file] > What do I do to see this? You can convert it to a jpeg using ImageMagick's convert. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't Get Email Interface Working

2007-04-07 Thread Tim Williams
On 07/04/07, Eric Price <[EMAIL PROTECTED]> wrote: > Good grief! And they call a 722-line program "simple"?! LOL! > I did what I need to do with a __one_line_shell_script__ LOL! > Naw, if I have to go through all that, I'll skip on python this time around, > thank you very much! > Eric Yup, its no

Re: block scope?

2007-04-07 Thread Alex Martelli
Neal Becker <[EMAIL PROTECTED]> wrote: ... > > i = 5 > > for my i in xrange(4): > >if i: # skips first when i is 0 > > my i = 100 > > if i: > >print i # of course 100 > > break > >print i # i is between 0 & 3 here > > print i

Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
From: "Tim Williams" <[EMAIL PROTECTED]> To: "Eric Price" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED], python-list@python.org Subject: Re: Can't Get Email Interface Working Date: Sat, 7 Apr 2007 17:53:28 +0100 On 07/04/07, Eric Price <[EMAIL PROTECTED]> wrote: Good grief! And they call a 722-line

Re: Saving output of Turtle Graphics?

2007-04-07 Thread Dick Moores
At 09:31 AM 4/7/2007, =?ISO-8859-2?Q?Wojciech_Mu=B3a?= wrote: >Dick Moores wrote: > > What do I do to see this? > >For example Opera 9 and Firefox 1.5+ are able to view SVG files; >there is a free plugin for IrfanView. Ha. I had tried it with Firefox 2 already, but I stupidly changed the extensio

Is http://cheeseshop.python.org/pypi/ having issues

2007-04-07 Thread RobJ
Has any one noticed any issues with http://cheeseshop.python.org/pypi/ ? I have been trying for hours to install packages (using easy_install) but the connection keeps timing out. Any Help would be a appreciated. Rob J -- http://mail.python.org/mailman/listinfo/python-list

Re: Checking whether list element exists

2007-04-07 Thread Terry Reedy
"Rehceb Rotkiv" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I want to check whether, for example, the element myList[-3] exists. So | far I did it like this: | | index = -3 | if len(myList) >= abs(index): | print myList[index] # Note that tabs gets lost in some newsreaders. Space

Re: Custom Python Runtime

2007-04-07 Thread Terry Reedy
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> Is there a way to customize the Windows build? In my case, there is no need | > to build an installer. The best way is to have everything in a directory, as | > long as I know where to find Python and Python know

Re: How to tell when a file is opened

2007-04-07 Thread Terry Reedy
"Adam" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hello, | | I want to know if it possible to tell when a file is opened. Just by Python? (Hack the file and open and possibly os.open code) or by any program? (Hack the OS -- good luck!) -- http://mail.python.org/mailman/lis

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 119" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Is http://cheeseshop.python.org/pypi/ having issues

2007-04-07 Thread David Boddie
On Saturday 07 April 2007 19:36, RobJ wrote: > Has any one noticed any issues with http://cheeseshop.python.org/pypi/ > ? I have been trying for hours to install packages (using > easy_install) but the connection keeps timing out. Don't worry, you're not the first person to notice: http://mail.

Re: Comments in ConfigParser module

2007-04-07 Thread Joel Granados
On 4/6/07, James Stroud <[EMAIL PROTECTED]> wrote: Joel Andres Granados wrote: > Hi list: > Any comment greatly appreciated Very clever. -- http://mail.python.org/mailman/listinfo/python-list clever ??? Well I would expect that the ";" character to behave the same way that the "#", as th

Re: Dr Jeff King, A Jewish MIT Engineer is the LEAD SPEAKER on 911 truth, no Islamics involved http://video.google.com/videoplay?docid=1822764959599063248

2007-04-07 Thread Dr. V I Plankenstein
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > See the video with your own EYEBALLS, that is if you have some courage > and shame left: > > http://video.google.com/videoplay?docid=1822764959599063248 OK - I watched the video and I think it is a ridiculous position. They claim tha

Re: Is http://cheeseshop.python.org/pypi/ having issues

2007-04-07 Thread RobJ
On Apr 7, 1:51 pm, David Boddie <[EMAIL PROTECTED]> wrote: > On Saturday 07 April 2007 19:36, RobJ wrote: > > > Has any one noticed any issues withhttp://cheeseshop.python.org/pypi/ > > ? I have been trying for hours to install packages (using > > easy_install) but the connection keeps timing out.

Unicode problem

2007-04-07 Thread Rehceb Rotkiv
Please have a look at this little script: #!/usr/bin/python import sys import codecs fileHandle = codecs.open(sys.argv[1], 'r', 'utf-8') fileString = fileHandle.read() print fileString if I call it from a Bash shell like this $ ./test.py testfile.utf8.txt it works just fine, but when I try to p

Re: Checking whether list element exists

2007-04-07 Thread Rehceb Rotkiv
Thanks for your many helpful tips! Rehceb Rotkiv -- http://mail.python.org/mailman/listinfo/python-list

Re: How to tell when a file is opened

2007-04-07 Thread Adam
On Apr 7, 5:09 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > Adam wrote: > > I want to know if it possible to tell when a file is opened. However I > > don't want it to be the last access time. I want to know how many > > times a file opened so I can generate statistics of file usage. > > > I will be

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 120" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 120" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 120" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
> Complain to the providers of the server? Or find out what the host >name is for the outgoing SMTPd connection, and use it directly. Complaining isn't going to help. How do I determine the outgoing smtpd connection and how do I use it directly? TIA, Eric __

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > Lorenzo Thurman wrote: > >> I'm using the Mimewriter and mimetools modules to create html messages. >> They work OK, except that when the messages are received, they always >> have the timestamp of 12/31/1969. I've looked through both packages and >> can't find anything

Re: How to tell when a file is opened

2007-04-07 Thread Gabriel Genellina
Adam wrote: > On Apr 7, 5:09 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > Adam wrote: > > > I want to know if it possible to tell when a file is opened. However I > > > don't want it to be the last access time. I want to know how many > > > times a file opened so I can generate statistics of fi

Re: Mail not setting timestamp

2007-04-07 Thread Gabriel Genellina
Lorenzo Thurman wrote: > Gabriel Genellina wrote: > > Lorenzo Thurman wrote: > > > >> I'm using the Mimewriter and mimetools modules to create html messages. > >> They work OK, except that when the messages are received, they always > >> have the timestamp of 12/31/1969. I've looked through both pa

Re: tuples, index method, Python's design

2007-04-07 Thread 7stud
On Apr 7, 8:27 am, Carsten Haese <[EMAIL PROTECTED]> wrote: > On Sat, 2007-04-07 at 06:45 -0700, [EMAIL PROTECTED] wrote: > > Carsten Haese: > > > The lack of convincing use cases is still a pertinent reason today. Note > > > that the original poster on this thread did not present a use case for >

Re: Unicode problem

2007-04-07 Thread Gabriel Genellina
Rehceb Rotkiv wrote: > #!/usr/bin/python > import sys > import codecs > fileHandle = codecs.open(sys.argv[1], 'r', 'utf-8') > fileString = fileHandle.read() > print fileString > > if I call it from a Bash shell like this > > $ ./test.py testfile.utf8.txt > > it works just fine, but when I try to p

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 121" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 121" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 121" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: Comments in ConfigParser module

2007-04-07 Thread Gabriel Genellina
Joel Andres Granados wrote: > The module also allows the comments to appear in the same line as the > "name = value" constructs. The only difference being that this is only > possible with ";" and not with "#" character. I did not see this in the > documentation but this is how it is behaving.

Re: Convert xml symbol notation

2007-04-07 Thread Gabriel Genellina
Martin v. Löwis wrote: > >> I'm working on a script to download and parse a web page, and it > >> includes xml symbol notation, such as ' for the ' character. Does > > > > Try the htmlentitydefs module. > > That won't help: this is a character reference, not an entity reference. > htmlentitydefs

Re: Pyserial example program error: win32file.SetupComm reports 'Incorrect function.'

2007-04-07 Thread hg
Dennis Lee Bieber wrote: > On Sat, 07 Apr 2007 11:36:05 +0200, hg <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > >> >> I am now facing your problem ... on a machine that used to work fine. >> >> Have you figured it out ? >> >> Could it be a conflict between pyserial and p

Re: Objects, lists and assigning values

2007-04-07 Thread Manuel Graune
"7stud" <[EMAIL PROTECTED]> writes: > > What book are you reading? > I worked my way through most of the online-docs. A bit to casual obviously. As printed desktop-reference I use a german book called "Python ge-packt". -- A hundred men did the rational thing. The sum of those rational choic

Re: How to tell when a file is opened

2007-04-07 Thread Adam
On Apr 7, 8:02 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > Adam wrote: > > On Apr 7, 5:09 pm, Tim Golden <[EMAIL PROTECTED]> wrote: > > > Adam wrote: > > > > I want to know if it possible to tell when a file is opened. However I > > > > don't want it to be the last access time. I want to k

Re: 1 Thread = 3 interpreter launched ???

2007-04-07 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi all, and thanks for reading ! > > I'm using Python 2.4.2 with an embedded platform (16MB RAM) running > Linux 2.6.20. > My main script use a thread for some reasons (more precisely a > periodic timer within a separate module). > While looking at the memory consumpti

Re: Understanding Python's interpreter

2007-04-07 Thread Steve Holden
Mike C. Fletcher wrote: > Steve Holden wrote: >> Rafael Almeida wrote: >> > ... >> Because they aer smarter than you, without wishing to be too rude. >> > Replace that with "more experienced", please. Otherwise it is a bit > rude, despite your wishes. We've always been newbie positive on

Re: Objects, lists and assigning values

2007-04-07 Thread 7stud
On Apr 7, 2:52 pm, Manuel Graune <[EMAIL PROTECTED]> wrote: > "7stud" <[EMAIL PROTECTED]> writes: > > > What book are you reading? > > I worked my way through most of the online-docs. A bit to casual > obviously. > See the online tutorial's section on default function arguments here: http://docs.

Re: block scope?

2007-04-07 Thread Steve Holden
Alex Martelli wrote: > Neal Becker <[EMAIL PROTECTED]> wrote: >... >>> i = 5 >>> for my i in xrange(4): >>>if i: # skips first when i is 0 >>> my i = 100 >>> if i: >>>print i # of course 100 >>> break >>>print i # i is between 0 & 3 her

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 122" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 122" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 122" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Antigen Notification: Antigen found a message matching a filter

2007-04-07 Thread Antigen_VITORIA
Microsoft Antigen for Exchange found a message matching a filter. The message is currently Detected. Message: "Python_list Digest_ Vol 43_ Issue 122" Filter name: "KEYWORD= spam: collect _AND_ check" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/Firs

  1   2   >