Re: pickling multiple dictionaries

2006-05-24 Thread Miki
Hello Matthew, You can try either http://docs.python.org/lib/module-shelve.html or any other database bindings with blobs. HTH, Miki http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

problem select object in pyode

2006-05-24 Thread freshman
# test code: http://pyode.sourceforge.net/tutorials/tutorial3.html # #i want selecting object in pyode test code. # what's wrong? # under modify code # see selectObject() function # pyODE example 3: Collision detection # Originally by Matthias Baas. # Updated by Pierre Gay to work without pygame

ftputil.py

2006-05-24 Thread Sheldon
Hi Everyone, I recently installed a module called ftputil and I am trying to understand how it works. I created a simple program to download about 1500 files from my ftp and the program looks like this: ** #! /usr/bin/env pyt

Re: pickling multiple dictionaries

2006-05-24 Thread Hans Georg Krauthaeuser
manstey wrote: > Hi, > > I am running a script that produces about 450,000 dictionaries. I tried > putting them into a tuple and then pickling the tuple, but the tuple > gets too big. Can I pickle dictionaries one after another into the same > file and then read them out again? > > Cheers, > Matt

Re: No math module??

2006-05-24 Thread Tim Golden
Tim Roberts wrote: > WIdgeteye <[EMAIL PROTECTED]> wrote: > > > >On Tue, 23 May 2006 12:40:49 +1000, Ben Finney wrote: > > > >Ok this is weird. I checked: > >/usr/local/lib/python2.3/lib-dynload/math.so > > > >Just as you have on your system and it's there. > >So why in the heck isn't it loading wi

Re: newbie: windows xp scripting

2006-05-24 Thread Tim Golden
Tim Roberts wrote: > "oscartheduck" <[EMAIL PROTECTED]> wrote: > > > >It wasn't, but after seeing your success I discovered what was wrong. > >My destination directory didn't exist, and for some reason windows > >wasn't automatically creating it to dump the files in. > > Right. The "copy" command

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Maxim Sloyko
I guess the following standard method will help : class MyLocker(object): def __init__(self, lock): self.lock = lock self.lock.acquire() def __del__(self): self.lock.release() Then whenever you need to acquire a lock: templock = MyLocker(self.__mutex) del tem

Re: documentation for win32com?

2006-05-24 Thread Tim N. van der Leeuw
Roger Upole wrote: > The Excel docs are your best bet. The examples they give > are all MS-specific languages like VB, but most translate > fairly easily to Python. > > You can also run makepy on the Excel typelib, which will > generate a file with all the methods, events etc available > thru the

Re: ftputil.py

2006-05-24 Thread Miki
Hello Sheldon, > Here is the part of the program that I need explained: > > host.download(name, name, 'b') # remote, local, binary mode Download file called "name" from host to a local file in the same name, use binary mode. > source = host.file('index.html', 'r') # file-like object Open a file

Re: dict literals vs dict(**kwds)

2006-05-24 Thread bruno at modulix
George Sakkis wrote: > Bruno Desthuilliers wrote: > > >>George Sakkis a écrit : >> >>>Although I consider dict(**kwds) as one of the few unfortunate design >>>choices in python since it prevents the future addition of useful >>>keyword arguments (e.g a default value or an orderby function), I've

John Bokma harassment

2006-05-24 Thread Xah Lee
I'm sorry to trouble everyone. But as you might know, due to my controversial writings and style, recently John Bokma lobbied people to complaint to my web hosting provider. After exchanging a few emails, my web hosting provider sent me a 30-day account cancellation notice last Friday. I'm not sur

Re: John Bokma harassment

2006-05-24 Thread Erik Max Francis
Xah Lee wrote: > I'm sorry to trouble everyone. But as you might know, due to my > controversial writings and style, recently John Bokma lobbied people to > complaint to my web hosting provider. After exchanging a few emails, my > web hosting provider sent me a 30-day account cancellation notice l

Re: logging

2006-05-24 Thread Baurzhan Ismagulov
Hello Vinay, On Tue, May 23, 2006 at 04:13:38PM -0700, Vinay Sajip wrote: > > [logger_root] > > level=CRITICAL > > handlers=console > > > > [logger_l01] > > level=DEBUG > > qualname=l01 > > handlers=console > > > > I want logger_root to go to /dev/null, so I've configured it with level > > CRITIC

Re: John Bokma harassment

2006-05-24 Thread Dag Sunde
"Xah Lee" <[EMAIL PROTECTED]> skrev i melding news:[EMAIL PROTECTED] > I'm sorry to trouble everyone. But as you might know, due to my > controversial writings and style, recently John Bokma lobbied people to > complaint to my web hosting provider. After exchanging a few emails, my > web hosting p

hi,every body. a problem with PyQt.

2006-05-24 Thread softwindow
i use QT-designer to design application GUI. now i save the test.ui file into e:\test\test.ui next step,how can i run it? -- http://mail.python.org/mailman/listinfo/python-list

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread Giles Brown
The tool to create a python script from a Qt designer .ui file is called pyuic. I suggest you have a google for "pyqt tutorial" pages. I found this one for example: http://wiki.python.org/moin/JonathanGardnerPyQtTutorial Regards, Giles -- http://mail.python.org/mailman/listinfo/python-list

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread Luke Plant
> i use QT-designer to design application GUI. > now i save the test.ui file into e:\test\test.ui > next step,how can i run it? You should have a look at a PyQt tutorial, such as this one: http://vizzzion.org/?id=pyqt Luke -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread ilitzroth
Xah Lee schreef: > I'm sorry to trouble everyone. But as you might know, due to my > controversial writings and style, recently John Bokma lobbied people to > complaint to my web hosting provider. After exchanging a few emails, my > web hosting provider sent me a 30-day account cancellation notic

referrers

2006-05-24 Thread raghu
Hi All, The sys.getrefcount() is very useful to get the number of references on a particular object. Is there any companion function to get "who" the referrers are ? for e.g. global x global y global z x0=24012 y=x0 z=x0 print "ref count ",sys.getrefcount(x0) This prints a ref count of 5.

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread softwindow
thanks everyone! -- http://mail.python.org/mailman/listinfo/python-list

Re: referrers

2006-05-24 Thread Diez B. Roggisch
raghu wrote: > Hi All, > > The sys.getrefcount() is very useful to get the number of references on > a particular object. > > Is there any companion function to get "who" the referrers are ? > > for e.g. > > global x > global y > global z > > > x0=24012 > y=x0 > z=x0 > > print "ref count ",

Re: John Bokma harassment

2006-05-24 Thread Ant
>From my point of view, this issue has two sides: 1) Xah is posting to the newgroups valid topics for discussion - if some find these controversial, then all the better: it means that the topic has provoked some thought. You only need to look at the quantity of Xah's threads to see how popular the

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread softwindow
but in my computer pyuic is not a valid commond may be i don't install something,but i have installed PyQt4. -- http://mail.python.org/mailman/listinfo/python-list

Re: hi,every body. a problem with PyQt.

2006-05-24 Thread softwindow
i find it now thanks ! -- http://mail.python.org/mailman/listinfo/python-list

Re: A critic of Guido's blog on Python's lambda

2006-05-24 Thread Michele Simionato
Kay Schluehr wrote: > http://www.fiber-space.de/EasyExtend/doc/EE.html Well, I have not read that page yet, but the name "fiber space" reminds me of old memories, when I was doing less prosaic things than now. Old times .. ;) Michele Simionato > It fits quite nice with Python and is

Re: Using python for a CAD program

2006-05-24 Thread baalbek
Paddy wrote: > Hi Baalbek, > Athouh they are database editors, they are not relational database > editors. Relational database engines fit some type of problems but > others have found that RDBMS don't fit CAD data. They are just too slow > and add complexity in mapping the 'natural CAD data format

Re: referrers

2006-05-24 Thread raghu
Diez, I did look into gc, specifically gc.get_referrers(), but it seemed to give me something that I cant decipher. I added the following line. print "referrers ",gc.get_referrers(x0) This is what I got. referrers [{'__builtins__': , '__file__': './tst1.py', 'pdb': , 'sys': , 'y': 24012, 'gc'

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Zameer
Unindent your first return statement. The return statement in putVar is not needed. -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python for a CAD program

2006-05-24 Thread baalbek
David Cuthbert wrote: > baalbek wrote: > >> David Cuthbert wrote: >> >>> This does not mean the design itself should be stored as an RDBMS. >>> As I've stated previously, CAD data (both electrical and, it appears, >>> mechanical) does not lend itself to RDBMS relationship modeling. >> >> >> I s

Re: John Bokma harassment

2006-05-24 Thread Ian Wilson
[EMAIL PROTECTED] wrote: > Xah Lee schreef: > >> > off-topic postings> Which reminds me of http://www.catb.org/~esr/faqs/smart-questions.html#not_losing > We seem to have strayed a long way from Voltaire's > "I do not agree with what you say, but I will defend to the death your > right to say it.

Re: ftputil.py

2006-05-24 Thread Sheldon
Thanks! Sheldon -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread Alan
With apologies to Voltaire: If Xah Lee did not exist, it would be necessary for John Bokma to invent him. Xah and Bokma are both idiots, they truly deserve each other. The sooner you killfile these two clowns, the happier you'll be. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to change sys.path?

2006-05-24 Thread Steve Holden
Ju Hui wrote: > yes, we can change PYTHONPATH to add some path to sys.path value, but > how to remove item from sys.path? > That would be del sys.path[3] for example. Of course you may need to search sys.path to determine the exact element you need to delete, but sys.path is just like any other

Re: referrers

2006-05-24 Thread Diez B. Roggisch
raghu wrote: > Diez, > > I did look into gc, specifically gc.get_referrers(), but it seemed to > give me something that I cant decipher. > > I added the following line. > > print "referrers ",gc.get_referrers(x0) > > This is what I got. > > referrers [{'__builtins__': , > '__file__': './tst1

Re: John Bokma harassment

2006-05-24 Thread ilitzroth
I agree there are limits to you right to free speech, but I believe Xah Lee is not crossing any boundaries. If he starts taking over newspapers and TV stations be sure to notify me, I might revise my position. Immanuel -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread Ant
> Surely Voltaire didn't support speaking in inappropriate fora? Who knows? But the fora Xah posts to are few (5 or so?) and appropriate. "Software needs Philosophers" wasn't even his rant, but was certainly appropriate to all groups he posted to. If you don't like Xah's posts, then don't read th

Re: John Bokma harassment

2006-05-24 Thread Alex Hunsley
Xah Lee wrote: > I'm sorry to trouble everyone. But as you might know, due to my > controversial writings and style, recently John Bokma lobbied people to > complaint to my web hosting provider. After exchanging a few emails, my > web hosting provider sent me a 30-day account cancellation notice la

Re: John Bokma harassment

2006-05-24 Thread Tim N. van der Leeuw
[EMAIL PROTECTED] wrote: > I agree there are limits to you right to free speech, but I believe Xah > Lee is not crossing > any boundaries. If he starts taking over newspapers and TV stations be > sure to notify me, > I might revise my position. > Immanuel Perhaps he's not crossing boundaries of f

PEP 3102 for review and comment

2006-05-24 Thread molasses
I don't mind the naked star and will be happy if thats what we end up with. Though how about using *None? I think that makes the intention of the function clearer. eg. def compare(a, b, *None, key=None): Which to me reads as "no further positional arguments". Or alternatively: def compare(a, b,

Re: PHP's openssl_sign() using M2Crypto?

2006-05-24 Thread KW
On 2006-05-23, [EMAIL PROTECTED] wrote: > That is really strange, because PKey has had sign_init method since > 2004. That code works for me (just tested). What version of M2Crypto > are you using? I'd advice you upgrade to 0.15 if possible. See > > http://wiki.osafoundation.org/bin/view/Projects/M

Re: Xah's Edu Corner: Criticism vs Constructive Criticism

2006-05-24 Thread antroy
> 24. Learn when not to reply to a troll (and bother several groups while >doing so). 25. Learn when not to reply to a reply to a troll (and bother several groups while doing so). This could go on and on... ;-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiple Version Install?

2006-05-24 Thread David C.Ullrich
On Fri, 05 May 2006 07:44:45 -0500, David C. Ullrich <[EMAIL PROTECTED]> wrote: [...] >Just curious: How does pythonxx.dll determine things >like where to find the standard library? That's the >sort of thing I'd feared might cause confusion... Ok, it was a stupid question, cuz right there in the r

Re: John Bokma harassment

2006-05-24 Thread Timo Stamm
Tim N. van der Leeuw schrieb: > [EMAIL PROTECTED] wrote: >> I agree there are limits to you right to free speech, but I believe Xah >> Lee is not crossing >> any boundaries. If he starts taking over newspapers and TV stations be >> sure to notify me, >> I might revise my position. >> Immanuel > >

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Roy Smith
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote: > class Shared: > def __init__(self): > self.__userData= {} > self.__mutex = threading.Lock() #lock object > > def getVar(self, variableName): > temp = None > error = 0

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Thomas Guettler
Am Tue, 23 May 2006 12:47:05 -0700 schrieb Carl J. Van Arsdall: > Hey python people, > > I'm interested in using the try/finally clause to ensure graceful > cleanup regardless of how a block of code exits. However, I still am > interested in capturing the exception. You can reraise the except

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-24 Thread Kent Johnson
manstey wrote: > Hi, > > How do I convert a string like: > a="{'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'}" > > into a dictionary: > b={'syllable': u'cv-i b.v^ y^-f', 'ketiv-qere': 'n', 'wordWTS': u'8'} Try this recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Reci

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Maxim Sloyko" <[EMAIL PROTECTED]> wrote: > I guess the following standard method will help : > > class MyLocker(object): > def __init__(self, lock): > self.lock = lock > self.lock.acquire() > > def __del__(self): > self.lock.r

Python Programming Books?

2006-05-24 Thread herraotic
I have been getting ready to learn programming for a long time, installed a GNU/Linux operating system, learnt the ins and outs but I think it is time to pick up a book and learn to now program. I have never actually programmed before only dabbed into XHTML so do take it in mind that I need a book

Re: Python Programming Books?

2006-05-24 Thread Rony Steelandt
1.Python for Dummies Maruch Stef;Maruch Aahz - Hungry Minds Inc,U.S. - 408 pages - 08 2006 2.Programming Python Lutz Mark - O Reilly - 1256 pages - 07 2006 3.Core Python Programming Chun Wesley J - Peachpit Press - 07 2006 4.Python Fehily Chris - Peachpit Press - 05 2006 5.Python Essential

Re: NEWB: how to convert a string to dict (dictionary)

2006-05-24 Thread vbgunz
I am sure something much more elaborate will show it's face but this I made in about 10 minutes. Didn't do much testing on it but it certainly does convert your string modeled after a dictionary into a real dictionary. You might wish to check against more variations and possibilities and tweak and

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread bruno at modulix
Carl J. Van Arsdall wrote: (snip) Not an answer to your question, just a few comments on your code: > class Shared: class Shared(object): >def __init__(self): >self.__userData= {} >self.__mutex = threading.Lock() #lock object Don't use __names unless yo

Re: Python Programming Books?

2006-05-24 Thread vbgunz
Learning Python by Mark Lutz will be the most perfect book to get you started! Perhaps there are others aimed at the non-programmer but after getting through that book (2 times) I finally left it with wings... It is a great book for the n00b in my humble opinion. After that, you'll pretty much star

Re: Python Programming Books?

2006-05-24 Thread herraotic
Thanks, if you don't mind could I have a small personal description on the quality of the books (pros, cons). I also am interested if anyone has used "Python Programming: An Introduction to Computer Science" and if I could be given a detailes evaluation about it. Thanks again. -- http://mail.py

Re: John Bokma harassment

2006-05-24 Thread Ben Bullock
"Xah Lee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If you believe this lobbying to my webhosting provider is unjust, > please write to my web hosting provider [EMAIL PROTECTED] Why don't you just change your provider? It would take less time than this. -- http://mail.pytho

Re: Python Programming Books?

2006-05-24 Thread herraotic
Thanks vbgunz that was the reply I was looking for! Do you think it is wise to hold back for a 3rd edition? My 1:47 pm message was a reply to Rony Steelandt. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Programming Books?

2006-05-24 Thread bruno at modulix
[EMAIL PROTECTED] wrote: (snip) > So now i'm hear to use all of your collective expertise for the ideal > book for a beginning programming who want's to start with python. 'ideal' greatly depends on the reader !-) But FWIW, this is a FAQ (well : 2): http://www.python.org/doc/faq/general/#i-ve-ne

Python keywords vs. English grammar

2006-05-24 Thread Roy Smith
I noticed something interesting today. In C++, you write: try { throw foo; } catch { } and all three keywords are verbs, so when you describe the code, you can use the same English words as in the program source, "You try to execute some code, but it throws a foo, which is caught by the han

Re: Python Programming Books?

2006-05-24 Thread Rony Steelandt
Since I'm a professional developper,I don't think that my personnal view on those books would be of any use to you. I actually have no idea how to start Python if you're not a developper, I know it is possible since quit a lot of matimatical engineers use it. But I'm sure some people here will

Re: Python keywords vs. English grammar

2006-05-24 Thread Rony Steelandt
I'm not a english speaker, so I just accepted it...; I understood it as : 'Try' allways to execute this code, 'except' when it doesn't work do this > I noticed something interesting today. In C++, you write: > > try { >throw foo; > } catch { > } > > and all three keywords are verbs, so

Re: problem with writing a simple module

2006-05-24 Thread nephish
cool, thanks, i was running on some thinner examples i found on the net. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to open https Site and pass request?

2006-05-24 Thread Nico Grubert
> That depends on your OS. In Windows, I believe you would have to > recompile Python from source. On Linux, you could probably just get a > package. From Debian, I know that it's python-ssl. I'm sure most the > others would have one as well. Hi Jerry, thank you for your reply. I use Linux an

Re: Python keywords vs. English grammar

2006-05-24 Thread Duncan Smith
Roy Smith wrote: > I noticed something interesting today. In C++, you write: > > try { >throw foo; > } catch { > } > > and all three keywords are verbs, so when you describe the code, you can > use the same English words as in the program source, "You try to execute > some code, but it thr

Re: John Bokma harassment

2006-05-24 Thread olsongt
Tim N. van der Leeuw wrote: > [EMAIL PROTECTED] wrote: > > I agree there are limits to you right to free speech, but I believe Xah > > Lee is not crossing > > any boundaries. If he starts taking over newspapers and TV stations be > > sure to notify me, > > I might revise my position. > > Immanuel

Re: getattr for modules not classes

2006-05-24 Thread Piet van Oostrum
> Heiko Wundram <[EMAIL PROTECTED]> (HW) wrote: >HW> y.py >HW> --- >HW> from x import test >HW> print test.one >HW> print test.two >HW> print test.three >HW> --- Or even: import x x = x.test print x.one print x.two print x.three -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.

Re: Access C++, Java APIs from Python..

2006-05-24 Thread [EMAIL PROTECTED]
check out the pywin32 extension by Mark Hammond -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Programming Books?

2006-05-24 Thread Brian
[EMAIL PROTECTED] wrote: > Thanks, if you don't mind could I have a small personal > description on the quality of the books (pros, cons). > > I also am interested if anyone has used "Python Programming: An > Introduction to Computer Science" and if I could be given a detailes > evaluation about i

Re: John Bokma harassment

2006-05-24 Thread SamFeltus
I was considering opening an account with Dreamhost. Can't say I agree with all of Xah's writings, but they often raise important points. Dreamhost is a company I will never spend money with. Usenet is full of narrow minded group thinking that needs to be questioned. -- http://mail.python.org/m

How to find out a date/time difference

2006-05-24 Thread Lad
I use datetime class in my program and now I have two fields that have the datetime format like this datetime.datetime(2006, 5, 24, 16, 1, 26) How can I find out the date/time difference ( in days) of such two fields? Thank you for help? L -- http://mail.python.org/mailman/listinfo/python-lis

Re: John Bokma harassment

2006-05-24 Thread George Sakkis
Alan wrote: > With apologies to Voltaire: > If Xah Lee did not exist, it would be necessary for John Bokma to > invent him. > > Xah and Bokma are both idiots, they truly deserve each other. The > sooner you killfile these two clowns, the happier you'll be. Well said, I couldn't put it better. -

Re: John Bokma harassment

2006-05-24 Thread Eli Gottlieb
Tim N. van der Leeuw wrote: > [EMAIL PROTECTED] wrote: > >>I agree there are limits to you right to free speech, but I believe Xah >>Lee is not crossing >>any boundaries. If he starts taking over newspapers and TV stations be >>sure to notify me, >>I might revise my position. >>Immanuel > > > Pe

Re: John Bokma harassment

2006-05-24 Thread Ken Tilton
Tim N. van der Leeuw wrote: > [EMAIL PROTECTED] wrote: > >>I agree there are limits to you right to free speech, but I believe Xah >>Lee is not crossing >>any boundaries. If he starts taking over newspapers and TV stations be >>sure to notify me, >>I might revise my position. >>Immanuel > > >

Re: graphs and charts

2006-05-24 Thread Bryan
Terry Hancock wrote: > Yaron Butterfield wrote: >> What's the best way to on-the-fly graphs and charts using Python? Or >> is Python not really the best way to do this? > > I quite enjoyed using Biggles for this: > > http://biggles.sf.net > > There are many different choices, though. > > Chee

Re: How to find out a date/time difference

2006-05-24 Thread SaskMan
Convert datetime.datetime(2006, 5, 24, 16, 1, 26) to an ordinal number like: datetime.datetime(2006, 5, 24, 16, 1, 26).toordinal() and subtract them to get number of days. -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread Ken Tilton
Ben Bullock wrote: > "Xah Lee" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >> If you believe this lobbying to my webhosting provider is unjust, >> please write to my web hosting provider [EMAIL PROTECTED] > > > Why don't you just change your provider? It would take less ti

Re: How to find out a date/time difference

2006-05-24 Thread Klaus Alexander Seistrup
Lad skrev: > How can I find out the date/time difference ( in days) of such > two fields? Did you try to subtract one value from the other? Mvh, -- Klaus Alexander Seistrup SubZeroNet, Copenhagen, Denmark http://magnetic-ink.dk/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to find out a date/time difference

2006-05-24 Thread Nico Grubert
> I use datetime class in my program and now > I have two fields that have the datetime format like this > datetime.datetime(2006, 5, 24, 16, 1, 26) > How can I find out the date/time difference ( in days) of such two > fields? Hi Lad, you could do this: >>> a = datetime.datetime(2006,

Scipy: vectorized function does not take scalars as arguments

2006-05-24 Thread ago
Once I vectorize a function it does not acccept scalars anymore. Es def f(x): return x*2 vf = vectorize(f) print vf(2) AttributeError: 'int' object has no attribute 'astype' Is this the intended behaviour? -- http://mail.python.org/mailman/listinfo/python-list

Re: dict literals vs dict(**kwds)

2006-05-24 Thread George Sakkis
bruno at modulix wrote: > When all your keys are valid Python identifiers, and you may want to use > another dict-like instead of the builtin dict. It's easy to replace the > dict() factory in a function, class, or whole module : > > class MyDict(...): > # dict-like class > > dict = MyDict > > t

Re: Best way to handle exceptions with try/finally

2006-05-24 Thread Zameer
Doing cleaup in except is not the Python way. This is what finally is for. Using except you would have to at least say: try: stuff() cleanup() except: cleanup() raise Duplicate code - not nice. finally is the Python way: try: stuff() finally: cleanup() That's it. But the

Re: John Bokma harassment

2006-05-24 Thread Mitch
[EMAIL PROTECTED] wrote: > Xah Lee schreef: > [...] >> >> If you believe this lobbying to my webhosting provider is unjust, >> please write to my web hosting provider [EMAIL PROTECTED] >> >> Your help is appreciated. Thank you. >> >>Xah >>[EMAIL PROTECTED] >> ∑ http://xahlee.org/ > > We

linking errors with debug build of Python2.4.3

2006-05-24 Thread Martin Wiechert
Hi list, I've created a fresh build of Python 2.4.3 using the following configuration $ ./configure --with-pydebug --prefix=/usr/local/debug --enable-shared --with-fpectl --with-signal-module in particular I used --with-pydebug. Now when I start the interpreter some dynamically loaded modules

Re: how to change sys.path?

2006-05-24 Thread John Salerno
Dennis Lee Bieber wrote: > On Tue, 23 May 2006 20:21:10 GMT, John Salerno > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > >> I meant actually adding the PYTHONPATH variable to the environment >> variables list. > > You're looking at editing the Windows registry for tha

Re: Python Programming Books?

2006-05-24 Thread John Salerno
vbgunz wrote: > Learning Python by Mark Lutz will be the most perfect book to get you > started! Perhaps there are others aimed at the non-programmer but after > getting through that book (2 times) I finally left it with wings... It > is a great book for the n00b in my humble opinion. After that, y

Re: Python Programming Books?

2006-05-24 Thread John Salerno
Brian wrote: > One book that I think you should definitely look at is Beginning Python > from Novice to Professional. I think that it is one of the best books > out there on the subject, is an easy read, has clear and concise > examples, and does a great job of explaining the whys without making

Re: Python Programming Books?

2006-05-24 Thread John Salerno
[EMAIL PROTECTED] wrote: > Thanks, if you don't mind could I have a small personal > description on the quality of the books (pros, cons). > > I also am interested if anyone has used "Python Programming: An > Introduction to Computer Science" and if I could be given a detailes > evaluation about i

Re: John Bokma harassment

2006-05-24 Thread bradb
> C'mon, John Bokma (and everyone else dumb enough to crosspost their > shushing to every group on the crosspost list -- why do they do that? So > Xah will hear them six times? No, they want everyone to see how witty > they are when they tell Xah off. Now /that/ is spam) is the problem. > > kenny

Re: John Bokma harassment

2006-05-24 Thread Claudio Grondi
Tim N. van der Leeuw wrote: > [EMAIL PROTECTED] wrote: > >>I agree there are limits to you right to free speech, but I believe Xah >>Lee is not crossing >>any boundaries. If he starts taking over newspapers and TV stations be >>sure to notify me, >>I might revise my position. >>Immanuel > > > Pe

Re: John Bokma harassment

2006-05-24 Thread John Bokma
fup to poster "Xah Lee" <[EMAIL PROTECTED]> wrote: > I'm sorry to trouble everyone. But as you might know, due to my > controversial writings and style, You're mistaken. Not that I or many other people with some brains had expected anything else. The problem is that you crosspost to 5 groups (5

Re: John Bokma harassment

2006-05-24 Thread John Bokma
"Dag Sunde" <[EMAIL PROTECTED]> wrote: > "Xah Lee" <[EMAIL PROTECTED]> skrev i melding > news:[EMAIL PROTECTED] >> I'm sorry to trouble everyone. But as you might know, due to my >> controversial writings and style, recently John Bokma lobbied people to >> complaint to my web hosting provider. Af

Re: Python keywords vs. English grammar

2006-05-24 Thread John Salerno
Roy Smith wrote: > try { >throw foo; > } catch { > } > try: >raise foo > except: But which one is prettier? ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: John Bokma harassment

2006-05-24 Thread John Bokma
Ken Tilton <[EMAIL PROTECTED]> wrote: > Ben Bullock wrote: >> "Xah Lee" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> If you believe this lobbying to my webhosting provider is unjust, >>> please write to my web hosting provider [EMAIL PROTECTED] >> >> >> Why don't you j

Re: John Bokma harassment

2006-05-24 Thread John Bokma
Timo Stamm <[EMAIL PROTECTED]> wrote: > Tim N. van der Leeuw schrieb: >> Perhaps he's not crossing boundaries of free speech, but he's >> repeatedly crossing boundaries on usenet nettiquette, even though >> repeatedly he's being asked not to do so. > > And repeatedly, others have encouraged him

Re: John Bokma harassment

2006-05-24 Thread John Bokma
Eli Gottlieb <[EMAIL PROTECTED]> wrote: > Who reads blogs? They're well known for housing crackpots far worse > than Xah, and I estimate he doesn't want to associate himself with that > sort. Yup, he seems to be quite happy as a Usenet Kook -- John Bokma Freelance software developer

Re: Python Programming Books?

2006-05-24 Thread herraotic
I borrowed Learning Python 2nd edtion from a library once and it felt condensed with information and I didn't think I could start with it "yet" as I want a book made for a beginner programmer and I don't think Learning Python 2nd edtion is made for my audience. I want something that explains progr

Re: John Bokma harassment

2006-05-24 Thread Mitch
John Bokma wrote: [...] > You're mistaken. All you need to do is report it. After some time Xah will > either walk in line with the rest of the world, or has found somewhere > else to yell. As long as it's not my back garden and not around 4AM, I am > ok with it. > Walk in line with the rest o

Re: John Bokma harassment

2006-05-24 Thread Bill Atkins
Ken Tilton <[EMAIL PROTECTED]> writes: > C'mon, John Bokma (and everyone else dumb enough to crosspost their > shushing to every group on the crosspost list -- why do they do that? > So Xah will hear them six times? No, they want everyone to see how > witty they are when they tell Xah off. Now /th

Re: John Bokma harassment

2006-05-24 Thread John Bokma
"Ant" <[EMAIL PROTECTED]> wrote: > I have no particular affinity for Xah's views, but what does get up my > nose is usenet Nazism. That's because you're clueless. -- John MexIT: http://johnbokma.com/mexit/ personal page: http://john

Re: Python Programming Books?

2006-05-24 Thread John Salerno
[EMAIL PROTECTED] wrote: > I borrowed Learning Python 2nd edtion from a library once and it felt > condensed with information and I didn't think I could start with it > "yet" as I want a book made for a beginner programmer and I don't think > Learning Python 2nd edtion is made for my audience. > >

Re: John Bokma harassment

2006-05-24 Thread John Bokma
Mitch <[EMAIL PROTECTED]> wrote: > John Bokma wrote: > [...] >> You're mistaken. All you need to do is report it. After some time Xah >> will either walk in line with the rest of the world, or has found >> somewhere else to yell. As long as it's not my back garden and not >> around 4AM, I am ok wi

Re: John Bokma harassment

2006-05-24 Thread Bill Atkins
John Bokma <[EMAIL PROTECTED]> writes: > Ken Tilton <[EMAIL PROTECTED]> wrote: > >> Ben Bullock wrote: >>> "Xah Lee" <[EMAIL PROTECTED]> wrote in message >>> news:[EMAIL PROTECTED] >>> If you believe this lobbying to my webhosting provider is unjust, please write to my web hosting prov

  1   2   3   >