Re: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
>From: Dennis Lee Bieber <[EMAIL PROTECTED]> >To: [email protected] >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

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

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

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

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

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

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

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

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

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 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: 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: 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: Can't Get Email Interface Working

2007-04-07 Thread Eric Price
>From: hlubenow <[EMAIL PROTECTED]> >To: [email protected] >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: 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

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

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

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

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

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

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

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

<    1   2