ExcelMailer 0.2

2007-12-23 Thread mario ruggier
It is a pleasure to announce this first public release of ExcelMailer. ExcelMailer is a small os-independent command line business tool for emailing personalized messages with attachments. Data and options are specified via an Excel file and the message content via plain text or HTML file

Re: Modify arguments between __new__ and __init__

2007-12-23 Thread Arnaud Delobelle
On Dec 23, 5:03 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: When you call a new-style class, the __new__ method is called with the user-supplied arguments, followed by the __init__ method with the same arguments. I would like to modify the arguments after the __new__

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Akihiro KAYAMA
Thanks for your replies. In article [EMAIL PROTECTED], Arnaud Delobelle [EMAIL PROTECTED] writes: arnodel def f1(): arnodel print f1 start arnodel yield f2, arnodel print f1 foo arnodel v = yield f2, arnodel print f1 v=%s world % v arnodel yield f2, OK arnodel print

Re: Detecting memory leaks on apache, mod_python

2007-12-23 Thread Ilias Lazaridis
On Dec 23, 2:47 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Sat, 22 Dec 2007 13:05:23 -0800, Dennis Lee Bieber wrote: I've never encountered such items supported by the language. OS specific extensions MIGHT supply it... Picky picky... but of course you are

Re: Inter-process communication, how? Part 2

2007-12-23 Thread Guilherme Polo
2007/12/22, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hello, just to recap: last time I asked how to do an interprocess communitation, between one Manager process (graphical beckend) and some Worker processes. I decided to go with sockets, thanks for replies, once more. However, I would like

Re: Element bug?(ElementTree)

2007-12-23 Thread Fredrik Lundh
limodou wrote: I don't know if it's a bug? Try below code: from elementtree.ElementTree import Element a = Element('a') if a: ... print '' ... a.__len__() 0 You can see if I test a, the result will be False. I don't know if it's an expected result, but this thing

Re: 5 queens

2007-12-23 Thread cf29
To make it simple and not have to deal with the 8 queens problem that is different with the 5 queens one, I'll ask in a different way. I am not familiar with implementing in Python such terms as standard depth-first search of the solution space, permutation, recursion, 'canonical' form, ... I

Local variables in classes and class instantiation

2007-12-23 Thread A.J. Bonnema
Hi all, I just started using Python. I used to do some Java programming, so I am not completely blank. I have a small question about how classes get instantiated within other classes. I have added the source of a test program to the bottom of this mail, that contains 3 methods within a

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Duncan Booth
Akihiro KAYAMA [EMAIL PROTECTED] wrote: Thanks for your replies. But current Python generator specification requires me: def f1(): for x in foo(f2, foo): yield x for x in foo(f2, foo): yield x # XXX v = ... (I don't know how to do this) for x in foo(f2, v=%s world % v,

Re: Local variables in classes and class instantiation

2007-12-23 Thread Matt Nordhoff
A.J. Bonnema wrote: Hi all, I just started using Python. I used to do some Java programming, so I am not completely blank. I have a small question about how classes get instantiated within other classes. I have added the source of a test program to the bottom of this mail, that

Re: Passing by reference

2007-12-23 Thread MartinRinehart
Dennis Lee Bieber wrote: Great if one is using a teletype as editor The original Dartmouth computer room was a basement that featured 8 teletypes. The original BASIC, Dennis, was implemented on a time-shared mainframe with a gigantic 8k words (20-bit words, if I remember) of core memory.

Re: Local variables in classes and class instantiation

2007-12-23 Thread Peter Otten
A.J. Bonnema wrote: I have a small question about how classes get instantiated within other classes. I have added the source of a test program to the bottom of this mail, that contains 3 methods within a testclass that each instantiate the same class and bind it to a local variable. My

Re: Passing by reference

2007-12-23 Thread MartinRinehart
Bruno Desthuilliers wrote: [EMAIL PROTECTED] a �crit : Bruno Desthuilliers wrote: ... that's definitively not something I'd store in global. So where would you put it? You don't have to put functions arguments anywhere - they're already local vars. Bruno, right now I've got

Re: Inter-process communication, how? Part 2

2007-12-23 Thread ecir . hana
On Dec 23, 4:54 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Sat, 22 Dec 2007 17:56:05 -0800 (PST), [EMAIL PROTECTED] declaimed the following in comp.lang.python: just to recap: last time I asked how to do an interprocess communitation, between one Manager process (graphical beckend)

Re: Inter-process communication, how? Part 2

2007-12-23 Thread ecir . hana
On Dec 23, 10:30 am, Guilherme Polo [EMAIL PROTECTED] wrote: 2007/12/22, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hello, just to recap: last time I asked how to do an interprocess communitation, between one Manager process (graphical beckend) and some Worker processes. I decided to go

Re: Modify arguments between __new__ and __init__

2007-12-23 Thread Steven D'Aprano
On Sat, 22 Dec 2007 23:01:50 -0700, Steven Bethard wrote: Steven D'Aprano wrote: When you call a new-style class, the __new__ method is called with the user-supplied arguments, followed by the __init__ method with the same arguments. I would like to modify the arguments after the __new__

Re: 5 queens

2007-12-23 Thread Steven D'Aprano
On Sun, 23 Dec 2007 02:22:38 -0800, cf29 wrote: How would you write a function that will populate a list with a list of numbers with all the possibilities? For example a list of 3 numbers taken among 4 [0,1,2,3] without duplicates. The result should be: [0,1,2] [0,1,3] [0,2,3] [1,2,3]

Re: Element bug?(ElementTree)

2007-12-23 Thread limodou
On Dec 23, 2007 5:30 PM, Fredrik Lundh [EMAIL PROTECTED] wrote: limodou wrote: I don't know if it's a bug? Try below code: from elementtree.ElementTree import Element a = Element('a') if a: ... print '' ... a.__len__() 0 You can see if I test a, the

Python DLL in Windows Folder

2007-12-23 Thread Markus Gritsch
Hi, why does the Python installer on Windows put the Python DLL into the Windows system32 folder? Wouldn't it be more clean to place it into the Python installation folder beside the python.exe file? Kind regards, Markus -- http://mail.python.org/mailman/listinfo/python-list

Unicode Regular Expressions

2007-12-23 Thread bryan rasmussen
Hi, I'm writing a program that requires specifically Unicode regular expressions http://unicode.org/reports/tr18/ to be loaded in from an external file and then interpreted against the data. if I use Python Regular expressions is there a flag I can set to specify that the regular expressions

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Duncan Booth wrote: Unfortunately generators only save a single level of stack-frame, so they are not really a replacement for fibers/coroutines. The OP should perhaps look at Stackless Python or Greenlets. See On the surface of things, the single level aspect *LOOKS* like a problem, but in

Re: Inter-process communication, how? Part 2

2007-12-23 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: What I don't like about FIFO, is that on Unix they are persistent files. So whatever happens to Manager they would stay there... Nope. /tmp exists. Many distributions delete /tmp contents on reboot. I was just wondering if there's another way of doing the above and

Re: Inter-process communication, how? Part 2

2007-12-23 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: Ok, but how to redirect print statement into a socket? Create an object that has the socket's send-or-what-it's-called method as a member called write and bind this object to sys.stdout. Alternatively, you can use the print text object syntax (see language reference).

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Hi, It just works, but using native Python threads for non-preemptive threading is not cost-effective. Python has generator instead but it seemed to be very restricted for general scripting. I wish I could write nested (generator) functions easily at least. Is there any plan of

Re: Passing by reference

2007-12-23 Thread Marc 'BlackJack' Rintsch
On Sun, 23 Dec 2007 03:10:48 -0800, MartinRinehart wrote: Bruno, right now I've got this: def __init__ ( self, t ): Constructor, called with array of strings. self.text = t ... Some other program will say: tok = Toker( text_array ) tokens = tok.tokenize() So how

Re: Inter-process communication, how? Part 2

2007-12-23 Thread John Nagle
[EMAIL PROTECTED] wrote: Hello, just to recap: last time I asked how to do an interprocess communitation, between one Manager process (graphical beckend) and some Worker processes. I decided to go with sockets, thanks for replies, once more. However, I would like to ask another thing:

Re: Python DLL in Windows Folder

2007-12-23 Thread Thorsten Kampe
* Markus Gritsch (Sun, 23 Dec 2007 15:52:50 +0100) why does the Python installer on Windows put the Python DLL into the Windows system32 folder? Are you sure it does?! Thorsten -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode Regular Expressions

2007-12-23 Thread Jim
Have you googled? http://www.google.com/search?hl=enq=python+regular+expression+unicodebtnG=Google+Search -- http://mail.python.org/mailman/listinfo/python-list

Re: Python DLL in Windows Folder

2007-12-23 Thread Markus Gritsch
On 23/12/2007, Thorsten Kampe [EMAIL PROTECTED] wrote: * Markus Gritsch (Sun, 23 Dec 2007 15:52:50 +0100) why does the Python installer on Windows put the Python DLL into the Windows system32 folder? Are you sure it does?! Yes. Markus --

why does a disabled button respond to clicks

2007-12-23 Thread damonjulian
hi ,i created 3 buttons such that if button1 is clicked it will disable button2 ,and clicking button3 will restore state of button2 to normal, to my dismay i find that button2 still responds to clicks even if it is greyed out here is the code..am i doing something wrong? is there a way to truly

Re: Python DLL in Windows Folder

2007-12-23 Thread Christian Heimes
Markus Gritsch wrote: why does the Python installer on Windows put the Python DLL into the Windows system32 folder? Wouldn't it be more clean to place it into the Python installation folder beside the python.exe file? It's the easiest and best way to expose Python for 3rd party applications

Re:Re: Output buffer

2007-12-23 Thread Cesar D. Rodas
On 22/12/2007, Fredrik Lundh [EMAIL PROTECTED] wrote: Cesar D. Rodas wrote: I am newbie in Python, but I like it very much. Right now I am having a problem, I am working with mod_python in apache. What I needing is a stdout buffering, that means that everything that I send to stdout

Re: Python DLL in Windows Folder

2007-12-23 Thread Markus Gritsch
On 23/12/2007, Christian Heimes [EMAIL PROTECTED] wrote: Markus Gritsch wrote: why does the Python installer on Windows put the Python DLL into the Windows system32 folder? Wouldn't it be more clean to place it into the Python installation folder beside the python.exe file? It's the

Releasing malloc'd memory using ctypes?

2007-12-23 Thread skip
I am starting to experiment with ctypes. I have a function which returns a pointer to a struct allocated in heap memory. There is a corresponding free function for that sort of struct, e.g.: from ctypes import * cdll.LoadLibrary(libthing.so) c_thing = CDLL(libthing.so) class

=?UTF-8?Q?=E2=96=BA=E2=96=BA=E2=96=BA_Earn_MILLIONS_online, _working_One_Hour_a_D?= AY ◄◄◄

2007-12-23 Thread sandy
Would you like a side-income of 1000's of Dollars a month? YES, This is possible if you have the skills to trade Forex. AND you can do all this without monitoring the market constantly. The Website listed below is tailored to both the new as well as the intermediate trader. In it, you will

clearing selection in Tix.FileSelectBox

2007-12-23 Thread [EMAIL PROTECTED]
hello i am creating a Tix.FileSelectBox to select some jpeg files on clicking an OK button i wish to get the selected imagename as string ,so i code like below class TixGUI: def __init__(self, parent): self.imgsel=FileSelectBox(self.bgframe)

Re: exception message output problem

2007-12-23 Thread Florian Diesch
Lie [EMAIL PROTECTED] wrote: # Python have an odd (read: broken) singleton implementation # single member tuple must have a comma behind it Otherwise (1+2)+(3+4) would evaluate to (3, 7) instead of 10. Florian -- http://www.florian-diesch.de/

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Duncan Booth
Michael Sparks [EMAIL PROTECTED] wrote: Duncan Booth wrote: Unfortunately generators only save a single level of stack-frame, so they are not really a replacement for fibers/coroutines. The OP should perhaps look at Stackless Python or Greenlets. See On the surface of things, the single

MySQL-python Error

2007-12-23 Thread Steve Ametjan
I've been trying to get MySQL-python to install on Leopard for the past couple of days, and I keep running into relatively the same error. I'm hoping that someone on this list will be able to help me out in solving the issue. I'd like to get this solved so I can continue developing with

Re: How to get Python to default to UTF8

2007-12-23 Thread Martin v. Löwis
However, the situation is still unacceptable to me because I often make mistakes and it is easy for me to miss places where encoding is necessary. I rely on testing to find my faults. On my development environment, I get no error message and it seems that everything works perfectly.

Re: Unicode Regular Expressions

2007-12-23 Thread Martin v. Löwis
I'm writing a program that requires specifically Unicode regular expressions http://unicode.org/reports/tr18/ to be loaded in from an external file and then interpreted against the data. if I use Python Regular expressions is there a flag I can set to specify that the regular expressions

Re: Python DLL in Windows Folder

2007-12-23 Thread Ross Ridge
Markus Gritsch [EMAIL PROTECTED] wrote: ... We are embedding Python into our application which gets compiled using MSVC 8.0. We like to link dynamically, so the Python interpreter is not statically linked into the program. The Python DLL from the Python installer in the Windows system32 folder

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Michael Sparks
Duncan Booth wrote: Michael Sparks [EMAIL PROTECTED] wrote: Duncan Booth wrote: Unfortunately generators only save a single level of stack-frame, so they are not really a replacement for fibers/coroutines. The OP should perhaps look at Stackless Python or Greenlets. See On the surface

Re: fiber(cooperative multi-threading)

2007-12-23 Thread Martin v. Löwis
Is there any plan of implementing real (lightweight) fiber in Python? I have no such plan, and I don't know of anybody else's plan, either. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to get Python to default to UTF8

2007-12-23 Thread John Nagle
weheh wrote: Hi Fredrik, Thanks again for your feedback. I am much obliged. Bear in mind that in Python, ASCII currently means ASCII, values 0..127. Type str will accept values 127. However, the default conversion from str to unicode requires true ASCII values, in 0..127. So if you

convert pdf to png

2007-12-23 Thread Carl K
I need to take the take the pdf output from reportlab and create a preview image for a web page. so png or something. I am sure ghostscript will be involved. I am guessing PIL or ImageMagic ? all sugestions welcome. Carl K -- http://mail.python.org/mailman/listinfo/python-list

Happy Christmas Pythoneers

2007-12-23 Thread Paddy
After quite enjoying participating in the group in 2007, I'd like to wish you all a Merry Xmas. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Happy Christmas Pythoneers

2007-12-23 Thread rishi pathak
Is santa clause subscribed to the list . I want a gift:) On 12/24/07, Paddy [EMAIL PROTECTED] wrote: After quite enjoying participating in the group in 2007, I'd like to wish you all a Merry Xmas. - Paddy. -- http://mail.python.org/mailman/listinfo/python-list -- Regards-- Rishi

Re: Happy Christmas Pythoneers

2007-12-23 Thread Cesar D. Rodas
On 24/12/2007, rishi pathak [EMAIL PROTECTED] wrote: Is santa clause subscribed to the list . I want a gift:) Me too!, :-) On 12/24/07, Paddy [EMAIL PROTECTED] wrote: After quite enjoying participating in the group in 2007, I'd like to wish you all a Merry Xmas. - Paddy. --

[issue1690] Crash on cancellation of windows install

2007-12-23 Thread mtvernon
New submission from mtvernon: Steps to reproduce the bug: 1) Download the Python 2.5.1 Windows installer (Windows binary -- does not include source). 2) Select Install for all users and click Next. 3) Click Next. 4) Click Advanced. 5) Click Cancel. 6) Click Yes. -- components:

[issue1688] Incorrectly displayed non ascii characters in prompt using input() - Python 3.0a2

2007-12-23 Thread Martin v. Löwis
Martin v. Löwis added the comment: Would you like to work on a patch? -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1688 __ ___ Python-bugs-list

[issue1690] Crash on cancellation of windows install

2007-12-23 Thread Martin v. Löwis
Martin v. Löwis added the comment: What do you mean by Crash? -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1690 __ ___ Python-bugs-list mailing list

[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

2007-12-23 Thread Christian Heimes
Christian Heimes added the comment: A small note from me: Your proposed patch is no good and is going to lead to strange, hard to debug bugs in your app. os.chdir() isn't safe in a threaded environment. You must protect the entire section with a global lock. -- nosy: +tiran

[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

2007-12-23 Thread Fazal Majid
Fazal Majid added the comment: MT-safety has nothing to do with this. The os.chdir() is invoked from the new child process that is forked just prior to calling execve() to run the CGI script, after which it exits. The parent CGIHTTPServer may be multithreaded, but invoking the CGI script is not

[issue1676] Fork/exec issues with Tk 8.5/Python 2.5.1 on OS X

2007-12-23 Thread Adam Olsen
Changes by Adam Olsen: -- nosy: +rhamphoryncus __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1676 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue1691] feature request: methods that modify instances should return instance

2007-12-23 Thread Peter Farson
New submission from Peter Farson: Here's an example: I'd like to be able to reverse a list for iterating... for i in range(10).reverse() This could work if reverse method returned self, but currently it doesn't return anything. I think the overhead is slight and worth it. --

[issue1691] feature request: methods that modify instances should return instance

2007-12-23 Thread Christian Heimes
Christian Heimes added the comment: No, it's too confusing for users and it might hide bugs. The core types either change an object in place and return None *OR* the method returns a modified object. It's a design decision we won't change. In your case you can use the reversed(range(10))

[issue1677] Ctrl-C will exit out of Python interpreter in Windows

2007-12-23 Thread Isaul Vargas
Isaul Vargas added the comment: I wanted to add that this issue also affects python 2.5.1 on the Mac. Sometimes I may be writing something in the interpreter and I decide to invalidate my input by pressing Ctrl-C. This will exit the interpreter occasionally. I think it would be a good idea to

[issue1692] Syntax Error exception dosen't print string; not informative

2007-12-23 Thread Isaul Vargas
New submission from Isaul Vargas: Python 3.0 doesn't print the string with the carat underneath when there is a syntax error. if x SyntaxError: invalid syntax (stdin, line1) if (x=5): SyntaxError: invalid syntax (stdin, line 1) Python 2.x behavior: if (x=5): pass File stdin, line 1

[issue1760357] ZipFile.write fails with bad modification time

2007-12-23 Thread Alan McIntyre
Alan McIntyre added the comment: At the moment I don't have a Windows machine available, but on my Mac, time.localtime doesn't seem to mind interpreting negative input values. So I doubt that forcing timestamps to be non-negative is the way to fix this. I poked around a bit in the current 2.6

[issue1650] IDLE: help() displays output on the wrong shell

2007-12-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Yes, and it does on linux, also. Someone changed the way help() works. Since the help listing is often extensive and clutters up the shell, I'm thinking that the best solution would be to pop up a new window. I haven't got around to addressing either the

[issue1647] IDLE messes around with sys.exitfunc

2007-12-23 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: It was done for VPython support, as described in the docstring in run.py:exit(). What are you doing, removing sys.exitfunc from 2.6? The 3.0 run.py code was changed to use atexit._clear(). __ Tracker [EMAIL PROTECTED]

[issue1658] RuntimeError: dictionary changed size during iteration in Tkinter

2007-12-23 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: -- nosy: +kbk __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1658 __ ___ Python-bugs-list mailing list Unsubscribe: