the perens in lisp dilects is there for a reson... macros.

2006-08-05 Thread atbusbook
macros are sort of like c macros but more powerful. they are the manafestation of treating code like data. lisp code is just a textual representation of a data structure that is the list. this means that you can manipulate code to emulate structured controll constructs and elemanate boilerplate

Re: Thread Question

2006-08-05 Thread Bryan Olson
Carl Banks wrote: Ritesh Raj Sarraf wrote: Carl Banks wrote: Then change the zipping part of download_from_web to acquire and release this lock; do zipfile operations only between them. ziplock.acquire() try: do_all_zipfile_stuff_here() finally: ziplock.release() I hope while

python scripting for eggdrop?

2006-08-05 Thread sleem
Can it be done? I hate tcl. Is there someway I could parse all irc events so they can be handled by python's irclib? -- http://mail.python.org/mailman/listinfo/python-list

Ann: SE 2.2b

2006-08-05 Thread Anthra Norell
HJi all, In the short period of time since I introduced SE. the feedback has been overwhelmingly postive. Thank you all! I am still cleaning up minor functional imperfections as I encounter them working out solutions to posted problems. So the other day I discovered that version 2.1 failed to

Re: help - iter dict

2006-08-05 Thread Alistair King
thanks to Simon Forman, his solution worked, the key value pairs were entered the wrong way round in the dictionary...Doh! -- Dr. Alistair King Research Chemist, Laboratory of Organic Chemistry, Department of Chemistry, Faculty of Science P.O. Box 55 (A.I. Virtasen aukio 1) FIN-00014

Re: Suppressing banner on interactive startup?

2006-08-05 Thread Eric
On 27 July 2006, Tim Chase wrote: A couple of hopefully short (interrelated) questions: 1) is there a way to suppress the banner when starting Python interactively? [...] 2) is there a way to change the two prompts from and ... to other options? [...] I noticed that the first part of

Re: Nested function scope problem

2006-08-05 Thread Bill Pursell
Gerhard Fiedler wrote: There's no Python equivalent to int*p=345; *p++;. Sure there is: os.kill(os.getpid(), signal.SIGSEGV) :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there an obvious way to do this in python?

2006-08-05 Thread H J van Rooyen
Dennis Lee Bieber [EMAIL PROTECTED] wrote: 8-- | There may be something in-between. IFF this is to be used strictly | on an internal LAN with uniform architecture (all Linux or all WinXP) | for the client machines. You'd have to set up something so a reboot no such

Re: Enhanced Listbox

2006-08-05 Thread H J van Rooyen
drodrig [EMAIL PROTECTED] wrote: (top posting fixed) | H J van Rooyen wrote: | drodrig [EMAIL PROTECTED] | | | | My apologies if this question has been asked an answered. | | | | I am looking for a tkinter grid control or enhanced listbox that can | | act as a receipt for a cash

Re: Nested function scope problem

2006-08-05 Thread Gerhard Fiedler
On 2006-08-05 02:02:03, Dennis Lee Bieber wrote: I've not disagreed with you, but wanted to correct the associations... It is others who may disagree... I know. It's just that your explicit analogy made this better visible, so I wanted to add that to it. But I guess this thing is getting

Re: testing array of logicals

2006-08-05 Thread Janto Dreijer
John Henry wrote: Simon Forman wrote: False not in logflags Or, if your values aren't already bools False not in (bool(n) for n in logflags) Very intriguing use of not in... Is there a reason why you didn't write True in (bool(n) for n in logflags) --

More int and float attributes

2006-08-05 Thread bearophileHUGS
sys.maxint gives the largest positive integer supported by Python's regular integer type. But maybe such attribute, with few others (they can be called min and max) can be given to int type itself. D is a very nice language, that I hope to see more used. It is copying lot of things from Python. D

Re: testing array of logicals

2006-08-05 Thread Janto Dreijer
Janto Dreijer wrote: John Henry wrote: Simon Forman wrote: False not in logflags Or, if your values aren't already bools False not in (bool(n) for n in logflags) Very intriguing use of not in... Is there a reason why you didn't write True in (bool(n) for n in

Re: Pydev with Eclipse on OSX Q

2006-08-05 Thread Fabio Zadrozny
Hi Fabio,Thanks for your quick response! I was able to solve this. It seems I still wasn't using the right file; however, I didn't expect that Ineeded a 12 KB Unix executable. It didn't seem like the right file tome before.I've had one other report like that, so, I'm making that error more

Re: Nested function scope problem

2006-08-05 Thread Antoon Pardon
On 2006-08-04, Gerhard Fiedler [EMAIL PROTECTED] wrote: On 2006-08-04 15:21:52, Dennis Lee Bieber wrote: On Fri, 4 Aug 2006 14:09:15 -0300, Gerhard Fiedler [EMAIL PROTECTED] declaimed the following in comp.lang.python: Python === C Textual representation a === Address operator (a) id(a)

Re: More int and float attributes

2006-08-05 Thread Avizoa
It seems as though just about all of those would be rarely, if ever, used by the vast majority of programmers. Plus, python already handles the two most important (NaN and complex) well. -- http://mail.python.org/mailman/listinfo/python-list

Re: Need a compelling argument to use Django instead of Rails

2006-08-05 Thread Damjan
I didn't realize you could do shared hosting with mod_python, because of the lack of security barriers between Python objects (i.e. someone else's application could reach into yours). You really need a separate interpreter per user. mod_python uses sub-interpreters - can be per virtual

Re: Which Python API for PostgreSQL?

2006-08-05 Thread Damjan
I also recommend psycopg. But make sure you use psycopg2 -- damjan -- http://mail.python.org/mailman/listinfo/python-list

Re: the perens in lisp dilects is there for a reson... macros.

2006-08-05 Thread Terry Reedy
[EMAIL PROTECTED] wrote in message I presume you accidentally misdirected this to the wrong newsgroup. Otherwise, it would be off-topic spam. In any case, you should learn how to spell or use a spell-checker. -- http://mail.python.org/mailman/listinfo/python-list

Re: Can't get LCHARVAR's with InformixDB

2006-08-05 Thread fhurley
Carsten Haese wrote: I'd suggest upgrading to the newest version of CSDK. Please let me know what happens after the upgrade. That did the trick thanks very much. -- http://mail.python.org/mailman/listinfo/python-list

email client like mutt

2006-08-05 Thread Fabian Braennstroem
Hi, I am looking for a python email client for the terminal... something like mutt; maybe, so powerfull ;-) Would be nice, if anybody has an idea! Greetings! Fabian -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Question

2006-08-05 Thread Ritesh Raj Sarraf
Bryan Olson on Saturday 05 Aug 2006 13:31 wrote: Exactly.  Only one thread can hold a lock at a time. In the code above, a form called a critical section, we might think of a thread as holding the lock when it is between the acquire() and release(). But that's not really how Python's locks

Re: What is the best way to print the usage string ?

2006-08-05 Thread Tony Nelson
In article [EMAIL PROTECTED], Simon Forman [EMAIL PROTECTED] wrote: ... Python also concatenates adjacent strings, but the real newlines between your strings will need to be escaped (otherwise, because the newlines are statement separators, you will have one print statement followed by

access abook addressbook with curses

2006-08-05 Thread Fabian Braennstroem
Hi, I want to get access to my abook address file with python. Does anyone have some python lines to achive this using curses? If not, maybe anybody has small python program doing it with a gui!? Greetings! Fabian -- http://mail.python.org/mailman/listinfo/python-list

Re: Pywin32 Excel question

2006-08-05 Thread John Henry
Somebody on the Pywin32 list helped. The problem is that: xlSel=xlSheet.Range(1:1,2:2,3:3).Select() is wrong. It should be: xlSel=xlSheet.Range(1:1,2:2,3:3) xlSel.Select() Then I can do the rest. And no, you don't want to do the xlSheet.Copy(). That copies the entire workbook and you end

Re: E' possibile integrare ironpython con visual studio 2005?

2006-08-05 Thread Tony Nelson
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Alex Martelli) wrote: LaGuna [EMAIL PROTECTED] wrote: Se si come? Ciao by Enzo Questo newsgroup preferisce l'inglese -- per favore, chiedi su it.comp.lang.python invece che qui. This newsgroup prefers English -- please ask on

Re: Thread Question

2006-08-05 Thread Bryan Olson
Ritesh Raj Sarraf wrote: [...] I noticed that even though while one thread acquires the lock, the other threads don't respect the lock. In fact they just go ahead and execute the statements within the lock acquire statement. With this behavior, I'm ending up having a partially corrupted zip

Re: Thread Question

2006-08-05 Thread Ritesh Raj Sarraf
Bryan Olson on Saturday 05 Aug 2006 23:56 wrote: You don't want ziplock = threading.Lock() in the body of the function. It creates a new and different lock on every execution. Your threads are all acquiring different locks. To coordinate your threads, they need to be using the same lock.

Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
I was wondering what methods you experts would reccomend for this task? Here are the options I have come up with so far: 1. Build something with the poblib library (http://docs.python.org/lib/module-poplib.html) --Any pointers on doing this? How to I get poplib to save messages in a standard

Re: access abook addressbook with curses

2006-08-05 Thread Ben C
On 2006-08-05, Fabian Braennstroem [EMAIL PROTECTED] wrote: Hi, I want to get access to my abook address file with python. Does anyone have some python lines to achive this using curses? If not, maybe anybody has small python program doing it with a gui!? You can just parse the abook

Re: More int and float attributes

2006-08-05 Thread Paddy
[EMAIL PROTECTED] wrote: sys.maxint gives the largest positive integer supported by Python's regular integer type. But maybe such attribute, with few others (they can be called min and max) can be given to int type itself. D is a very nice language, that I hope to see more used. It is copying

Something for PyPy developers?

2006-08-05 Thread Paddy
I just found this: http://www.cs.princeton.edu/~dpw/popl/06/Tim-POPL.ppt And thought of you... :-) called The Next Mainstream Programming Languages, Tim Sweeney of Epic Games presents on problems that game writers see and muses on possible solutions. - Pad. --

Re: More int and float attributes

2006-08-05 Thread bearophileHUGS
Paddy: Or do you mean the ability to choose between hardware supported float s? e.g. float and double precision? No, I mean just having the ability to ask the float (his attribute) what are the max and min values it can represent, etc. stop = float.max ... I don't know any simple way to know

Re: programming is hard

2006-08-05 Thread spiffy
On Fri, 04 Aug 2006 14:36:28 GMT, John Salerno [EMAIL PROTECTED] wrote: placid wrote: [EMAIL PROTECTED] wrote: placid wrote: Alas, all good arguments. I rest my case. After you've just been proven wrong? I wouldn't want you for my lawyer. Aha, lucky i wont be a lawyer. lawyering is

Re: Why do I require an elif statement here?

2006-08-05 Thread Jim
Tim Chase wrote: Could somebody tell me why I need the elif char == '\n' in the following code? This is required in order the pick up lines with just spaces in them. Why doesn't the else: statement pick this up? Following through with the below code: if the line consists of only a

Re: Why do I require an elif statement here?

2006-08-05 Thread Tim Chase
Hard to believe that lstrip() produces an empty string on lines with just spaces and doesn't remove the '\n' with lines that have characters. It's easy to understand that lstrip() is doing exactly what it's supposed to. It evaluates from the left of your string, discarding whitespace

Re: Nested function scope problem

2006-08-05 Thread Gerhard Fiedler
On 2006-08-05 09:30:59, Antoon Pardon wrote: But this means that C variables are not analog to Python variables, [...] Yes they are. Nobody so far has been able to create a simple table with analog operations Python vs C that operates on C /variables/ (not dereferenced pointers) and makes

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Simon Forman
Gregory Piñero wrote: I was wondering what methods you experts would reccomend for this task? Here are the options I have come up with so far: 1. Build something with the poblib library (http://docs.python.org/lib/module-poplib.html) --Any pointers on doing this? How to I get poplib to

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
On 5 Aug 2006 15:27:03 -0700, Simon Forman [EMAIL PROTECTED] wrote: Out of curiosity, why do you want to _backup_ a gmail account? (I use my gmail account to backup files and documents I never want to lose.) I could think of some reasons, but I'm wondering what yours are. : ) Here are a few:

Re: testing array of logicals

2006-08-05 Thread Simon Forman
Janto Dreijer wrote: Janto Dreijer wrote: John Henry wrote: Simon Forman wrote: False not in logflags Or, if your values aren't already bools False not in (bool(n) for n in logflags) Very intriguing use of not in... Is there a reason why you didn't

Re: Fastest Way To Loop Through Every Pixel

2006-08-05 Thread Chaos
Fredrik Lundh wrote: Chaos wrote: I have tried PIL. Not only that, but the Image.eval function had no success either. I did some tests and I found out that Image.eval only called the function a certain number of times either 250, or 255. Unless I can find a working example for this

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Neil Hodgson
Gregory Piñero: I was wondering what methods you experts would reccomend for this task? While you can write a script, its quite easy to turn on POP and run a client side mail client like Thunderbird. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Question

2006-08-05 Thread Simon Forman
Ritesh Raj Sarraf wrote: Bryan Olson on Saturday 05 Aug 2006 23:56 wrote: You don't want ziplock = threading.Lock() in the body of the function. It creates a new and different lock on every execution. Your threads are all acquiring different locks. To coordinate your threads, they need

Re: looking for a regular expression

2006-08-05 Thread Tim Roberts
alex23 [EMAIL PROTECTED] wrote: Tim Roberts wrote: What is your signature supposed to be? It looks like you are trying to inject ANSI terminal escape sequences. The vast majority of Usenet participants are now reading these articles through GUI newsreaders or web-based readers which show

Subtyping a non-builtin type in C/C++

2006-08-05 Thread johan2sson
Hi I am trying to create a subclass of a python class, defined in python, in C++, but I am having some problems. It all boils down to a problem of finding the base class' type object and according to the PEP (253) I would also need to figure out the size of the base class instance structure, but

Re: Why do I require an elif statement here?

2006-08-05 Thread Jim
Good stuff! Since I'm only interested in spaces being my only whitespace it makes sense for me to use line.lstrip(whitespace) in my script, thus eliminating the elif char == '\n': statement. Thanks, Jim Tim Chase wrote: Hard to believe that lstrip() produces an empty string on lines with just

Re: Backup GMAIL Messages with Python

2006-08-05 Thread Gregory Piñero
On 8/5/06, Neil Hodgson [EMAIL PROTECTED] wrote: While you can write a script, its quite easy to turn on POP and run a client side mail client like Thunderbird. Good point, Neil. This is a very tempting option, I just wanted to include it in a backup script rather than having to open up

Re: Design Patterns in Python

2006-08-05 Thread Alex Martelli
Gabriel Genellina [EMAIL PROTECTED] wrote: Hello Most authors talk about Java/C++, and describe patterns used as a workaround to their static class model; the dynamic nature of Python allows for trivial implementations in some cases. I've seen some design patterns examples on the

Re: More int and float attributes

2006-08-05 Thread Tim Roberts
[EMAIL PROTECTED] wrote: sys.maxint gives the largest positive integer supported by Python's regular integer type. But maybe such attribute, with few others (they can be called min and max) can be given to int type itself. D is a very nice language, that I hope to see more used. It is copying lot

[ python-Feature Requests-1534942 ] Print identical floats consistently

2006-08-05 Thread SourceForge.net
Feature Requests item #1534942, was opened at 2006-08-05 06:19 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=355470aid=1534942group_id=5470 Please note that this message will contain a

[ python-Bugs-788035 ] missing universal newline support in os.popen amp; friends

2006-08-05 Thread SourceForge.net
Bugs item #788035, was opened at 2003-08-13 15:17 Message generated for change (Comment added) made by astrand You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=788035group_id=5470 Please note that this message will contain a full copy of the comment thread,

[ python-Bugs-1535182 ] typo in test_bz2.py

2006-08-05 Thread SourceForge.net
Bugs item #1535182, was opened at 2006-08-06 00:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=105470aid=1535182group_id=5470 Please note that this message will contain a full copy of