Re: fromutc: dt.tzinfo is not self: pytz.timezone('UTC').fromutc(datetime.utcnow())

2011-10-21 Thread aspineux
On Oct 19, 11:03 pm, Steven D'Aprano wrote: > On Wed, 19 Oct 2011 01:06:53 -0700, aspineux wrote: > > hi > > >>>> import pytz > >>>> from datetime import datetime > >>>> pytz.timezone('GMT0').fromutc(datetime.utcnow()

fromutc: dt.tzinfo is not self: pytz.timezone('UTC').fromutc(datetime.utcnow())

2011-10-19 Thread aspineux
hi >>> import pytz >>> from datetime import datetime >>> pytz.timezone('GMT0').fromutc(datetime.utcnow()) datetime.datetime(2011, 10, 19, 7, 54, 45, 579125, tzinfo=) >>> pytz.timezone('UTC').fromutc(datetime.utcnow()) Traceback (most recent call last): File "", line 1, in ValueError: fromutc:

pyzmail-0.9.9 mail library to read, compose and send emails easily, support for py3k

2011-09-16 Thread aspineux
Now pyzmail include support for python 3.2 and above pyzmail is a high level mail library for Python. It provides functions and classes that help to read, compose and send emails. pyzmail exists because their is no reasons that handling mails with Python would be more difficult than with popular m

Re: Processing a file using multithreads

2011-09-08 Thread aspineux
On Sep 9, 12:49 am, Abhishek Pratap wrote: > Hi Guys > > My experience with python is 2 days and I am looking for a slick way > to use multi-threading to process a file. Here is what I would like to > do which is somewhat similar to MapReduce in concept. > > # test case > > 1. My input file is 10

Re: fun with nested loops

2011-08-31 Thread aspineux
On Aug 31, 5:51 pm, Daniel wrote: > Dear All, > > I have some complicated loops of the following form > > for c in configurations: # loop 1 >     while nothing_bad_happened: # loop 2 >         while step1_did_not_work: # loop 3 >             for substeps in step1 # loop 4a >                 # at t

pyzmail-0.9.0: high level mail library to read, write and send emails easily

2011-08-28 Thread aspineux
Python easy mail library pyzmail is a high level mail library for Python. It provides functions and classes that help to read, compose and send emails. pyzmail exists because their is no reasons that handling mails with Python would be more difficult than with popular mail clients like Outlook or

Re: How to make statements running in strictly sequential fashion like in an interactive shell

2011-08-19 Thread aspineux
On Aug 19, 5:00 pm, lzlu123 wrote: > I have an instrument that has a RS232 type serial comm port and I need > to connect to and control. I use Python 3.2 in Windows XP, plus > pySerial module. I have a problem when I execute a script consisting > of statements that open the comm port, configure it

Re: Word Perfect integration

2011-08-19 Thread aspineux
On Aug 18, 7:00 pm, Ethan Furman wrote: > I have WordPerfect v13 which we are currently using for letter merges. > I would like to automate this with Python instead of learning the WP > Macro language. > > Does anyone have any pointers? > paper letter or eletronic mail merger ? What you need is

Re: extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
On Aug 18, 4:45 pm, Peter Otten <__pete...@web.de> wrote: > aspineux wrote: > > Hi > > I have a closed class and 2 factories function > > > class Data: > >   def __init__(self): > >     self.payload=None > > > def data_from_string(payload): > &

Re: extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
On Aug 18, 4:45 pm, Peter Otten <__pete...@web.de> wrote: > aspineux wrote: > > Hi > > I have a closed class and 2 factories function > > > class Data: > >   def __init__(self): > >     self.payload=None > > > def data_from_string(payload): > &

extend class: include factories functions inside constructor

2011-08-18 Thread aspineux
Hi I have a closed class and 2 factories function class Data: def __init__(self): self.payload=None def data_from_string(payload): data=Data() data.payload=payload return data def data_from_file(f): data=Data() data.payload=f.read() return data And I want to extend the class,

Re: Windows service in production?

2011-08-16 Thread aspineux
On Aug 16, 6:32 am, snorble wrote: > Anyone know of a Python application running as a Windows service in > production? I'm planning a network monitoring application that runs as > a service and reports back to the central server. Sort of a heartbeat > type agent to assist with "this server is down

Re: How to install easy_install on windows ?

2011-08-16 Thread aspineux
On Aug 16, 2:17 pm, smith jack wrote: > it needs read registry, but the python i used is extracted from .zip, > so there is no record in the registry, Noone need it, Python dont use any registry key > what should i do in order to install easy_install for my python environment? get ez_setup.py f

Re: Idea for pure-python templates using AST.

2011-08-16 Thread aspineux
On Aug 16, 1:33 pm, "Paul Wray" wrote: > Hello all > > Ive had what I think is a great idea for pure-python templates (I can almost > hear the groans, bear with me...) > > For the impatient, proof of concept is athttp://pastie.org/2379978 > demonstrating simple substitution, balanced tags using co

Re: Messed up Mac installation

2011-08-16 Thread aspineux
On Aug 16, 12:03 pm, Christopher Brewster wrote: > Are there instructions somewhere online as to how to sort out a messed > up installation of Python on a Mac? > I have a 2 month old Macbook running Snow Leopard, I installed Python > 2.7.1 some time ago. Now when I run 'python' this is what it sho

Re: generate and send mail with python: tutorial

2011-08-13 Thread aspineux
On Aug 13, 3:00 am, Ben Finney wrote: > Ben Finney writes: > > What is the process if the OP, or someone to whom the OP delegates > > authority, wants to [contribute their work to the Python > > documentation]? > > The answer is partly at http://docs.python.org/documenting/>: > >     If you’re in

Re: thread and process

2011-08-13 Thread aspineux
On Aug 13, 11:09 am, "守株待兔" <1248283...@qq.com> wrote: > please see my code: > import os > import threading > print threading.currentThread() > print "i am parent ",os.getpid() > ret = os.fork() > print "i am here",os.getpid() > print threading.currentThread() > if ret == 0: > p

Re: generate and send mail with python: tutorial

2011-08-12 Thread aspineux
On Aug 12, 3:38 pm, Steven D'Aprano wrote: > aspineux wrote: > > Hi I have written a tutorial about how to generate and send emails > > with python. > > [...] > > Thank you, that is an extremely detailed tutorial. Thanks, It was my intention Alain > > -

Re: fork problem

2011-08-12 Thread aspineux
On Aug 12, 4:18 pm, "守株待兔" <1248283...@qq.com> wrote: > in the book ,A call to wait() suspends execution (i.e., waits) until a child > process (any child process) has completed, terminating either normally or via > a signal. wait() will then reap the child, releasing any resources. If the > chil

Re: generate and send mail with python: tutorial

2011-08-12 Thread aspineux
On Aug 12, 8:51 am, Dennis Lee Bieber wrote: > On Thu, 11 Aug 2011 08:07:09 -0700 (PDT), aspineux > declaimed the following in gmane.comp.python.general: > > > Hi I have written a tutorial about how to generate and send emails > > with python. > >         Is that r

generate and send mail with python: tutorial

2011-08-11 Thread aspineux
Hi I have written a tutorial about how to generate and send emails with python. You can find it here http://blog.magiksys.net/generate-and-send-mail-with-python-tutorial And here is the content. Enjoy. This article follows two other articles (1, 2) about how to parse emails in Python. These art

HOWTO: Parsing email using Python part1

2011-07-03 Thread aspineux
Hi I have written an article about parsing email using Python. The article is at http://blog.magiksys.net/Parsing-email-using-python-header and the full content is here. Hope this help someone. Regards. A lot of programs and libraries commonly used to send emails don't comply with RFC. Ignore s

Re: email library, get_payload() bug?

2011-02-18 Thread aspineux
On 18 fév, 14:41, peterob wrote: > Helllo, > > I want to get the raw format of email body. the code Im using is > >         for part in email.walk(): >                 if part.get_content_maintype() == 'multipart': >                         continue >                 if part.get_content_type() ==

Re: Question on Creating exe file with py2exe

2011-02-15 Thread aspineux
On 13 fév, 06:20, joy99 wrote: > On Feb 13, 1:29 am, aspineux wrote: > > > > > > > Hi > > > I'm releasing a .exe made with py2exe myself an got this problem too. > > 99% of the time the required DLL is already installed by another > > applicat

Re: How to create a dict based on such a file?

2011-02-13 Thread aspineux
On 14 fév, 06:47, Wang Coeus wrote: > Hi all, > I am new to python. Currently I encountered a problem, please help me to > solve this. Thanks in advance! > I have a file like below: ConfigParser Library does exacly what you want but with .ini file format [block1] key1=value1 key2=value2 ... Can

Re: files,folders,paths

2011-02-13 Thread aspineux
Without trying to understand your code, I see one difference if not os.path.isfile(destination+leftover+fname): become if not os.path.isfile(destination+leftover): Regards On Feb 13, 11:06 am, ecu_jon wrote: > i have a samba server at home (acting as my test environment) with one > of

Re: Question on Creating exe file with py2exe

2011-02-12 Thread aspineux
Hi I'm releasing a .exe made with py2exe myself an got this problem too. 99% of the time the required DLL is already installed by another application and you don't need to care about it. The 1% is about empty or fresh windows install (server most of the time) For them, I provide a link to the M$ v

generating .zip including __main__.py file in top root using distutils

2011-02-12 Thread aspineux
Python 2.6 can run a zip file, searching for __main__.py in the root of the zip archive and running it. How can I create such an archive using distutils (and not setuptools) ? If I use # python setup.py bdist --format=zip I get a "dumb" zip file with a deep tree structure from "/" and I cannot put

Re: call to pypcap in separate thread blocks other threads

2009-12-30 Thread aspineux
On Dec 30, 3:07 pm, Dmitry Teslenko wrote: > On Wed, Dec 30, 2009 at 16:18, aspineux wrote: > > On Dec 30, 1:34 pm, Dmitry Teslenko wrote: > >> Hello! > >> I'm making gui gtk application. I'm using pypcap > >> (http://code.google.com/p/pypcap/) to

Re: call to pypcap in separate thread blocks other threads

2009-12-30 Thread aspineux
t; > Using another process instead of thead isn't appropriate. > > Thread initialization looks like and takes place before gtk.main(): > > self.__pcap_thread = threading.Thread(target = self.get_city_from_pcap) > self.__pcap_thread.start() Did you try using build-in g

/kolab/bin/python: double free or corruption (fasttop)

2008-12-28 Thread aspineux
I got this. This is a test script, to help me to understand why I have unexpected result in application. But I got a more unexpected result, and probably wrong error message about the read-only cursor. The full script is at the end. db cleanup, 326 records deleted, 9990 remains Exception in threa

Re: short path evaluation, why is f() called here: dict(a=1).get('a', f())

2008-01-15 Thread aspineux
On Jan 14, 8:07 pm, aspineux <[EMAIL PROTECTED]> wrote: > On Jan 14, 7:49 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > On Jan 14, 2008 12:39 PM, aspineux <[EMAIL PROTECTED]> wrote: > > > > This append in both case > > >

Re: short path evaluation, why is f() called here: dict(a=1).get('a', f())

2008-01-15 Thread aspineux
On Jan 15, 12:15 am, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: > > map = {'a': Aclass, 'b': Bclass, 'c': Cclass} > > class_ = map.get(astring, default=Zclass) > > > The result I want is the class, not the result of calling the class > > (which would

Re: short path evaluation, why is f() called here: dict(a=1).get('a', f())

2008-01-14 Thread aspineux
On Jan 14, 7:49 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Jan 14, 2008 12:39 PM, aspineux <[EMAIL PROTECTED]> wrote: > > > > > This append in both case > > > dict(a=1).get('a', f()) > > dict(a=1).setdefault('a', f

short path evaluation, why is f() called here: dict(a=1).get('a', f())

2008-01-14 Thread aspineux
This append in both case dict(a=1).get('a', f()) dict(a=1).setdefault('a', f()) This should be nice if f() was called only if required. Regards. -- http://mail.python.org/mailman/listinfo/python-list

Re: How a smart editor could make "Postfix type declarations PEP3117" in Python3000 more readable

2008-01-05 Thread aspineux
On Jan 5, 4:39 am, aspineux <[EMAIL PROTECTED]> wrote: > Hi > > I read the PEP 3117 about the new "Postfix type declarations" in > Python3000. > THIS PEP as been REJECTED ! But ... > > The notation in the PEP is very ugly ! This make python code more &

How a smart editor could make "Postfix type declarations PEP3117" in Python3000 more readable

2008-01-04 Thread aspineux
Hi I read the PEP 3117 about the new "Postfix type declarations" in Python3000. THIS PEP as been REJECTED ! But ... The notation in the PEP is very ugly ! This make python code more difficult to read! Anyway when I switched to python (from C, C++, ..), I suffered a lot of the untyped python va

Re: file reading by record separator (not line by line)

2007-05-31 Thread aspineux
something like name=None lines=[] for line in open('yourfilename.txt'): if line.startwith('>'): if name!=None: print 'Here is the record', name print lines print name=line.stripr('\r') lines=[] else: lines.append(line.str

Re: non standard path characters

2007-05-31 Thread aspineux
I thing you should change the code page before to run the test, doing something like : c:\> chcp 850 c:\> \python.exe ..\test.py look for the good code page for you, maybe 850, 437 or 1230 or 1250 should work Regards On 31 mai, 12:17, Robin Becker <[EMAIL PROTECTED]> wrote: > A kind u

Re: replace the base class

2007-05-31 Thread aspineux
Larry: Using "as", I cannot use both Circle and ColorCircle or more like 3DCircle ... at the same time, only one of them. But this is a easy solution in some cases. On 31 mai, 00:25, Matimus <[EMAIL PROTECTED]> wrote: Hi Martimus, your idea was a good one, I used it to meet my _particular_ need

Re: file / module / package - import problem

2007-05-30 Thread aspineux
The filename and its path is in global variable __file__ (that is different in any source file) try import os.path file=open(os.path.join(os.path.dirname(__file__), 'hauteur.yaml')) On 30 mai, 22:22, EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote: > Hi there, > > I have a "problem" which co

replace the base class

2007-05-30 Thread aspineux
Hi I would like a kind of function able to replace the base class like that: class Graph: pass class Circle(Graph): pass class Square(Graph): pass class ColorGraph: pass def Adopt(new_base_class, child_class, old_base_class): return newclass ColorCircle=Adopt(Col

Re: need advice on building core code for python and PHP

2007-05-24 Thread aspineux
On 24 mai, 19:33, Szabolcs Nagy <[EMAIL PROTECTED]> wrote: > > Is there a way I could code the base (core) code in Python and have > > PHP call it? I've really liked using SQLAlchemy and there are other > > * quick and dirty solution: > in a shell: > $ python yourscript.py pipe_out > in the php

Re: modifying values of List or Dictionary when iterating on them

2007-05-24 Thread aspineux
On 24 mai, 19:21, "Christopher Anderson" <[EMAIL PROTECTED]> wrote: > > d=dict(a=1, b=2, c=3) > > for k, v in d.iteritems(): > > d[k]=d[k]+1 > > You might as well do: d[k] = v + 1, like for the list. ops, yes it was a typo -- http://mail.python.org/mailman/listinfo/python-list

Re: No file from stdin

2007-05-24 Thread aspineux
On 24 mai, 18:48, Tartifola <[EMAIL PROTECTED]> wrote: > Hi, > suppose a script of python is waiting for a file from the stdin and none > is given. How can I make the script to stop and, for example, print an > error message? > > Sorry for the n00b question and thanks import sys import os.path if

modifying values of List or Dictionary when iterating on them

2007-05-24 Thread aspineux
Hello I just want to update the data inside List or Dictionary without adding or deleting object. is this correct ? l=[1, 2, 3] for i, v in enumerate(l): l[i]=v+1 d=dict(a=1, b=2, c=3) for k, v in d.iteritems(): d[k]=d[k]+1 Both works, but : are they correct ? are they optimum for big

Re: Nice "bug" to loose a contest

2007-04-12 Thread aspineux
On 8 avr, 13:40, "aspineux" <[EMAIL PROTECTED]> wrote: > This code works like the python one, > I dont use buffered stdio f... functions, > but the more 'system call' read and write > > int main() > { > char buf[120]; > i

Re: Nice "bug" to loose a contest

2007-04-08 Thread aspineux
This code works like the python one, I dont use buffered stdio f... functions, but the more 'system call' read and write int main() { char buf[120]; int len; while (len=read(1, buf, sizeof(buf))) { write(1, buf, len); } return 0; } I dont understand what is appening,

How to set program name in Python : success

2007-04-08 Thread aspineux
here is the trick I found # ( exec -a "pgm.py" python < pgm.py ) & # ps ax | grep pgm.py 22334 pts/2S+ 0:00 pgm.py this solution works on linux and probably all BSD too, but don't let specify any arguments. If someone know a better solution -- http://mail.python.org/mailman/list

Re: BaseHTTPRequestHandler reading .html with python code

2007-04-06 Thread aspineux
On 6 avr, 11:52, [EMAIL PROTECTED] wrote: > H! > > I was wondering how I can do something like this. Use a template engine like : Genshi Django/Jinja Cheetah Kid template For more engine look at http://www.turbogears.org/cogbin/ And maybe what you are looking fore is a complete framework like

Re: saving Python process state for later debugging

2007-04-01 Thread aspineux
On 1 avr, 09:39, [EMAIL PROTECTED] wrote: > On Apr 1, 2:07 am, "aspineux" <[EMAIL PROTECTED]> wrote: > > > > > Pylon has something like > > that.http://pylonshq.com/docs/0.9.4.1/interactive_debugger.html > > > Turbogears has the same with option

Re: saving Python process state for later debugging

2007-03-31 Thread aspineux
On 31 mar, 16:48, [EMAIL PROTECTED] wrote: > Hi! > > Is there a way to save the state of a Python process for later > inspection with a debugger? One way to do this is to dump core, but is > the result usable for debugging with pdb (it can be debugged by gdb, > which can inspect PyObjects in a CPyt

Re: A nice way to use regex for complicate parsing

2007-03-30 Thread aspineux
On 29 mar, 17:33, "Paul McGuire" <[EMAIL PROTECTED]> wrote: > On Mar 29, 9:42 am, Shane Geiger <[EMAIL PROTECTED]> wrote: > > > It would be worth learning pyparsing to do this. > > Thanks to Shane and Steven for the ref to pyparsing. I also was > struck by this post, thinking "this is pyparsing wr

Re: make RE more cleaver to avoid inappropriate : sre_constants.error: redefinition of group name

2007-03-30 Thread aspineux
On 30 mar, 00:13, "Paddy" <[EMAIL PROTECTED]> wrote: > On Mar 29, 3:22 pm, "aspineux" <[EMAIL PROTECTED]> wrote: > > > > > I want to parse > > > '[EMAIL PROTECTED]' or '<[EMAIL PROTECTED]>' and get the email

Re: make RE more cleaver to avoid inappropriate : sre_constants.error: redefinition of group name

2007-03-29 Thread aspineux
On 29 mar, 16:22, "aspineux" <[EMAIL PROTECTED]> wrote: > I want to parse > > '[EMAIL PROTECTED]' or '<[EMAIL PROTECTED]>' and get the email address [EMAIL > PROTECTED] > > the regex is > > r'<[EMAIL PROTECTED]>|[EMAI

A nice way to use regex for complicate parsing

2007-03-29 Thread aspineux
My goal is to write a parser for these imaginary string from the SMTP protocol, regarding RFC 821 and 1869. I'm a little flexible with the BNF from these RFC :-) Any comment ? tests=[ 'MAIL FROM:<[EMAIL PROTECTED]>', 'MAIL FROM:[EMAIL PROTECTED]', 'MAIL FROM:<[EMAIL PROTECTED]> SI

make RE more cleaver to avoid inappropriate : sre_constants.error: redefinition of group name

2007-03-29 Thread aspineux
I want to parse '[EMAIL PROTECTED]' or '<[EMAIL PROTECTED]>' and get the email address [EMAIL PROTECTED] the regex is r'<[EMAIL PROTECTED]>|[EMAIL PROTECTED]' now, I want to give it a name r'<(?P[EMAIL PROTECTED])>|(?P[EMAIL PROTECTED])' sre_constants.error: redefinition of group name 'emai

Re: Make variable global

2007-03-21 Thread aspineux
try >>> import a >>> a.blah >>> a.go() >>> a.blah or rewrite a.py like this blah = [ None ] def go(): global blah blah[0] = 5 # and not blah=[5] then >>> from a import * >>> blah >>> go() >>> blah will work as expected in case 1 ( import a ) blah in a.py and a.blah in python interpr

Re: Automagically log changes in table

2007-03-18 Thread aspineux
On 18 mar, 04:20, "George Sakkis" <[EMAIL PROTECTED]> wrote: > On Mar 17, 7:59 pm, "aspineux" <[EMAIL PROTECTED]> wrote: > > > Hi > > > You can get this using "triggers" and "stored procedures". > > These are SQL eng

Re: MIME Magic

2007-03-17 Thread aspineux
On 18 mar, 00:54, "Samuel" <[EMAIL PROTECTED]> wrote: > On Mar 18, 12:30 am, Jorge Godoy <[EMAIL PROTECTED]> wrote: > > > I'd start by taking a look at "file"'s code. :-) > > > The thing is being able to identify the signatures of several different > > types > > of files. Here's some help for >

Re: tkinter grid vs pack

2007-03-17 Thread aspineux
On 18 mar, 16:49, Gigs_ <[EMAIL PROTECTED]> wrote: > For what is grid better than pack, and otherwise? > > thanks in advance Grid are useful to align items vertically _AND_ horizontally ! For example to make adialog box with label of different length Firstname: John__ Lastname: Smith_

Re: Automagically log changes in table

2007-03-17 Thread aspineux
Hi You can get this using "triggers" and "stored procedures". These are SQL engine dependent! This is available for long time with postgress and only from version 5 with mysql. This let you write SQL code (Procedure) that will be called when "trigged" by an event like inserting new row, updating r

Re: favourite editor

2007-02-13 Thread aspineux
I'm very happy with eclipse and its python module called pydev. It's a little slow because it parse continuously the code (P4 >2.0Ghz required), but give nice realtime info by underlining syntax error or unknown variable (very very useful when miss spelling a variable or a function :-) On 11 fé

Re: result of os.times() is different with 'time' command

2007-02-03 Thread aspineux
EMAIL PROTECTED]>, > > > > "aspineux" <[EMAIL PROTECTED]> writes: > > On 2 Feb, 19:30, [EMAIL PROTECTED] wrote: > > > Hi, > > > > I have a question about os.times(). > > > os.times() returns a tuple containing user time and system time, > &

Re: asyncore DoS vulnerability

2007-02-03 Thread aspineux
On 2 fév, 16:32, "billie" <[EMAIL PROTECTED]> wrote: > >> Why does this exception isn't handled inside asyncore.py? > > To do what ? To raise a custom asyncore error ? > > asyncore aims to be a framework, right? > I think that when select() limit is reached asyncore should just drop > other connect

Re: result of os.times() is different with 'time' command

2007-02-02 Thread aspineux
I dont see anything wrong ! Did you try to measure time with your watch ? Did you try a simple python test.py without the time command ? Maybe python is 'disturbed' by the intel core Here my result on a linux dual AMD, python 2.4.3 # time python test.py n=35, v=14930352 utime=22.54, stime=0.02

Re: imaplib : error reporting use 'randomly' exception or return value

2007-02-02 Thread aspineux
if typ=='BYE': raise self.bye(dat[-1]) elif typ=='BAD': raise self.bad(dat[-1]) else: raise self.error(dat[-1]) return typ, dat On 1 fév, 23:28, "aspineux" <[EMAIL PROTECTED]> wrote: > imaplib use exception to report errors,

Re: asyncore DoS vulnerability

2007-02-02 Thread aspineux
Did you take a look for "too many file descriptors in select()" on google. On 1 fév, 20:18, "billie" <[EMAIL PROTECTED]> wrote: > Hi all. I've just terminated a server application using asyncore / > asynchat frameworks. > I wrote a test script that performs a lot of connections to the server > app

Re: how to add class attributes in __new__

2007-02-01 Thread aspineux
On 1 fév, 17:50, "jeremito" <[EMAIL PROTECTED]> wrote: > I am subclassing the array class and have __new__ to initialize and > create my class. In that class I create not only do I create an array > object, but I also create some other data in __new__ I want to have > access to outside of __new__.

Re: python executing windows exe

2007-02-01 Thread aspineux
First look if your .exe will accept to work that way ! try in a DOS prompt > echo yourfilename | nec2d.exe or if the program expect more input, write them all in a file ( myinputs.txt ) and try : > nec2d.exe < myinputs.txt If it works looks for module subprocess and more precisely object subpro

Re: LDAP/LDIF Parsing

2007-02-01 Thread aspineux
The tree hierarchy is defined by the DN of each object, the types of the object is specified by its objectClass. Just collect all items (or do it dynamically by tunning the scope and the base of your search request) On 1 fév, 18:22, "Cruelemort" <[EMAIL PROTECTED]> wrote: > All, > > I am hoping

imaplib: support for more cyrus extension : expire

2007-02-01 Thread aspineux
setacl and getacl look to be already "Cyrus" specific (according the doc), why not to extend imaplib a little bit more ? Here are some code I wrote and tested to support cyrus "expire" that manage how long a message can stay into a mailbox. This is usefull for NEWS server ! The code is preceded b

imaplib : error reporting use 'randomly' exception or return value

2007-02-01 Thread aspineux
imaplib use exception to report errors, but some problems must be detected by checking the return value ! For example, when trying to append into a mailbox with wrong ACL, imaplib return 'NO', but dont raise any exception (I give a sample at the end). This make error handling more complicate, beca