Re: Multiple equates

2008-12-03 Thread Hendrik van Rooyen
"Cameron Laird" <[EMAIL PROTECTED]> wrote: > There's a realm within Pythonia that favors lambdalessness. And who, may I ask, Is the King of this realm? - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Thread Tkinter problem

2008-12-03 Thread Hendrik van Rooyen
"Davy" <[EMAIL PROTECTED]> wrote: >def gen_board_thread(): >print 'enter here' >gen_flip = 1 >while(True): You don't need the brackets: while True: is good enough >time.sleep(0.3) >if (data_queue.full() == False): write: if not data_queue.full(): , and lose the brac

Re: time.sleep() and Tkinter after()?

2008-12-03 Thread Hendrik van Rooyen
"Davy" <[EMAIL PROTECTED]> wrote: > I have used Tkinter after() to do loop update GUI in my previous post. > And I tried to change after() to time.sleep(), but it seems doesn't > work at all, the Queue send and receive data properly, but the GUI > didn't even appear? > > //-code changed-

Re: Multiple Versions of Python on Windows XP

2008-12-03 Thread Glenn Linderman
On approximately 12/3/2008 8:51 AM, came the following characters from the keyboard of Colin J. Williams: Martin v. Löwis wrote: What changes are made to the registry? For a complete list, see Tools/msi/msi.py in the source tree. I have scanned the file: http://svn.python.org/projects/python/

Python Dynamic Profiling

2008-12-03 Thread esgameserver
Hi, Sorry for re-posting but I want to clarify my question again here. So, we have a multithreaded server application and I want to see the profile of our code means which function is executed how many times and time spent in that function dynamically. With dynamic, I mean without stopping the pr

Re: "as" keyword woes

2008-12-03 Thread alex23
On Dec 4, 3:42 pm, "Warren DeLano" <[EMAIL PROTECTED]> wrote: > So you prefer broken code to broken rules, eh?  Your customers must love > that!  This is exactly the kind of ivory-tower thinking I feared might > be behind the decision (form over function, damn the users to hell, > etc.) Really? I

Python advocacy ... HELP!

2008-12-03 Thread Michael_D_G
I am a faculty member of a cs department. We currently teach C++ in our intro to programming course. I am teaching this class and it seems to me that we would be much better served teaching python in the intro course, C++ for Data structures, as we do now, and Java in object oriented programming,

Re: "as" keyword woes

2008-12-03 Thread Ben Finney
"Warren DeLano" <[EMAIL PROTECTED]> writes: > > But I can offer what I believe is a good reason why it *should* be > > a reserved word: Because simple is better than complex, and > > special cases aren't special enough to break the rules. > > So you prefer broken code to broken rules, eh? Your cu

Re: Multiple equates

2008-12-03 Thread alex23
On Dec 4, 1:52 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > Why is that? Was Rossum frightened in his cradle by a lambda when he was a > baby? Are some people afraid of lambdas the way others are afraid of > spiders? "Language designers are a superstitious and cowar

Access functions in dll class

2008-12-03 Thread navneet khanna
Hello Everybody I am able to import the dll and able to access the class of the dll. But when I am trying to access the methods in the dll its showing error. #Class1 is the class in dll and next is the function. Class1.Bin_To_Dec("11") Traceback (most recent call last): File "", line 1, in

"as" keyword woes

2008-12-03 Thread Warren DeLano
> > Why was it necessary to make "as" a reserved keyword? > > I can't answer for the Python developers as to why they *did* make it > a reserved word. > > But I can offer what I believe is a good reason why it *should* be a > reserved word: Because simple is better than complex, and special > cas

Re: How can I do this (from Perl) in Python? (closures)

2008-12-03 Thread Chris Rebert
On Wed, Dec 3, 2008 at 9:18 PM, <[EMAIL PROTECTED]> wrote: > I just came across http://www.perl.com/pub/a/2002/05/29/closure.html > and wanted to try the "canonical example of closures" in Python. I > came up with the following, but it fails: > > ### > #!/usr/bin/env python >

Re: Good introductory book?

2008-12-03 Thread Banibrata Dutta
1+ for "Dive into Python"... get's you started very fast. After you are thru with DiP book, it's time to keep google (or ur favourite search engine) handy... search at the ActivePython site in the cookbooks, PEP's, mailing-list archive... the answer is generally found within first 4-5 hits. And th

Re: How can I do this (from Perl) in Python? (closures)

2008-12-03 Thread Carl Banks
On Dec 3, 11:18 pm, [EMAIL PROTECTED] wrote: > I just came acrosshttp://www.perl.com/pub/a/2002/05/29/closure.html > and wanted to try the "canonical example of closures" in Python. I > came up with the following, but it fails: > > ### > #!/usr/bin/env python > > def make_counte

Re: Mathematica 7 compares to other languages

2008-12-03 Thread J�rgen Exner
Kaz Kylheku <[EMAIL PROTECTED]> wrote: >On 2008-12-04, Jürgen Exner <[EMAIL PROTECTED]> wrote: >> toby <[EMAIL PROTECTED]> wrote: >>>On Dec 3, 4:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > My example demonstrates several of Ma

How can I do this (from Perl) in Python? (closures)

2008-12-03 Thread excord80
I just came across http://www.perl.com/pub/a/2002/05/29/closure.html and wanted to try the "canonical example of closures" in Python. I came up with the following, but it fails: ### #!/usr/bin/env python def make_counter(start_num): start = start_num def counter():

Re: Good introductory book?

2008-12-03 Thread Kottiyath
On Dec 3, 7:44 pm, "Ken D'Ambrosio" <[EMAIL PROTECTED]> wrote: > Hi, all.  I'm getting ready to do some projects in Python, and I've cut my > teeth a little bit, but I've found the "Learning|Programming Python" books > from O'Reilly to be more-or-less useless (to my surprise -- I'm usually an > O'R

Re: RELEASED Python 3.0 final

2008-12-03 Thread Ben Finney
Carl Banks <[EMAIL PROTECTED]> writes: > On Dec 3, 7:51 pm, Barry Warsaw <[EMAIL PROTECTED]> wrote: > > On behalf of the Python development team and the Python community, > > I am happy to announce the release of Python 3.0 final. > > Congratulations! This is a great day for the Python community

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Kaz Kylheku
On 2008-12-04, Jürgen Exner <[EMAIL PROTECTED]> wrote: > toby <[EMAIL PROTECTED]> wrote: >>On Dec 3, 4:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: >>> On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: >>> >>> > My example demonstrates several of Mathematica's fundamental limitations. >>> >>>

Re: Mathematica 7 compares to other languages

2008-12-03 Thread J�rgen Exner
toby <[EMAIL PROTECTED]> wrote: >On Dec 3, 4:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: >> On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: >> >> > My example demonstrates several of Mathematica's fundamental limitations. >> >> enough babble Jon. >> >> Come flying $5 to my paypal account, an

Re: Obtaining SMTP address of a sender and receiver of an outlook mail

2008-12-03 Thread venu madhav
Hi, I don't have access to the AD server because only the administrators here have those rights. Aren't there any MAPI Sender and Recipient object properties which satisfies my need? Thank you, Venu. On Thu, Dec 4, 2008 at 9:00 AM, BJ Swope <[EMAIL PROTECTED]> wrote: > If you have access

Re: RELEASED Python 3.0 final

2008-12-03 Thread Jeremiah Dodds
thankers.append(self) -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-03 Thread toby
On Dec 3, 4:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > > > My example demonstrates several of Mathematica's fundamental limitations. > > enough babble Jon. > > Come flying $5 to my paypal account, and i'll give you real code, I'll give yo

Re: Mathematica 7 compares to other languages

2008-12-03 Thread toby
On Dec 2, 5:04 pm, Tamas K Papp <[EMAIL PROTECTED]> wrote: > On Tue, 02 Dec 2008 13:57:35 -0800, Lew wrote: > > Xah Lee wrote: > >> If [yo]u would like to learn [the] [E]nglish lang[uage] and writing > >> insights from me, peruse: > > > /Au contraire/, I was suggesting a higher standard for your po

Re: RELEASED Python 3.0 final

2008-12-03 Thread Carl Banks
On Dec 3, 7:51 pm, Barry Warsaw <[EMAIL PROTECTED]> wrote: > On behalf of the Python development team and the Python community, I > am happy to announce the release of Python 3.0 final. Congratulations! This is a great day for the Python community. Carl Banks -- http://mail.python.org/mailman/

Good introductory book?

2008-12-03 Thread Ken D'Ambrosio
Hi, all. I'm getting ready to do some projects in Python, and I've cut my teeth a little bit, but I've found the "Learning|Programming Python" books from O'Reilly to be more-or-less useless (to my surprise -- I'm usually an O'Reilly fan). I really, really like "Python Essential Reference", but it

Re: hello

2008-12-03 Thread Mohit Ranka
Hi, Apologies for the previous email. Some hacker/spammer hacked my email password, and sent email using it. Thanks and regards, Mohit Ranka -- http://mail.python.org/mailman/listinfo/python-list

Where does the clr in IronPython look the dll

2008-12-03 Thread navneet khanna
Hello Everybody I am trying to import dll with clr.AddReference("TCdll") I am getting the following error. Traceback (most recent call last): File "", line 1, in clr.AddReference("TCdll") FileNotFoundException: Unable to find assembly 'TCdll'. at Python.Runtime.CLRModule.AddReference(St

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Hendrik van Rooyen
"Xah Lee" <[EMAIL PROTECTED]> wrote: >Chances are, $10 is not enough for me to take the >trouble of disappearing from the face of this earth. What a pity. It would be cheap at the price. - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

How to write a string with required color in a file with python.net?

2008-12-03 Thread sambasivareddy
Hi all, I have couple of double on python futures .Quires listed below: * How to write a particular string with required/selected color in a file with python.net? Which module I need to use it? How to set color for particular string in file? - fil

Fwd: Checking a string against multiple matches

2008-12-03 Thread wu wei
Sorry to hassle the list with this but I'm getting irregular spam from this asshole, clearly triggered by comp.lang.python posts being resent to the python-list. I've contacted Yahoo abuse -and- the list administrators but its still occurring. Is anyone able to remove this guy from the list? I've

Re: RELEASED Python 3.0 final

2008-12-03 Thread Daniel Fetchinson
>>> On behalf of the Python development team and the Python community, I >>> am happy to announce the release of Python 3.0 final. >>> >>> Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major >>> milestone in Python's history, and was nearly three years in the >>> making. This is a new v

Re: Multiple equates

2008-12-03 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Cameron Laird wrote: > There's a realm within Pythonia that favors lambdalessness. Why is that? Was Rossum frightened in his cradle by a lambda when he was a baby? Are some people afraid of lambdas the way others are afraid of spiders? -- http://mail.python.org/mai

Re: RELEASED Python 3.0 final

2008-12-03 Thread Chris Rebert
On Wed, Dec 3, 2008 at 7:47 PM, Daniel Fetchinson <[EMAIL PROTECTED]> wrote: >> On behalf of the Python development team and the Python community, I >> am happy to announce the release of Python 3.0 final. >> >> Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major >> milestone in Python's

Re: RELEASED Python 3.0 final

2008-12-03 Thread Daniel Fetchinson
> On behalf of the Python development team and the Python community, I > am happy to announce the release of Python 3.0 final. > > Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major > milestone in Python's history, and was nearly three years in the > making. This is a new version of th

Re: Obtaining SMTP address of a sender and receiver of an outlook mail

2008-12-03 Thread BJ Swope
If you have access to the AD server that hosts those DNs you can use python's ldap module to retrieve the smtp attribute for the DN you've just parsed from the message. On Wed, Dec 3, 2008 at 2:06 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > Hi all, > I am trying to use python for ex

Re: RELEASED Python 3.0 final

2008-12-03 Thread Ed Leafe
On Dec 3, 2008, at 7:51 PM, Barry Warsaw wrote: On behalf of the Python development team and the Python community, I am happy to announce the release of Python 3.0 final. Props to all the folks whose hard work made this possible! You guys rock! -- Ed Leafe -- http://mail.python.org/

Re: Thread Tkinter problem

2008-12-03 Thread Davy
On Dec 4, 9:08 am, Davy <[EMAIL PROTECTED]> wrote: > On Dec 4, 11:13 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:>  "Davy" > <[EMAIL PROTECTED]> wrote: > > >     while(data_queue.full() == False): > > > This will fill the queue and stop. > > Use while true and if queue not full... > > Hi He

time.sleep() and Tkinter after()?

2008-12-03 Thread Davy
Hi all, I have used Tkinter after() to do loop update GUI in my previous post. See http://groups.google.com/group/comp.lang.python/browse_thread/thread/6b616abc236c345b/7df7684d33c969c5#7df7684d33c969c5 And I tried to change after() to time.sleep(), but it seems doesn't work at all, the Queue se

Re: RELEASED Python 3.0 final

2008-12-03 Thread James Mills
On Thu, Dec 4, 2008 at 11:58 AM, alex23 <[EMAIL PROTECTED]> wrote: > On Dec 4, 11:51 am, Barry Warsaw <[EMAIL PROTECTED]> wrote: >> On behalf of the Python development team and the Python community, I >> am happy to announce the release of Python 3.0 final. > > Thanks to you and everyone involved f

Re: RELEASED Python 3.0 final

2008-12-03 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Dec 3, 2008, at 9:13 PM, Dotan Cohen wrote: On this page: http://www.python.org/download/releases/3.0/ The text "This is a proeuction release" should probably read "This is a production release". It would give a better first impression :) Fixe

Re: RELEASED Python 3.0 final

2008-12-03 Thread Dotan Cohen
On this page: http://www.python.org/download/releases/3.0/ The text "This is a proeuction release" should probably read "This is a production release". It would give a better first impression :) -- Dotan Cohen http://what-is-what.com http://gibberish.co.il א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע

Re: RELEASED Python 3.0 final

2008-12-03 Thread Dotan Cohen
2008/12/4 Barry Warsaw <[EMAIL PROTECTED]>: > On behalf of the Python development team and the Python community, I am > happy to announce the release of Python 3.0 final. > Congratulations! I have been learning Python 2.x while paying strict attention to the 3.x [in]compatibility issue. So, I hav

Re: RELEASED Python 3.0 final

2008-12-03 Thread alex23
On Dec 4, 11:51 am, Barry Warsaw <[EMAIL PROTECTED]> wrote: > On behalf of the Python development team and the Python community, I   > am happy to announce the release of Python 3.0 final. Thanks to you and everyone involved for your efforts! -- http://mail.python.org/mailman/listinfo/python-list

RELEASED Python 3.0 final

2008-12-03 Thread Barry Warsaw
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team and the Python community, I am happy to announce the release of Python 3.0 final. Python 3.0 (a.k.a. "Python 3000" or "Py3k") represents a major milestone in Python's history, and was nearly three years i

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Lew
Xah Lee wrote: enough babble ... Good point. Plonk. Guun dun! -- Lew -- http://mail.python.org/mailman/listinfo/python-list

Re: "as" keyword woes

2008-12-03 Thread Matimus
> What I want to understand is why this parser change was necessary in > order to enable new 2.6/3.0 features. Was this change potentially > avoidable? Does it really matter? The change occurred and it isn't going to go back. What you should be asking yourself is whether the affect it had on your

Re: Don't you just love writing this sort of thing :)

2008-12-03 Thread James Mills
uggh no! On Thu, Dec 4, 2008 at 11:07 AM, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > for \ >Entry \ >in \ >sorted \ > ( >f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None > ) \ > : >Patch = (open, > gzip.GzipFile)[Entry

Re: Thread Tkinter problem

2008-12-03 Thread Davy
On Dec 4, 11:13 am, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: >  "Davy" <[EMAIL PROTECTED]> wrote: > >     while(data_queue.full() == False): > > This will fill the queue and stop. > Use while true and if queue not full... Hi Hendrik, It works, thank you:) Davy > > - Hendrik -- http://mail

Don't you just love writing this sort of thing :)

2008-12-03 Thread Lawrence D'Oliveiro
for \ Entry \ in \ sorted \ ( f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None ) \ : Patch = (open, gzip.GzipFile)[Entry.endswith(".gz")](os.path.join(PatchesDir, Entry), "r") ... read from Patch ... Patch.close() #

Re: "as" keyword woes

2008-12-03 Thread Martin P. Hellwig
Steven D'Aprano wrote: On Wed, 03 Dec 2008 22:02:24 +, Martin P. Hellwig wrote: Warren DeLano wrote: A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? Because it can be used at the import statement to let the imported thing

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Xah Lee
On Dec 3, 4:22 pm, "Thomas M. Hermann" <[EMAIL PROTECTED]> wrote: > On Dec 3, 5:26 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > > > > > Agreed. My paypal address is “xah @@@ xahlee.org”. (replace the triple > > @ to single one.) Once you paid thru paypal, you can post receit here > > if you want to, or

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Thomas M. Hermann
On Dec 3, 5:26 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > Agreed. My paypal address is “xah @@@ xahlee.org”. (replace the triple > @ to single one.) Once you paid thru paypal, you can post receit here > if you want to, or i'll surely acknowledge it here. > > Here's what i will do: > > I will give a v

Re: "as" keyword woes

2008-12-03 Thread Ben Finney
"Warren DeLano" <[EMAIL PROTECTED]> writes: > Why was it necessary to make "as" a reserved keyword? I can't answer for the Python developers as to why they *did* make it a reserved word. But I can offer what I believe is a good reason why it *should* be a reserved word: Because simple is bette

Re: "as" keyword woes

2008-12-03 Thread Mensanator
On Dec 3, 4:38 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Wed, 03 Dec 2008 22:02:24 +, Martin P. Hellwig wrote: > > Warren DeLano wrote: > >> A bottom line / pragmatic question... hopefully not a FAQ. > > >> Why was it necessary to make "as" a reserved keyword? > >

Re: Running a Python script from crontab

2008-12-03 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Philip Semanchuk wrote: > In my experience, the environment in which a cron job runs is > different from the environment in which some command line scripts run... Which is true, but again, cron should report the environment in the mail message. For example, here ar

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Xah Lee
> I'll pay $20 to see your improved version of the code. The only > references to PayPal I saw on your website were instructions to direct > the payment to [EMAIL PROTECTED], please let me know if that is correct. > > What I want in return is you to execute and time Dr. Harrop's original > code, po

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Chris Rathman
Xah Lee wrote: > Come flying $5 to my paypal account, and i'll give you real code, > amongest the programing tech geekers here for all to see. That's the problem with Mathematica - it's so expensive that you even have to pay for simple benchmark programs. -- http://mail.python.org/mailman/listinfo

Re: [SPAM] Re: "as" keyword woes

2008-12-03 Thread MRAB
Albert Hopkins wrote: On Wed, 2008-12-03 at 13:38 -0800, Warren DeLano wrote: A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? And more to the point, why was it necessary to prevent developers from being able to refer to attrib

Re: "as" keyword woes

2008-12-03 Thread Robert Kern
Steven D'Aprano wrote: While I feel sympathy for the OP, I do have to ask: he's been using Python 2.5 for, what, a couple of years now? How many times did he see the depreciation warning, and almost certainly the pending depreciation warning before that? Python-dev has been talking about making

Re: building an extension module with autotools?

2008-12-03 Thread Christian Heimes
Gerhard Häring wrote: #!/bin/sh python setup.py build cp build/lib.*/*.so . python test.py "python setup.py build_ext -i" is your friend. It installs the extensions inplace. No need for cp here. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: "as" keyword woes

2008-12-03 Thread Warren DeLano
> Because it can be used at the import statement to let the imported thing > be known under another name? > Something like: > > >>> import xml.etree.ElementTree as ET Yes, but that syntax worked fine for years without "as" actually having to be a keyword. There must be something more going on h

Re: "as" keyword woes

2008-12-03 Thread Steven D'Aprano
On Wed, 03 Dec 2008 22:02:24 +, Martin P. Hellwig wrote: > Warren DeLano wrote: >> A bottom line / pragmatic question... hopefully not a FAQ. >> >> Why was it necessary to make "as" a reserved keyword? > > Because it can be used at the import statement to let the imported thing > be known un

Re: How to instantiate in a lazy way?

2008-12-03 Thread Slaunger
On 3 Dec., 15:30, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > Slaunger <[EMAIL PROTECTED]> wrote: > >  On 3 Dec., 11:30, Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > > > ? ? ? ? ?cls = self.__class__ > > > > ? ? ? ? ?if attr_name in cls.data_attr_names: > > > > self.data_attr_names should do ins

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Thomas M. Hermann
On Dec 3, 3:15 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > > > My example demonstrates several of Mathematica's fundamental limitations. > > enough babble Jon. > > Come flying $5 to my paypal account, and i'll give you real code, > amongest th

Re: "as" keyword woes

2008-12-03 Thread Albert Hopkins
On Wed, 2008-12-03 at 13:38 -0800, Warren DeLano wrote: > A bottom line / pragmatic question... hopefully not a FAQ. > > Why was it necessary to make "as" a reserved keyword? > > And more to the point, why was it necessary to prevent developers from > being able to refer to attributes named "as

Re: building an extension module with autotools?

2008-12-03 Thread Michael George
Martin v. Löwis wrote: I've tried using automake, however I'm worried about libtool not getting the options right while building my module. You should use python-config(1) to obtain the command line options necessary to build and link extension modules. HTH, Martin Sweet, I think th

Re: "as" keyword woes

2008-12-03 Thread Martin P. Hellwig
Martin P. Hellwig wrote: Warren DeLano wrote: A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? Because it can be used at the import statement to let the imported thing be known under another name? Something like: >>> import

Re: "as" keyword woes

2008-12-03 Thread Martin P. Hellwig
Warren DeLano wrote: A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? Because it can be used at the import statement to let the imported thing be known under another name? Something like: >>> import xml.etree.ElementTree as E

Re: building an extension module with autotools?

2008-12-03 Thread Michael George
Gerhard Häring wrote: Michael George wrote: I've tried using automake, In my opinion, this is serious overkill. automake is good for making stuff work on a herd of different Unixen with various combinations of libc functions available etc. But for developing a Python extension, it doesn't h

Re: python an sqlite objects

2008-12-03 Thread eric
On Dec 3, 10:21 pm, Gerhard Häring <[EMAIL PROTECTED]> wrote: > azrael wrote: > > It logical that it would be more efficient and logical to use a object > > oriented database, but in this case I ask because of the portable > > nature of sqlite. > > > so, if I get it right, this should be possible [

"as" keyword woes

2008-12-03 Thread Warren DeLano
A bottom line / pragmatic question... hopefully not a FAQ. Why was it necessary to make "as" a reserved keyword? And more to the point, why was it necessary to prevent developers from being able to refer to attributes named "as"? For example, this code breaks as of 2.6 / 3.0: Class C:

Re: Reverse zip() ?

2008-12-03 Thread Casey McGinty
> The corner case is when dealing with empty lists and there aren't > enough items to unpack. > > Another solution to zip(), with a slightly different behaviour for conner cases >>> a = (1,2,3) >>> b = (1,2,3) >>> c = (1,2,3,4) >>> zip(a,b) [(1, 1), (2, 2), (3, 3)] >>> map(None,a,b) [(1, 1),

Re: building an extension module with autotools?

2008-12-03 Thread Martin v. Löwis
> I've tried using automake, however I'm worried about libtool not getting > the options right while building my module. You should use python-config(1) to obtain the command line options necessary to build and link extension modules. HTH, Martin -- http://mail.python.org/mailman/listinfo/python

Re: building an extension module with autotools?

2008-12-03 Thread Gerhard Häring
Michael George wrote: Hello, (Please CC me in replies, as I am off-list) Ok, but please reply publicly. I'm building an application (a game) in python, with a single C module containing some performance-critical code. I'm trying to figure out the best way to set it up to build. Use dist

Re: python an sqlite objects

2008-12-03 Thread Gerhard Häring
azrael wrote: It logical that it would be more efficient and logical to use a object oriented database, but in this case I ask because of the portable nature of sqlite. so, if I get it right, this should be possible [...] Did you try it? Did it work? If so,it was pure luck. Attached is a scri

Re: Numpy record array - field names for all dimensions

2008-12-03 Thread Robert Kern
ShanMayne wrote: Greetings All Greetings! If you have more numpy questions, you will find numpy-discussion to be a better forum: http://www.scipy.org/Mailing_Lists I am seeking to represent datasets where each data element is the calculated result from several (4 for now) other data type

Re: Mathematica 7 compares to other languages

2008-12-03 Thread Xah Lee
On Dec 3, 8:24 am, Jon Harrop <[EMAIL PROTECTED]> wrote: > My example demonstrates several of Mathematica's fundamental limitations. enough babble Jon. Come flying $5 to my paypal account, and i'll give you real code, amongest the programing tech geekers here for all to see. I'll show, what kind

building an extension module with autotools?

2008-12-03 Thread Michael George
Hello, (Please CC me in replies, as I am off-list) I'm building an application (a game) in python, with a single C module containing some performance-critical code. I'm trying to figure out the best way to set it up to build. Distutils seems to be designed only for building and distributing

Python-URL! - weekly Python news and links (Dec 3)

2008-12-03 Thread Gabriel Genellina
QOTW: "Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right

Re: Converting a .xls file to .html

2008-12-03 Thread John Machin
On Dec 4, 12:57 am, Tino Wildenhain <[EMAIL PROTECTED]> wrote: > Hi, > > tarun wrote: > > Hello All, > > > I've a .xml file (saved as .xls) that can be opened in Microsoft excel. The file extension is only a vague indication of the *format* of the contents. How was it created? > > Well if its an

Re: Switching windows in PyQT

2008-12-03 Thread Дамјан Георгиевски
> I am new to PyQT and GUI programming in general. What tutorials I have > found are relatively clear on standard operations within a single > window (QtGui.QWidget or QtGui.QMainWindow). Exiting this window exits > the overall application. > > How would I switch between windows, that is close on

Re: Debugging a Python Program that Hangs

2008-12-03 Thread Ross Ridge
Kevin D. Smith <[EMAIL PROTECTED]> wrote: >I have a fairly large python program that, when a certain combination >of options is used, hangs. I have no idea where it is hanging, so >simply putting in print statements to locate the spot would be quite >difficult. Unfortunately, ctrl-C'ing the p

Re: python to parse excel file csv format

2008-12-03 Thread Tino Wildenhain
MRAB wrote: Jay Jesus Amorin wrote: This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, "rb"), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: o

Re: Running a Python script from crontab

2008-12-03 Thread Philip Semanchuk
On Dec 3, 2008, at 3:06 PM, Astley Le Jasper wrote: On 3 Dec, 19:49, Philip Semanchuk <[EMAIL PROTECTED]> wrote: On Dec 3, 2008, at 1:33 PM, Astley Le Jasper wrote: On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote: On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote: I've incl

Numpy record array - field names for all dimensions

2008-12-03 Thread ShanMayne
Greetings All I am seeking to represent datasets where each data element is the calculated result from several (4 for now) other data types. A matrix- like (in the general mathematical sense) seems logical, where the intersection of each of the 4 values (from different data sets) holds the value d

Tired of coding.

2008-12-03 Thread fel
http://digg.com/programming/Tired_of_coding_try_FBP_Flow_Based_Programming -- http://mail.python.org/mailman/listinfo/python-list

Re: Running a Python script from crontab

2008-12-03 Thread Astley Le Jasper
On 3 Dec, 19:49, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > On Dec 3, 2008, at 1:33 PM, Astley Le Jasper wrote: > > > > > On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > >> On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote: > > >>> I've included a switch to include or exclude th

Switching windows in PyQT

2008-12-03 Thread ShanMayne
Greetings All I am new to PyQT and GUI programming in general. What tutorials I have found are relatively clear on standard operations within a single window (QtGui.QWidget or QtGui.QMainWindow). Exiting this window exits the overall application. How would I switch between windows, that is close

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-03 Thread Jason Scheirer
On Dec 2, 6:13 pm, Aaron Brady <[EMAIL PROTECTED]> wrote: > On Dec 2, 6:58 pm, "Zac Burns" <[EMAIL PROTECTED]> wrote: > > > > > Sorry for the long subject. > > > I'm trying to create a subclass dictionary that runs extra init code > > on the first __getitem__ call. However, the performance of __get

Re: python an sqlite objects

2008-12-03 Thread skip
Bruno> Most of the time, you want to serialize the instance's __dict__. Does it recreate an instance at the other end or just a dict? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: python to parse excel file csv format

2008-12-03 Thread MRAB
Jay Jesus Amorin wrote: This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, "rb"), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: os.popen("chow

Re: python an sqlite objects

2008-12-03 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : Bruno> Or if you want something more portable, serialize the object to Bruno> json. At least you'll have a chance to deserialize it with some Bruno> other language. Assuming json can serialize more-or-less arbitrary Python objects. I assume the OP knows

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-03 Thread Arnaud Delobelle
"Zac Burns" <[EMAIL PROTECTED]> writes: > Sorry for the long subject. > > I'm trying to create a subclass dictionary that runs extra init code > on the first __getitem__ call. However, the performance of __getitem__ > is quite important - so I'm trying in the subclassed __getitem__ > method to fir

Re: python an sqlite objects

2008-12-03 Thread azrael
It logical that it would be more efficient and logical to use a object oriented database, but in this case I ask because of the portable nature of sqlite. so, if I get it right, this should be possible >>> class a: >>> def __init__(self, a, b): >>> self.c = a+b >>> self.d = a*b >>> >>>

Re: Reverse zip() ?

2008-12-03 Thread Benjamin Kaplan
On Wed, Dec 3, 2008 at 11:19 AM, Andreas Waldenburger <[EMAIL PROTECTED]>wrote: > On Wed, 3 Dec 2008 07:08:52 -0800 (PST) Janto Dreijer > <[EMAIL PROTECTED]> wrote: > > > I'd like to point out that since your where thinking in terms of > > matplotlib, you might actually find numpy's own transpose

Re: Debugging a Python Program that Hangs

2008-12-03 Thread Kay Schluehr
On 2 Dez., 17:19, Kevin D. Smith <[EMAIL PROTECTED]> wrote: > I have a fairly large python program that, when a certain combination > of options is used, hangs.  I have no idea where it is hanging, so > simply putting in print statements to locate the spot would be quite > difficult.  Unfortunately

Re: Mathematica 7 compares to other languages

2008-12-03 Thread jason-sage
[EMAIL PROTECTED] wrote: So when you need an algorithm, you can often find it already inside, for example in the large Combinatorics package. So it has WAY more batteries included, compared to Python. I'd like to see something as complete as that Combinatorics package in Python. Sage (http

Re: Running a Python script from crontab

2008-12-03 Thread Philip Semanchuk
On Dec 3, 2008, at 1:33 PM, Astley Le Jasper wrote: On 3 Dec, 16:41, Philip Semanchuk <[EMAIL PROTECTED]> wrote: On Dec 3, 2008, at 10:29 AM, Astley Le Jasper wrote: I've included a switch to include or exclude theloggingto console. Whenloggingonly to file, the script runs fine. Of course

Re: python to parse excel file csv format

2008-12-03 Thread Jay Jesus Amorin
This is how i do it, but it runs with error. Kindly help #!/usr/bin/env python import csv, sys, os filename = (sys.argv[1]) reader = csv.reader(open(filename, "rb"), delimiter=',', quoting=csv.QUOTE_NONE) try: for row in reader: os.popen("chown row[0] row[1]") except cs

  1   2   >