Re: RFC: Assignment as expression (pre-PEP)

2007-04-07 Thread Paul McGuire
On Apr 7, 9:55 pm, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > seriesAndEpnum = Combine( OneOrMore( ~Literal("-") + > Word(alphas) ).setParseAction( capitalizeAll ), > joinString=" ").setResultsName("series") + \ > Word(nums).setResultsName("episodeN

iterator interface for Queue?

2007-04-07 Thread Paul Rubin
Is there any reason Queue shouldn't have an iterator interface? I.e. instead of while True: item = work_queue.get() if item is quit_sentinel: # put sentinel back so other readers can find it work_queue.put(quit_sentinel) break process(ite

Re: Not understanding absolute_import

2007-04-07 Thread Peter Otten
Nate Finch wrote: > On Apr 5, 8:33 am, "Nate Finch" <[EMAIL PROTECTED]> wrote: >> I've been trying to use fromabsolute_importand it's giving me a hell >> of a headache. I can't figure out what it's *supposed* to do, or >> maybe rather, it doesn't seem to be doing what I *think* it's supposed >> t

Re: Why does not my wx.html.HtmlWindow work?

2007-04-07 Thread Thomas Krüger
[EMAIL PROTECTED] schrieb: > html.LoadPage(" > http://www.pythonthreads.com/articles/python/incorporating-into-wxpython-part-1.html";) Quickshot: There's a space at the start of your URI. Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: How to control files such as windows update program?

2007-04-07 Thread soarnil
On 4月8日, 上午10时28分, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > soarnil wrote: > > I hope i could write a program to execute a range of ".exe" files. > > When there is a "Licensing Agreement", the program can choose > > "Accept",then click "Next" until "Finish".Or maybe it could use some > > f

Re: opinion needed

2007-04-07 Thread Carl Trachte
I first found out about Python's Natural Language Processing Toolkit on this Georgia professor's web page: http://www.ai.uga.edu/mc/ He is big on having his students use Prolog for natural language processing. I'm not sure if your interest lies there, but that is one area where (according to the

Re: tuples, index method, Python's design

2007-04-07 Thread Carsten Haese
On Sun, 08 Apr 2007 02:40:52 GMT, Alan Isaac wrote > "Carsten Haese" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Adding useless features always makes a product worse. What's your use > > case for tuple.index? > [...] consider a game, > where the fixed set p of players have a f

Why does not my wx.html.HtmlWindow work?

2007-04-07 Thread [EMAIL PROTECTED]
Below are my source code: import wx import wx.html class MyHtmlFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, -1, title, size=(600,400)) html = wx.html.HtmlWindow (self) if "gtk2" in wx.PlatformInfo: html.SetStandardFon

Re: block scope?

2007-04-07 Thread John Nagle
Paul Rubin wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > I have no opinion of this, locals() has always seemed like a crazy > part of the language to me and I never use it. I'd be happy to see it > gone since it makes compiling a lot easier. I think of that, from a compiler perspective

Re: RFC: Assignment as expression (pre-PEP)

2007-04-07 Thread Paul McGuire
On Apr 5, 4:08 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I love event-based parsers so I have no problem with that > approach in general. You might find a pyparsing version of this to be to your liking. It is possible in the parser events (or "parse actions" as pyparsing calls them) t

Re: beginner - py unicode Q

2007-04-07 Thread Gabriel Genellina
enquiring mind wrote: > I read the posting by Rehceb Rotkiv and response but don't know if it > relates to my problem in any way. > > I only want to write German to the screen/console for little German > programs/exercises in python. No file w/r will be used. > > #! /usr/bin/env python > # -*- co

Re: beginner - py unicode Q error

2007-04-07 Thread John Machin
On Apr 8, 10:05 am, enquiring mind <[EMAIL PROTECTED]> wrote: > Sorry, I miscopied this line of code: print verbs[0:2] and not > as posted print verbs[:3] verbs[0:2] has 2 elements; the output showed 3 elements. Looks like you "miscopied" the output as well :-) If you think you need to make a cor

Re: beginner - py unicode Q

2007-04-07 Thread John Machin
On Apr 8, 9:51 am, enquiring mind <[EMAIL PROTECTED]> wrote: > I read the posting by Rehceb Rotkiv and response but don't know if it > relates to my problem in any way. > > I only want to write German to the screen/console for little German > programs/exercises in python. No file w/r will be used.

Re: tuples, index method, Python's design

2007-04-07 Thread Alan Isaac
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Adding useless features always makes a product worse. What's your use > case for tuple.index? I find this question odd for the following reason: I doubt that *anyone* who programs in Python has not encountered the situa

Re: block scope?

2007-04-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > >>> locals['x']=5 > Traceback (most recent call last): > File "", line 1, in > TypeError: 'builtin_function_or_method' object does not support item > assignment Whoops, yeah, meant "locals()['x'] = 5". > I think that ideally there should be a runtim

Re: How to control files such as windows update program?

2007-04-07 Thread Gabriel Genellina
soarnil wrote: > I hope i could write a program to execute a range of ".exe" files. > When there is a "Licensing Agreement", the program can choose > "Accept",then click "Next" until "Finish".Or maybe it could use some > function to finish this rather then really "click" the buttons. Some instal

Re: How to tell when a file is opened

2007-04-07 Thread momobear
> Will look into NTFS change journals when I get some spare time. How can we get NTFS change journals? Is there any API for this purpose or we could implement our own? there're an api in windows help us montior file changes. win32file.ReadDirectoryChangesW -- http://mail.python.org/mailman/list

Re: block scope?

2007-04-07 Thread Alex Martelli
Paul Rubin wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > > exec? > > option 1: that just runs the compiler a bit later ... > > Besides exec, there's also locals(), i.e. >locals['x'] = 5 > can shadow a variable. Any bad results are probably deserved ;) >>>

How to control files such as windows update program?

2007-04-07 Thread soarnil
I hope i could write a program to execute a range of ".exe" files. When there is a "Licensing Agreement", the program can choose "Accept",then click "Next" until "Finish".Or maybe it could use some function to finish this rather then really "click" the buttons. -- http://mail.python.org/mailman/

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

2007-04-07 Thread skip
>> 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. cyb> I'm having issues still. Wiki too Please try again. Skip -- http://mail.python.org/ma

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

2007-04-07 Thread cyb
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. > > Any Help would be a appreciated. > > Rob J > I'm having issues still. Wiki too -- http://ma

Console UI

2007-04-07 Thread Clement
My project is based on console Application. Is there any console UI except urwid. If so, can i come to know. -- http://mail.python.org/mailman/listinfo/python-list

Re: block scope?

2007-04-07 Thread MRAB
On Apr 7, 8:50 am, James Stroud <[EMAIL PROTECTED]> 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. Funct

Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
>From: hlubenow <[EMAIL PROTECTED]> >To: python-list@python.org >Subject: Re: Can't Get Email Interface Working >Date: Sun, 08 Apr 2007 01:59:53 +0200 > >You can use it just like that: > >--- > >from simplemail import Email >Email( > from_address = "[EMAIL PROTEC

Re: Not understanding absolute_import

2007-04-07 Thread Nate Finch
On Apr 5, 8:33 am, "Nate Finch" <[EMAIL PROTECTED]> wrote: > I've been trying to use fromabsolute_importand it's giving me a hell > of a headache. I can't figure out what it's *supposed* to do, or > maybe rather, it doesn't seem to be doing what I *think* it's supposed > to be doing. No one? Is

Re: block scope?

2007-04-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > > exec? > option 1: that just runs the compiler a bit later ... Besides exec, there's also locals(), i.e. locals['x'] = 5 can shadow a variable. Any bad results are probably deserved ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: block scope?

2007-04-07 Thread Alex Martelli
Aahz <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > Alex Martelli <[EMAIL PROTECTED]> wrote: > >Steve Holden <[EMAIL PROTECTED]> wrote: > >> > >> What do you think the chances are of this being accepted for Python 3.0? > >> It is indeed about the most rational approach, though of c

Re: itertools, functools, file enhancement ideas

2007-04-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > >for line in file_lines(filename): > >crunch(line) > > I'm +/-0 on this one vs the idioms: > with open(filename) as f: > for line in f: crunch(line) > Making two lines into one is a weak use case for a stdlib function. Well, t

Re: block scope?

2007-04-07 Thread John Nagle
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 wor

beginner - py unicode Q error

2007-04-07 Thread enquiring mind
Sorry, I miscopied this line of code: print verbs[0:2] and not as posted print verbs[:3] -- http://mail.python.org/mailman/listinfo/python-list

Re: itertools, functools, file enhancement ideas

2007-04-07 Thread Alex Martelli
Paul Rubin wrote: > I just had to write some programs that crunched a lot of large files, > both text and binary. As I use iterators more I find myself wishing > for some maybe-obvious enhancements: > > 1. File iterator for blocks of chars: > >f = open('foo')

Re: Can't Get Email Interface Working

2007-04-07 Thread hlubenow
Eric Price 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 Ok, "simplemail.py" is quite long. That's b

beginner - py unicode Q

2007-04-07 Thread enquiring mind
I read the posting by Rehceb Rotkiv and response but don't know if it relates to my problem in any way. I only want to write German to the screen/console for little German programs/exercises in python. No file w/r will be used. #! /usr/bin/env python # -*- coding: utf-8 -*- # Filename: 7P

Re: block scope?

2007-04-07 Thread Aahz
In article <[EMAIL PROTECTED]>, Alex Martelli <[EMAIL PROTECTED]> wrote: >Steve Holden <[EMAIL PROTECTED]> wrote: >> >> What do you think the chances are of this being accepted for Python 3.0? >> It is indeed about the most rational approach, though of course it does >> cause problems with dynamic

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 123" Filter name: "KEYWORD= spam: collect _AND_ check" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/Firs

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 123" 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 123" 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 123" Filter name: "KEYWORD= spam: Timing" Sent from: "[EMAIL PROTECTED]" Folder: "SMTP Messages\Inbound And Outbound" Location: "ITURAN/First Administrat

Re: block scope?

2007-04-07 Thread Alex Martelli
Paul Rubin wrote: > [EMAIL PROTECTED] (Alex Martelli) writes: > > Thus the following example does not compile: > > class Test { > > public static void main(String[] args) { > > int i; > > for (int i = 0; i < 10; i++) > > I'm ok wi

Re: block scope?

2007-04-07 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: > What do you think the chances are of this being accepted for Python 3.0? > It is indeed about the most rational approach, though of course it does > cause problems with dynamic namespaces. What problems do you have in mind? The compiler already determine

Re: Debugging multithreaded program using Eclipse/Pydev

2007-04-07 Thread Heikki Toivonen
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 p

Re: Custom Python Runtime

2007-04-07 Thread Martin v. Löwis
> Is this information somewhere on python.org? This is at least an > occasional question here. Part of it. The way Python finds its landmark is in the sources (so it is on svn.python.org/projects/python/trunk/PC/getpathp.c); the minimum set of modules is nowhere documented (and will certainly ch

Re: 1 Thread = 3 interpreter launched ???

2007-04-07 Thread Martin v. Löwis
> When creating the thread, Python forks 2 times and thus consume me > around 60% of RAM ! > It's very critical, am i missed something ? In case Diez's answer isn't clear: you misinterpret the data you see. That each process is listed with 4172kB memory doesn't mean they consume 12000kB together.

Re: Mail not setting timestamp

2007-04-07 Thread Lorenzo Thurman
Gabriel Genellina wrote: > 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.

Re: itertools, functools, file enhancement ideas

2007-04-07 Thread Paul Rubin
Paul Rubin writes: > # loop through all the files crunching all lines in each one > for line in (ichain(file_lines(x) for x in all_filenames)): > crunch(x) supposed to say crunch(line) of course. -- http://mail.python.org/mailman/listinfo/python-lis

Re: block scope?

2007-04-07 Thread Paul Rubin
[EMAIL PROTECTED] (Alex Martelli) writes: > Thus the following example does not compile: > class Test { > public static void main(String[] args) { > int i; > for (int i = 0; i < 10; i++) I'm ok with this; at the minimum, I think such nesting should produce a

itertools, functools, file enhancement ideas

2007-04-07 Thread Paul Rubin
I just had to write some programs that crunched a lot of large files, both text and binary. As I use iterators more I find myself wishing for some maybe-obvious enhancements: 1. File iterator for blocks of chars: f = open('foo') for block in f.iterchars(n=1024): ... iterates thro

Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
>From: Dennis Lee Bieber <[EMAIL PROTECTED]> >To: python-list@python.org >Subject: Re: Can't Get Email Interface Working >Date: Sat, 07 Apr 2007 20:07:53 GMT > >On Sat, 07 Apr 2007 13:42:38 -0500, "Eric Price" ><[EMAIL PROTECTED]> declaimed the following in >comp.lang.python: > > > > Complain to

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  1   2   >