Re: Importing and namespace visibility

2005-05-15 Thread Fredrik Lundh
"jean-marc" wrote: > BUT, of all this I thought that if you import module1, then module2 > (into __main__), objects from module1 would be available to objects of > module2 which came (into memory space) after module1 was loaded. This > does not seem to be the case, and module2 requires an 'import

Re: Precision?

2005-05-15 Thread Steffen Glückselig
So for using the python-interpreter as a simple calculator using 'print' seems to be the simplest and still exact way... Thanks for clarification Steffen -- http://mail.python.org/mailman/listinfo/python-list

Detect console close

2005-05-15 Thread new pip
In Windows, when I double click on my .py file, the program runs with a console. How can I detect when the console is closed? Any code samples are appreciated. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: installing mod_python with python 2.4 on Windows xp

2005-05-15 Thread Luis M. Gonzalez
Thanks for the suggestion. The reason I didn't post this question in mod_python's list is because somebody already asked this question there, but he got only one reply. Anyway I followed this advice but it didn't work, so I thought that maybe I could get the answer here. I'll try again though to s

Re: installing mod_python with python 2.4 on Windows xp

2005-05-15 Thread grahamd
Suggested that you ask this on the mod_python mailing list: http://mailman.modpython.org/mailman/listinfo/mod_python Detail exactly what the problems you are having are. The person who packages the dev versions is on the mod_python list as are other developers of mod_python. I don't know that t

Optimise Europython competition

2005-05-15 Thread Jacob Hallen
A classic dilemma for conferences is that if you have many tracks, you may find that all of a sudden, a room is swamped, and there is a queue of people wanting to get in. Another problem is that you risk scheduling talks against each other that have a very large set of interested people in common.

BayPIGgies: May 19, 7:30pm (FIRST meeting at Google)

2005-05-15 Thread Aahz
NOTE: we are no longer meeting at Stanford; the May meeting is at Google in Mountain View. The next meeting of BayPIGgies will be Thurs, May 19 at 7:30pm. NOTE: to celebrate our first meeting at Google, Google will be providing a buffet dinner starting at 6:45pm. Alex Martelli will be repeating

Re: question about the id()

2005-05-15 Thread Bengt Richter
On Mon, 16 May 2005 11:28:31 +0800, "kyo guan" <[EMAIL PROTECTED]> wrote: >HI Skip: > > I want to check is there any change in the instance 's methods. a=A() a2=A() a.f == a2.f >False a.f is a2.f >False a.f is a.f >False > If the instance methods are creat

Re: Exception question

2005-05-15 Thread Steven Bethard
Ron Adam wrote: > I had read somewhere that exception objects were global, but that wasn't > correct, after testing it, they appear to be part of the local frame. So > once a function exits, any exceptions objects that happened inside the > function are no longer retrievable. > > And checking e

Re: Safe eval, or how to get list from string

2005-05-15 Thread Steven Bethard
Joseph Garvin wrote: > [EMAIL PROTECTED] wrote: > >>It has something called "reval" looks that would fit my needs >>perfectly. >> >>Details: >>http://www.faqts.com/knowledge_base/view.phtml/aid/4550/fid/538 > > If I remember correctly reval and it's brothers were deemed insecure, > are no longer

Column data with first value from each row as key?

2005-05-15 Thread Irvine, Wayne D
Title: Column data with first value from each row as key? Hi All, I have a file of column data where the first row/line of the file contains the column headings. These I need to use as keys. Furthermore I need to be able to use the first value from each of the data rows/lines as a secondary

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
Scott David Daniels wrote: > Althought object is a horrible name for your own value (there is a builtin > object which you use for defining new-style classes), you probably want: Good point, I agree. It's a bad habit to start, sooner or later it would cause a problem. I'll find something else

installing mod_python with python 2.4 on Windows xp

2005-05-15 Thread Neuruss
I need help with this issue. All my attempts to get it up and running failed, and the documentation I found so far didn't help me at all. I'm trying to configure this components together: - Apache 2.0.53 - mod_python 3.2.0 dev 2005 0428 win32-p v2.4 - python 2.4 The above version of mod_python b

PythonWin + Tkinter = broken relation with WindowsXP !?!?!

2005-05-15 Thread jean-marc
I read that Tkinter and Python IDEs (PythonWin and Idle at least) makes for a bad mix in execution mode because they're fighting for the event loop, but this mode is usefull to use the debugger. But to the point of breaking something elsewhere than in memory ??? (Shutting down and rebooting the co

Amy Redding/Tucson/IBM is out of the office.

2005-05-15 Thread Amy Redding
I will be out of the office starting 05/12/2005 and will not return until 05/16/2005. I am out of the office until Mon. May 16 For assistance see Said Lamri x2374 -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Reference from module doc strings.

2005-05-15 Thread Scott David Daniels
Ron Adam wrote: > John Machin wrote: > >> Ron Adam wrote: >> >>> Does anyone have suggestions on how to improve this further? >> >> Not functionally (from me, yet). However if you can bear a stylistic >> comment, do read on :-) >> >>> elif (isinstance(object,str) >>> or isi

RE: question about the id()

2005-05-15 Thread kyo guan
HI Skip: I want to check is there any change in the instance 's methods. >>> a=A() >>> a2=A() >>> a.f == a2.f False >>> a.f is a2.f False >>> a.f is a.f False >>> If the instance methods are create on-the-fly, how to do that? Thanks. Kyo > -Original Message- > From: Ski

Re: Precision?

2005-05-15 Thread Facundo Batista
On 5/15/05, Ron Adam <[EMAIL PROTECTED]> wrote: > >>> x > 321.61 > > Here the error has been kept to a minimum. In most cases, it isn't a > problem, but it is something to be aware of. It does matter in banking > and I beleive there are standard ways of dealing with it. Yes, use

Re: question about the id()

2005-05-15 Thread Skip Montanaro
kyo> Can someone explain why the id() return the same value, and why kyo> these values are changing? Instance methods are created on-the-fly. In your example the memory associated with the a.f bound method (not the same as the unbound method A.f) is freed before you reference a.g. That

Brad Pahlke is out of the office.

2005-05-15 Thread Bradley K Pahlke
I will be out of the office starting 05/11/2005 and will not return until 05/17/2005. I will respond to your message when I return. -- http://mail.python.org/mailman/listinfo/python-list

Re: BLT with TCL/TK 8.4.9 and Python 2.4

2005-05-15 Thread Jeff Hobbs
Kenneth Miller wrote: > Has anyone acheived this? There is no reason why Tkinter couldn't load BLT (from the Tcl side). You could wrap it up into a Tkinter-style widget, or just drive it through lower level evals. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sopho

question about the id()

2005-05-15 Thread kyo guan
HI ALL: Can someone explain why the id() return the same value, and why these values are changing? Thanks you. Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class A(object): ...

BLT with TCL/TK 8.4.9 and Python 2.4

2005-05-15 Thread Kenneth Miller
Has anyone acheived this? Regards, Ken -- http://mail.python.org/mailman/listinfo/python-list

Re: Precision?

2005-05-15 Thread Ron Adam
Ron Adam wrote: > tiissa wrote: > >>Steffen Glückselig wrote: >> >> >>1.0 + 3.0 + 4.6 >>> >>>8.5996 >>> >>>Ehm, how could I get the intuitively 'correct' result of - say - 8.6? >>>;-) >> >> >>You may find annex B of the python tutorial an interesting read: >>http://docs.python.org

Re: 20050111: list basics

2005-05-15 Thread David Formosa (aka ? the Platypus)
On 12 Jan 2005 08:22:04 GMT, Abigail <[EMAIL PROTECTED]> wrote: [...] > Wrong. Perl functions don't take memory addresses. Perl doesn't allow > the programmer to do direct memory access. Perl's pack function will allow you to do direct memory access if you ask it to via the "p" and "P" templates

Re: problem uploading ZIP file tp PyPI

2005-05-15 Thread John Machin
richard wrote: > John Machin wrote: > > Sorry in advance if this is not the correct forum ... > > Quite. The support link for PyPI is in the sidebar of the site. > Tried that, when I was trying to register and getting strange error messages about the user name, like "John Machin" and "John_Machin"

Re: Range function

2005-05-15 Thread David Formosa (aka ? the Platypus)
On 15 May 2005 02:50:38 -0700, Xah Lee <[EMAIL PROTECTED]> wrote: > Here's the Perl code. Where did you learn to program? Its highly unlikely that a Perl programer would ever write a range function as there is a built in Perl function that does the same thing. If your intent is purely accedemic

Re: thread title's getting shorter...

2005-05-15 Thread James Stroud
On Sunday 15 May 2005 06:17 pm, "Rolland" "Johnny Gentile" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > . > > ? Another instance of the extremely clever low content body email, AKA the LCBE. Let us bask in the cleverness, shall we? Boy that's clever! I can't get over how

Re: [Docutils-develop] Re: Have you tried eric3 ?

2005-05-15 Thread Steve Holden
Nicola Larosa wrote: >>I've recently discovered Eric3, a development environment dedicated to >>python, >>and I'm really impressed ! Up to now I'd been using kdevelop for my projects >>involving python but I always felt unsatisfied with it. >>... >>Let me know your thoughts about this nice app !

Re: problem uploading ZIP file tp PyPI

2005-05-15 Thread richard
John Machin wrote: > Sorry in advance if this is not the correct forum ... Quite. The support link for PyPI is in the sidebar of the site. > I'm trying to upload what appears to be a perfectly OK zip file as a > "source" file type to PyPI, and am getting this response: > > Error... > There's be

Re: Is isinstance always "considered harmful"?

2005-05-15 Thread Bengt Richter
On Sun, 15 May 2005 14:31:21 -0400, "Terry Reedy" <[EMAIL PROTECTED]> wrote: > >"Jordan Rastrick" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >> I've read arguments, here and elsewhere, to the effect that in Python >> isinstance should be avoided like the plague, except in a fe

RE: The world is really unstable these days......

2005-05-15 Thread Delaney, Timothy C (Timothy)
Peter Hansen wrote: > Lucas Raab wrote: >> > [...] >> Y'know, I really do love these random word spam messages. They're >> quite entertaining to read. > > Although, when posting in reply to them it apparently helps those who > read this through the mailing list, and who have Bayesian filtering o

German spam event [was: Re: Schily ueber Deutschland]

2005-05-15 Thread François Pinard
[Paul Rubin] > I don't think that post was really from MAL. It seems to be a > sporgery attack on the newsgroup. Sigh. For the last two days, I receive quite an amount of robotic rejects, after my name was used as the forged From: for an apparently massive spam invoice written in German. At th

Re: The world is really unstable these days......

2005-05-15 Thread Peter Hansen
Lucas Raab wrote: > [...] > Y'know, I really do love these random word spam messages. They're quite > entertaining to read. Although, when posting in reply to them it apparently helps those who read this through the mailing list, and who have Bayesian filtering of spam happening, if you would

Re: Property,how to use it?

2005-05-15 Thread Peter Hansen
Delaney, Timothy C (Timothy) wrote: > [EMAIL PROTECTED] wrote: > >>What is the "property" mean in the python? Who can explain it >>for me? I don't know how to use it. > > http://www.catb.org/~esr/faqs/smart-questions.html Or he can just learn to use Google: http://www.google.com/search?q=python

Re: thread title's getting shorter...

2005-05-15 Thread \"Rolland\"
"Johnny Gentile" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > . ? -- http://mail.python.org/mailman/listinfo/python-list

Re: MacOS X drag & drop?

2005-05-15 Thread Simon Percivall
Take a look at Platypus at http://sveinbjorn.sytes.net/platypus. It will make it easier for you. -- http://mail.python.org/mailman/listinfo/python-list

PIGIP Meeting -- Python Interest Group In Princeton

2005-05-15 Thread [EMAIL PROTECTED]
PIGIP, the Python Interest Group In Princeton, NJ, USA will have a meeting Monday night at 7 (May 15) in the Lawrenceville, NJ library. No formal topic is set tonight, but we will be reviewing some bits of the standard library that are highlighted in the Python Tutorial. Anyone with an interest

Re: deleting the terminal prompt?

2005-05-15 Thread MackS
Thanks, Dennis, that solved it. Cheers Mack Dennis Lee Bieber wrote: > On 15 May 2005 16:32:57 -0700, "MackS" <[EMAIL PROTECTED]> > declaimed the following in comp.lang.python: > > > > while cmd != "": > > > > sys.stdout.write("prompt: ") > > cmd = raw_input() > > > > # at this point

Re: The world is really unstable these days......

2005-05-15 Thread Lucas Raab
> Don't change eventually while you're climbing through a light > pumpkin. If the open clouds can play wrongly, the lean elbow may > call more bedrooms. He can help believably, unless Wail teases > farmers throughout Wednesday's enigma. She wants to join good > tyrants about Allan's sign.

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
John Machin wrote: > Ron Adam wrote: > >>Does anyone have suggestions on how to improve this further? > > > Not functionally (from me, yet). However if you can bear a stylistic > comment, do read on :-) > > >> elif (isinstance(object,str) >> or isinstance(object,int) >>

RE: An example in point 2

2005-05-15 Thread Lee Cullens
    From:       [EMAIL PROTECTED]    Subject:     RE:  An example in point 2    Date:     May 15, 2005 8:35:01 PM EDT    To:       [EMAIL PROTECTED]I guess Python is just a cover for this list.  Since the holly rollers can post whatever they want, now the survivalists are chiming in also.  Yet Pyth

MacOS X drag & drop?

2005-05-15 Thread Han-Wen Nienhuys
Hi there, this might not be the right group to ask, but I'm looking for some hints on making a drag & droppable application on MacOS X. I succeeded in producing a bundle that calls a python script. When I drop a file onto the application, the python script is called with the following arguments

python-dev Summary for 2005-04-16 through 2005-04-30

2005-05-15 Thread Tony Meyer
[The HTML version of this Summary is available at http://www.python.org/dev/summary/2005-04-16_2005-04-30.html] == Summary Announcements == --- Exploding heads --- After a gentle introduction for our first summary, python-dev real

thread title's getting shorter...

2005-05-15 Thread Johnny Gentile
. -- http://mail.python.org/mailman/listinfo/python-list

Resizing VListBox on parent (wxPython)

2005-05-15 Thread Ivan Voras
I hava a hierarhical sizer layout in which there's a panel in the upper part of a window with some buttons, and another panel with wxVListBox that's meant to occupy all the remaining space in the window. Both panels are put inside a vertical BoxSizer, and the VListBox in its panel is also in Bo

RE: Property,how to use it?

2005-05-15 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > What is the "property" mean in the python? Who can explain it > for me? I don't know how to use it. http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

Re: Mandrake 10.1 and Python 2.3.4

2005-05-15 Thread John Ridley
"Joal Heagney" wrote: > Hi everyone. I've been getting this error message in python, and it's > really driving me up the wall. > > > [EMAIL PROTECTED] joal]$ python > 'import site' failed; use -v for traceback > Python 2.3.4 (#1, Apr 18 2005, 19:03:06) > [GCC 3.4.1] on linux2 > Type "help", "co

Re: Safe eval, or how to get list from string

2005-05-15 Thread Joseph Garvin
[EMAIL PROTECTED] wrote: >>http://twistedmatrix.com/users/moshez/unrepr.py >>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/364469 >> >> > >Thanks, this helps - but I was looking at using no additional modules, >or using something that came bundled in with python 2.3 > >I just discove

The world is really unstable these days......

2005-05-15 Thread TheConcernedOne
We've got a lot to deal with these days. Terrorism, Recession, Weather and more. It's all got me concerned. I thought I'd tell you all about this group I found where everyday people get together and try to learn how to deal with it all. (I used to be a member, but I'm moving to an area that does

deleting the terminal prompt?

2005-05-15 Thread MackS
Dear all, I just noticed the following behavior when I run import os import sys import readline histfile = os.path.join(os.environ["HOME"], ".pyhist") try: readline.read_history_file(histfile) except IOError: pass import atexit atexit.register(readline.write_history_file, histfile) del

Re: Quick Reference from module doc strings.

2005-05-15 Thread John Machin
Ron Adam wrote: > Does anyone have suggestions on how to improve this further? Not functionally (from me, yet). However if you can bear a stylistic comment, do read on :-) > elif (isinstance(object,str) > or isinstance(object,int) > or isinstance(object,

Importing and namespace visibility

2005-05-15 Thread jean-marc
As an application programmer, I'm not well versed in the material aspects of computing (memory, cpu, bus and all). My understanding of imports in Python is such: the __main__ program is the center piece which holds the programs reference: globals, functions, classes, modules etc. The objects of thi

RE: Is isinstance always "considered harmful"?

2005-05-15 Thread Robert Brewer
Jordan Rastrick wrote: > Subject: Is isinstance always "considered harmful"? > > Say you're writing, > in Python, the extend() method for a Linked List version of python's > builtin list. Its really important to know what kind of iterable youre > being passed in - because if its another Linked lis

Re: string.lstrip stripping too much?

2005-05-15 Thread Fredrik Lundh
"joram gemma" wrote: > on windows python 2.4.1 I have the following problem > > >>> s = 'D:\\music\\D\\Daniel Lanois\\For the beauty of Wynona' > >>> print s > D:\music\D\Daniel Lanois\For the beauty of Wynona > >>> t = 'D:\\music\\D\\' > >>> print t > D:\music\D\ > >>> s.lstrip(t) > 'aniel Lanois

Re: Precision?

2005-05-15 Thread Peter Dembinski
"Steffen Glückselig" <[EMAIL PROTECTED]> writes: > Hello, > > I've just wanted to check Python's abilities as a calculator and this > is what came out: > 1.0 + 3.0 + 4.6 > 8.5996 > > Ehm, how could I get the intuitively 'correct' result of - say - 8.6? > ;-) This is as correct as

Re: Precision?

2005-05-15 Thread Jeff Epler
If you want to do decimal arithmetic, use the decimal module which is new in Python 2.4. Python 2.4 (#1, Jan 22 2005, 20:45:18) [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from decimal import Decimal as D >>> D(

Re: Mandrake 10.1 and Python 2.3.4

2005-05-15 Thread Steve Horsley
[EMAIL PROTECTED] wrote: > Hi Joal, > I can only tell you that in my Linux Mandrake 10.1 (Community Edition), > all is ok: > Python 2.3.4 (#2, Aug 19 2004, 15:49:40) > [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >

Re: Schily ueber Deutschland

2005-05-15 Thread Paul Rubin
Bernd Nawothnig <[EMAIL PROTECTED]> writes: > On 2005-05-15, [EMAIL PROTECTED] [allegedly] wrote: ... I don't think that post was really from MAL. It seems to be a sporgery attack on the newsgroup. Sigh. -- http://mail.python.org/mailman/listinfo/python-list

Re: Precision?

2005-05-15 Thread Terry Reedy
"Steffen Glückselig" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] 1.0 + 3.0 + 4.6 > 8.5996 > > Ehm, how could I get the intuitively 'correct' result of - say - 8.6? >>> str(1.0+4.6+3.0) '8.6' See Lib Ref 2, Builtin functs, repr() and str(), Lan Ref (or tutorial)

Re: A new to Python question

2005-05-15 Thread Bernd Nawothnig
On 2005-05-15, M.E.Farmer wrote: >> No. You claimed > > This will only create a tuple in memory > > That is not what I said please do not edit my words and call it a > quote! Again the whole sentence: Message-ID: <[EMAIL PROTECTED]> | This will only create a tuple in memory that has no name t

Sober-Q

2005-05-15 Thread Kay Schluehr
Paul Rubin wrote: > Bernd Nawothnig <[EMAIL PROTECTED]> writes: > > On 2005-05-15, [EMAIL PROTECTED] [allegedly] wrote: ... > > I don't think that post was really from MAL. It seems to be a sporgery > attack on the newsgroup. Sigh. The spam mails stem from a Sober variant, which sends Nazi prop

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
I think this deserves a little more of a description than I gave it initially. The routine in the previous message does a little more than just print out __doc__ strings. It outputs a formatted alphabetical list of objects in a module with each objects, name, class or type, and then tries to

[no subject]

2005-05-15 Thread gerald hereford
__ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

wxPython and a Control Property Editor

2005-05-15 Thread [EMAIL PROTECTED]
Hi, I'm building a modest GUI editor for myself using wxPython, and I need some help. I want to create a nice 'Control Property Editing Window', just like VisualBasic, Delphi, Visual C++, etc. After searching for a while, I found an interesting extension for wx that does exactly this (and very ni

Re: Newbie : checking semantics

2005-05-15 Thread beliavsky
[EMAIL PROTECTED] wrote: > 2. Trust me (and other Python programmers most likely would agree) this > type of error happens much more seldom then newbies (especially coming > from strongly typed languages) imagine while adjusting to the language. > > 3. Python advantages "overpower" drawbacks 10

Re: Is isinstance always "considered harmful"?

2005-05-15 Thread Leif K-Brooks
Jordan Rastrick wrote: > Say you're writing, in Python, the extend() method for a Linked List > version of python's builtin list. Its really important to know what > kind of iterable youre being passed in - because if its another > Linked list, and you know it, you can connect the two in 0(1) time;

Re: Precision?

2005-05-15 Thread Ron Adam
tiissa wrote: > Steffen Glückselig wrote: > >1.0 + 3.0 + 4.6 >> >>8.5996 >> >>Ehm, how could I get the intuitively 'correct' result of - say - 8.6? >>;-) > > > You may find annex B of the python tutorial an interesting read: > http://docs.python.org/tut/node16.html In addition t

Re: string.lstrip stripping too much?

2005-05-15 Thread Terry Reedy
> why does lstrip strip the D of Daniel Lanois also? Because it does just what the Lib Ref doc on str.lstrip says that it does. >>>help(str.lstrip) # should also explain Terry J. Reedy -- http://mail.python.org/mailman/listinfo/python-list

Re: Mandrake 10.1 and Python 2.3.4

2005-05-15 Thread Terry Reedy
"Joal Heagney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 'import site' failed; traceback: > Traceback (most recent call last): > File "/usr/lib/python2.3/site.py", line 169, in ? > sys.lib, > AttributeError: 'module' object has no attribute 'lib' Right: the sys module u

Re: string.lstrip stripping too much?

2005-05-15 Thread Bengt Richter
On Sun, 15 May 2005 15:24:25 +0200, "joram gemma" <[EMAIL PROTECTED]> wrote: >Hello, > >on windows python 2.4.1 I have the following problem > s = 'D:\\music\\D\\Daniel Lanois\\For the beauty of Wynona' print s >D:\music\D\Daniel Lanois\For the beauty of Wynona t = 'D:\\music\\D\\'

Re: Is isinstance always "considered harmful"?

2005-05-15 Thread Terry Reedy
"Jordan Rastrick" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I've read arguments, here and elsewhere, to the effect that in Python > isinstance should be avoided like the plague, except in a few very > specific and narrow circumstances. Putting it like this is rather extreme.

Re: Schily ueber Deutschland

2005-05-15 Thread Bernd Nawothnig
On 2005-05-15, [EMAIL PROTECTED] wrote: > Lese selbst: > http://www.heise.de/newsticker/meldung/59427 Ja, schlimm. Trotzdem ist das hier a) eine englischsprachige NG und b) geht es hier um die Programmiersprache Python Lass es also bitte endlich! Bernd -- Those who desire to give up freed

Re: Range function

2005-05-15 Thread Peter Hansen
Xah Lee wrote: > the previous posted solutions are badly botched. > def Range(iMin, iMax=None, iStep=None): [snip hideous code] > # Thanks to Peter Hansen for a correction. Ohmigod, he's only made it worse and he's blaming me for it. Shows what I get for replying to a cross-posted troll messag

Re: string.lstrip stripping too much?

2005-05-15 Thread Roy Smith
"joram gemma" <[EMAIL PROTECTED]> wrote: > Hello, > > on windows python 2.4.1 I have the following problem > > >>> s = 'D:\\music\\D\\Daniel Lanois\\For the beauty of Wynona' > >>> print s > D:\music\D\Daniel Lanois\For the beauty of Wynona > >>> t = 'D:\\music\\D\\' > >>> print t > D:\music\D\

Re: A new to Python question

2005-05-15 Thread M.E.Farmer
It looks like the docs could use some examples of the various assignments it refers to. I think something like Bengt posted would be a nice addition if it included assignments with slices and dicts too. Just a thought. M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: A new to Python question

2005-05-15 Thread M.E.Farmer
Fredrik and Bengt: Thank you for the time. I will study the docs and play with the shell till this is firm. M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list

Re: A new to Python question

2005-05-15 Thread M.E.Farmer
>No. You claimed This will only create a tuple in memory That is not what I said please do not edit my words and call it a quote! >But we just learned that this is not the case. Yes it seems I was proven wrong and have learned much from the discussion ;) That is why I am here to learn from othe

Calling C/C++ not contained inside a .dll

2005-05-15 Thread delrocco
Hello, I really appreciate anyone who has time to read this and help, Thanks up front. I'm very new to python, having picked it up for the first time a week ago, but I feel I'm very close to getting this working. Here's what I'm trying to do: - call python scripts from game code - have those ca

Re: Range function

2005-05-15 Thread Xah Lee
the previous posted solutions are badly botched. Here's a better solution. Any further correction will appear on the website instead. (http://xahlee.org/tree/tree.html) Similar change needs to be made for the Perl code... Java code will come tomorror. By the way, the code from me are not expecte

Re: incorrect(?) shlex behaviour

2005-05-15 Thread M.E.Farmer
bill wrote: > Its gets worse: > >>> from shlex import StringIO > >>> from shlex import shlex > >>> t = shlex(StringIO("2>&1")) > >>> while True: > ... b = t.read_token() > ... if not b: break > ... print b > ... > 2 > & > 1<--- where's the '>' !? > >>> import shlex >

Re: mod_python and logging

2005-05-15 Thread qwweeeit
Hi Daniel, look at the thread I started ("Modifying a built-in function for logging purposes"). http://groups.google.it/group/comp.lang.python/messages/56e905ff27462d91,8f431d9da6140849,95368b6d5db3237d,f1aa51de9139a751,79d9ad3b78f1b875,a7a68e017f064eca,1c203ffc19cdeaac,3e31db7958bffbf1,0889cc903a6

Re: Does anybody know the status of PyCon recordings?

2005-05-15 Thread Facundo Batista
On 9 May 2005 11:02:27 -0700, Sébastien Boisgérault <[EMAIL PROTECTED]> wrote: > http://www.pycon.org/talks/ ¿?: """ Site Error An error was encountered while publishing this resource. Debugging Notice Zope has encountered a problem publishing your object. The object at http://www.pycon.org/t

Re: Unique Elements in a List

2005-05-15 Thread Facundo Batista
On 5/9/05, James Stroud <[EMAIL PROTECTED]> wrote: > > Is there an easy way to grab the Unique elements from a list? >>> from sets import Set as set >>> data = [0.1,0.5,0.6,0.4,0.1,0.5,0.6,0.9] >>> for x in set(data): ... print x ... 0.5 0.9 0.6 0.4 0.1 .Facundo Blog: http://www.taniqu

Re: Mandrake 10.1 and Python 2.3.4

2005-05-15 Thread qwweeeit
Hi Joal, I can only tell you that in my Linux Mandrake 10.1 (Community Edition), all is ok: Python 2.3.4 (#2, Aug 19 2004, 15:49:40) [GCC 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import site >>> dir (site) ['_Helpe

Error when calling the metaclass bases function() argument 1 must be code, not str

2005-05-15 Thread sector119
I use python 2.4.1 and PIL 1.1.5 and when I execute my program I got error: ./code.py Traceback (most recent call last): File "./code.py", line 7, in ? class DrawPlus(ImageDraw.Draw): TypeError: Error when calling the metaclass bases function() argument 1 must be code, not str Why I go

Re: Faster GUI text control

2005-05-15 Thread none
Fredrik Lundh wrote: > "none <"@bag.python.org> wrote: > > >>>no, it would mean writing some python code. if all you need is a scrolling >>>text list, you can simply use the code on this page: >>> >>>http://effbot.org/zone/wck-4.htm >>> >>>(see "A scrollable list view, with scrollbar support

Re: Exception question

2005-05-15 Thread Ron Adam
Steven Bethard wrote: > Ron Adam wrote: > >>Do exceptions that take place get stored in a stack or list someplace? > > [snip] > >>I know I can catch the error and store it myself with, >> >>except Exception, exc: >> >>or possibly, >> >>errlist = [] >>errlist.append(sys.exc_info()) >>

Re: incorrect(?) shlex behaviour

2005-05-15 Thread bill
Its gets worse: >>> from shlex import StringIO >>> from shlex import shlex >>> t = shlex(StringIO("2>&1")) >>> while True: ... b = t.read_token() ... if not b: break ... print b ... 2 & 1<--- where's the '>' !? >>> import shlex >>> print shlex.split("2>&1") ['2>&1']

Re: Precision?

2005-05-15 Thread Steven Bethard
tiissa wrote: > Steffen Glückselig wrote: > > 1.0 + 3.0 + 4.6 >> 8.5996 >> >> Ehm, how could I get the intuitively 'correct' result of - say - 8.6? >> ;-) > > You may find annex B of the python tutorial an interesting read: > http://docs.python.org/tut/node16.html Yes, the simple

X2Y 1.1.7 Document Processor Released!

2005-05-15 Thread Chris Withers
X2Y is a flexible, configurable and extendable server-based document processing framework written in python. It has the following feaures: - Cross platform - Fully documented - Run as either a cron job, scheduled task or by hand - Fully configurable logging and notification - Fully configura

Re: A new to Python question

2005-05-15 Thread Steven Bethard
Fredrik Lundh wrote: > which is one of the things you really love when you link against > underdocumented Fortran programs from C. ("is that parameter > a scalar or an array? crash! oh, an array. how many values does > it expect? crash! oh, a few more, I suppose"). +1 QOTW STeVe -- http://mail.

Re: Precision?

2005-05-15 Thread tiissa
Steffen Glückselig wrote: 1.0 + 3.0 + 4.6 > > 8.5996 > > Ehm, how could I get the intuitively 'correct' result of - say - 8.6? > ;-) You may find annex B of the python tutorial an interesting read: http://docs.python.org/tut/node16.html -- http://mail.python.org/mailman/listinfo

Precision?

2005-05-15 Thread Steffen Glückselig
Hello, I've just wanted to check Python's abilities as a calculator and this is what came out: >>> 1.0 + 3.0 + 4.6 8.5996 Ehm, how could I get the intuitively 'correct' result of - say - 8.6? ;-) best regards Steffen -- http://mail.python.org/mailman/listinfo/python-list

RE: Turkish Tabloid Enrages Germany with Nazi Comparisons

2005-05-15 Thread EBU.Database. IB.Interclient
Thank you for e-mailing [EMAIL PROTECTED] This is an auto generated message, please do not respond to this mail. Most questions regarding InterClient can be resolved by first visiting http://support.borland.com/. From this site you can create a free presales or installation case, find out how to

Re: Range function

2005-05-15 Thread Peter Hansen
Xah Lee wrote: > Here's the Python solution. > # implementation note: When iStep is a decimal, rounding error > # accumulates. For example, the last item returned from > # Range(0,18,0.3) is 17.7 not 18. A remedy is to turn iStep into a > # fraction and do exact arithmetics, and possibly convert th

string.lstrip stripping too much?

2005-05-15 Thread joram gemma
Hello, on windows python 2.4.1 I have the following problem >>> s = 'D:\\music\\D\\Daniel Lanois\\For the beauty of Wynona' >>> print s D:\music\D\Daniel Lanois\For the beauty of Wynona >>> t = 'D:\\music\\D\\' >>> print t D:\music\D\ >>> s.lstrip(t) 'aniel Lanois\\For the beauty of Wynona' >>>

Re: Jesus said, "I am the way, the truth and the life: no one can come to the Father(God)(in Heaven), but by me." (John 14:6) This means that if you die without trusting in Jesus Christ as your Lord and Saviour you will die in your sins and be forever sepa

2005-05-15 Thread Mike brown
In article <[EMAIL PROTECTED]>, "Bubba" <[EMAIL PROTECTED]> wrote: > I'm so glad you've decided what everyone believes > Some of us don't. Believe that is. In anything in particular. MJRB -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the best way to determine system OS?

2005-05-15 Thread googleboy
I did somethign that really seems far brighter... approaching it from a slightly different angle I just search through each line for the right field title, and then take that field's value from teh last line of output. Doesn't matter what OS, doesn't matter what format now. It can cope with it

Schily ueber Deutschland

2005-05-15 Thread mal
Lese selbst: http://www.heise.de/newsticker/meldung/59427 -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >