vadm 0.6.0 / non-intrusive versioning of files and properties

2009-08-27 Thread holger krekel
Hi all, i just uploaded vadm-0.6.0 to PyPI: a svn-like command line tool for non-intrusively versioning posix files and ownership information. Visit http://codespeak.net/vadm for install, getting-started, issue tracker, etc. have fun, holger --

ANN: ActivePython 3.1.1.2 is now available

2009-08-27 Thread Sridhar Ratnakumar
I'm happy to announce that ActivePython 3.1.1.2 is now available for download from: http://www.activestate.com/activepython/python3/ This is a patch release that updates ActivePython to core Python 3.1.1 We recommend that you try 2.6 version first. See the release notes for full details:

web2py 1.66.2 is OUT. New web2py book (2nd Ed.) is out too.

2009-08-27 Thread Massimo Di Pierro
The new web2py book is available on lulu.com http://www.lulu.com/content/e-book/web2py/4968879 Lots of new stuff with100 more pages (341 pages in total). Covers Auth, Crud, Services, interaction with Pyjamas, PyAMF, and better deployment recipes. Massimo --

pylib/py.test 1.0.2 released

2009-08-27 Thread holger krekel
Hi all, i just pushed a pylib/py.test 1.0.2 maintenance release, fixing several issues triggered by fedora packaging. Also added a link to the new pytest_django plugin, a changelog and some other improvements. checkout http://pylib.org and as always do easy_install -U py which should also

Re: codecs.open on Win32 -- converting my newlines to CR+LF

2009-08-27 Thread Chris Rebert
On Wed, Aug 26, 2009 at 11:06 PM, Chris Rebertc...@rebertia.com wrote: On Wed, Aug 26, 2009 at 8:40 PM, Ryan McGuireuse...@enigmacurry.com wrote: On Aug 26, 11:04 pm, Philip Semanchuk phi...@semanchuk.com wrote: Try using rb instead of r for the mode in the call to open(). HTH Philip That

Re: codecs.open on Win32 -- converting my newlines to CR+LF

2009-08-27 Thread Chris Rebert
On Wed, Aug 26, 2009 at 8:40 PM, Ryan McGuireuse...@enigmacurry.com wrote: On Aug 26, 11:04 pm, Philip Semanchuk phi...@semanchuk.com wrote: Try using rb instead of r for the mode in the call to open(). HTH Philip That does indeed fix the problem, thanks! Still seems like the docs are

Re: Need help with Python scoping rules

2009-08-27 Thread Hendrik van Rooyen
On Wednesday 26 August 2009 17:14:27 kj wrote: As I described at length in another reply, the function in question is not intended to be callable outside the class. And yes, I think this might go to nub of your problem - It might help you to think as follows: A Python class, even after it

Re: Overriding iadd for dictionary like objects

2009-08-27 Thread RunThePun
On Aug 27, 6:58 am, Robert Kern robert.k...@gmail.com wrote: On 2009-08-26 20:00 PM, Jan Kaliszewski wrote: 27-08-2009 o 00:48:33 Robert Kern robert.k...@gmail.com wrote: On 2009-08-26 17:16 PM, RunThePun wrote: I'd like to build a database wrapper using DictMixin and allow items to

Re: Q: multiprocessing.Queue size limitations or bug...

2009-08-27 Thread ryles
On Aug 26, 4:56 am, Michael Riedel mrie...@inova-semiconductors.de wrote: Sorry for being not more specific but I'm not absolutely certain whether I encountered a bug or did anything wrong: The (stupid) code below results in a stall forever or not at 'p0.join()' depending on the value of

Re: Need help with Python scoping rules

2009-08-27 Thread Hendrik van Rooyen
On Wednesday 26 August 2009 17:45:54 kj wrote: In 02a54597$0$20629$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: Why are you defining a method without a self parameter? Because, as I've explained elsewhere, it is not a method: it's a helper function,

RE: Move dictionary from instance to class level

2009-08-27 Thread Frank Millman
Dave Angel wrote: Any time I see multiple lists like that which have to stay in synch, I think code-smell. I don't think it is that bad, but I agree there is always room for improvement. Why not let the EVT's be passed as strings, and avoid the whole mapping to integers and mapping

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
kj a écrit : In jeqdncamuyvtrwjxnz2dnuvz8ludn...@bt.com Martin P. Hellwig martin.hell...@dcuktec.org writes: kj wrote: cut First, one of the goals of OO is encapsulation, not only at the level of instances, but also at the level of classes. Who says? Python itself: it already offers a

RE: Move dictionary from instance to class level

2009-08-27 Thread Frank Millman
Dave Angel wrote: Show me a sample client event handler, and maybe I can suggest how to encode it. For example in wxPython, events are encoded with an event object. You could have the event send the object's type-string as an event ID. No lookup at all. And in fact, one event

Parse xml file

2009-08-27 Thread loial
Is there a quick way to retrieve data from an xml file in python 2.4, rather than read the whole file? -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Dave Angel
Frank Millman wrote: Hi all I mentioned yesterday that I had a problem sending a message to the newsgroup via the Outlook Express news reader. Today I received an email from DaveA, which was sent to me via python-l...@python.org. I tried simply replying to the email, to see if it behaved

Re: Need help with Python scoping rules

2009-08-27 Thread Steven D'Aprano
On Thu, 27 Aug 2009 08:38:29 +0200, Hendrik van Rooyen wrote: On Wednesday 26 August 2009 17:14:27 kj wrote: As I described at length in another reply, the function in question is not intended to be callable outside the class. And yes, I think this might go to nub of your problem - It

Re: Parse xml file

2009-08-27 Thread Balamurugan S
On Thu, Aug 27, 2009 at 2:26 PM, loialjldunn2...@googlemail.com wrote: Is there a quick way to retrieve data from an xml file in python 2.4, rather than read the whole file? Universal Feed parser can do the job for you. This can be imported and used in your python programs. For more

Re: Move dictionary from instance to class level

2009-08-27 Thread Dave Angel
Frank Millman wrote: Dave Angel wrote: Show me a sample client event handler, and maybe I can suggest how to encode it. For example in wxPython, events are encoded with an event object. You could have the event send the object's type-string as an event ID. No lookup at all. And in

Re: Need help with Python scoping rules

2009-08-27 Thread Steven D'Aprano
On Thu, 27 Aug 2009 09:09:21 +0200, Hendrik van Rooyen wrote: On Wednesday 26 August 2009 17:45:54 kj wrote: In 02a54597$0$20629$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: Why are you defining a method without a self parameter? Because, as I've

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Terry Reedy
Dave Angel wrote: Frank Millman wrote: I use Thunderbird, and treat the list as ordinary mail. I use reply-all, and it seems to do the right thing. Or at least if I'm breaking threads, nobody has pointed it out to me yet. reply-all may send duplicate messages to the author. Not sure of

RE: Move dictionary from instance to class level

2009-08-27 Thread Frank Millman
Dave Angel wrote: Frank Millman wrote: That is definitely *not* what I want to do. I want to make the server as generic as possible, so that it can handle any type of client, hopefully even including a browser eventually. Therefore the server has no knowledge of wxPython event

About diagram and python

2009-08-27 Thread catalinf...@gmail.com
Hello! I see on my Diagram Editor software this : File - Export... - (on Export option is : PyDia Code Generation ... .py) What python is in this file ? How help me with python code ? Thank you ! -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Xavier Ho
On Thu, Aug 27, 2009 at 7:04 PM, Dave Angel da...@ieee.org wrote: I'm not sure how the list-server decides what thread a particular message belongs to. It's more than just the subject line, since when people change the subject, it stays in the same thread. I'm just using gmail because it

Re: About diagram and python

2009-08-27 Thread Steven D'Aprano
On Thu, 27 Aug 2009 03:20:31 -0700, catalinf...@gmail.com wrote: Hello! I see on my Diagram Editor software this : File - Export... - (on Export option is : PyDia Code Generation ... .py) What python is in this file ? Why don't you look for yourself? Just open the file in a text editor and

Re: Need help with Python scoping rules

2009-08-27 Thread greg
kj wrote: No, the fact() function here represents an internal helper function. It is meant to be called only once to help initialize a class variable that would be inconvenient to initialize otherwise; this helper function is not meant to be called from outside the class statement. That, to

Re: pygtk - What is the best way to change the mouse pointer

2009-08-27 Thread Ido Levy
From: MRAB pyt...@mrabarnett.plus.com To: python-list@python.org Date: 26/08/2009 11:04 PM Subject: Re: pygtk - What is the best way to change the mouse pointer Ido Levy wrote: Hello All, I am writing a dialog which one of its widget is a gtk.ComboBoxEntry (

Re: Python on the Web

2009-08-27 Thread Graham Dumpleton
On Aug 27, 1:02 pm, Phil phil...@gmail.com wrote: Thanks a lot for another response. I've never posted in groups like this before but the results are amazing. I will definitely consider trying mod_wsgi when I get a chance. I like the approach taken with it. It is unfortunate that I completely

Re: Need help with Python scoping rules

2009-08-27 Thread Jean-Michel Pichavant
Ulrich Eckhardt wrote: Ulrich Eckhardt wrote: Jean-Michel Pichavant wrote: class Color: def __init__(self, r, g,b): pass BLACK = Color(0,0,0) It make sens from a design point of view to put BLACK in the Color namespace. But I don't think it's possible with python.

Re: Need help with Python scoping rules

2009-08-27 Thread Jean-Michel Pichavant
kj wrote: I think I understand the answers well enough. What I *really* don't understand is why this particular feature of Python (i.e. that functions defined within a class statement are forbidden from seeing other identifiers defined within the class statement) is generally considered to be

Re: List iterator thread safety

2009-08-27 Thread Emanuele D'Arrigo
On Aug 27, 2:01 am, a...@pythoncraft.com (Aahz) wrote: Well, I'm not sure about exceptions, but you almost certainly won't get the results you want. What I'd like in this context is to iterate through the items in the list without processing the same item twice and without skipping item that

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In mailman.509.1251373513.2854.python-l...@python.org Jean-Michel Pichavant jeanmic...@sequans.com writes: kj wrote: I think I understand the answers well enough. What I *really* don't understand is why this particular feature of Python (i.e. that functions defined within a class statement

Learning Python advanced features

2009-08-27 Thread jvpic
Hi, Learning Python, I understand the mechanism of : closure, __new__, descriptors, decorators and __metaclass__, but I interrogate myself on the interest of those technics ? May somebody explain me the interest ? Many thanks ! Jackes Bihan --

Re: Need help with Python scoping rules

2009-08-27 Thread Steven D'Aprano
On Thu, 27 Aug 2009 13:45:00 +0200, Jean-Michel Pichavant wrote: in foo.py: a = 5 b = a # works fine class A: c = 5 d = c # broken Incorrect. That works fine. class A: ... c = 5 ... d = c # not actually broken ... A.c 5 A.d 5 The class is a scope, and inside the

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In mailman.509.1251373513.2854.python-l...@python.org Jean-Michel Pichavant jeanmic...@sequans.com writes: in foo.py: a = 5 b = a # works fine def foo(self): e = 5 f = e #works fine It may be solved by creating the class upon the class statement. If the class A object

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In 02a6427a$0$15633$c3e8...@news.astraweb.com Steven D'Aprano st...@remove-this-cybersource.com.au writes: On Thu, 27 Aug 2009 09:09:21 +0200, Hendrik van Rooyen wrote: On Wednesday 26 August 2009 17:45:54 kj wrote: In 02a54597$0$20629$c3e8...@news.astraweb.com Steven D'Aprano

Re: ubuntu dist-packages

2009-08-27 Thread Robin Becker
Florian Diesch wrote: . From /usr/lib/python2.6/site.py: , | For Debian and derivatives, this sys.path is augmented with directories | for packages distributed within the distribution. Local addons go | into /usr/local/lib/pythonversion/dist-packages, Debian addons | install into

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
Jean-Michel Pichavant a écrit : kj wrote: I think I understand the answers well enough. What I *really* don't understand is why this particular feature of Python (i.e. that functions defined within a class statement are forbidden from seeing other identifiers defined within the class

Re: Learning Python advanced features

2009-08-27 Thread Bruno Desthuilliers
jvpic a écrit : Hi, Learning Python, I understand the mechanism of : closure, __new__, descriptors, decorators and __metaclass__, but I interrogate myself on the interest of those technics ? May somebody explain me the interest ? Didn't like my answers on f.c.l.py ?-) --

Re: Python for professsional Windows GUI apps?

2009-08-27 Thread Neuruss
On 26 ago, 05:29, erikj tw55...@gmail.com wrote: Hi, You could have a look at Camelot, to see if it fits your needs :http://www.conceptive.be/projects/camelot/ it was developed with cross platform business apps in mind.  when developing Camelot, we tried to build it using wxWidgets first

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread David House
2009/8/27 Terry Reedy tjre...@udel.edu: reply-all may send duplicate messages to the author. Not sure of this list. I'm fairly sure Mailman deals with that. -- -David -- http://mail.python.org/mailman/listinfo/python-list

Re: List iterator thread safety

2009-08-27 Thread Peter Otten
Emanuele D'Arrigo wrote: On Aug 27, 2:01 am, a...@pythoncraft.com (Aahz) wrote: Well, I'm not sure about exceptions, but you almost certainly won't get the results you want. What I'd like in this context is to iterate through the items in the list without processing the same item twice and

Re: Need help with Python scoping rules

2009-08-27 Thread D'Arcy J.M. Cain
On Thu, 27 Aug 2009 09:10:46 +0100 Stephen Fairchild someb...@somewhere.com wrote: So why didn't you delete it after you were done with it? Class Demo(object): That should be class. _classvar = fact(5) del fact() I suppose you mean del fact. -- D'Arcy J.M. Cain da...@druid.net

Re: List iterator thread safety

2009-08-27 Thread Xavier Ho
On Tue, Aug 25, 2009 at 3:43 AM, Emanuele D'Arrigo man...@gmail.com wrote: Let's say I have a list accessed by two threads, one removing list items via del myList[index] statement the other iterating through the list and printing out the items via for item in myList: statement. I tried

Does Class implements Interface?

2009-08-27 Thread Emanuele D'Arrigo
Greetings everybody, let's say I have a Class C and I'd like to verify if it implements Interface I. If I is available to me as a class object I can use issubclass(C, I) and I can at least verify that I is a superclass of C. There are a couple of issues with this approach however: 1) C might

Re: Python on the Web

2009-08-27 Thread Bruno Desthuilliers
Phil a écrit : (snip) However, 99.9% of the discussion I see with Python on the web is around FCGI. May I suggest you spend some time reading django-users and django-dev on google groups ? (and that's only *one* of the way-too-many Python web frameworks). --

Re: Need help with Python scoping rules

2009-08-27 Thread Hendrik van Rooyen
On Thursday 27 August 2009 11:14:41 Steven D'Aprano wrote: On Thu, 27 Aug 2009 08:38:29 +0200, Hendrik van Rooyen wrote: On Wednesday 26 August 2009 17:14:27 kj wrote: As I described at length in another reply, the function in question is not intended to be callable outside the class. And

Re: Does Class implements Interface?

2009-08-27 Thread Benjamin Kaplan
On Thu, Aug 27, 2009 at 9:16 AM, Emanuele D'Arrigo man...@gmail.com wrote: Greetings everybody, let's say I have a Class C and I'd like to verify if it implements Interface I. If I is available to me as a class object I can use issubclass(C, I) and I can at least verify that I is a

Re: List iterator thread safety

2009-08-27 Thread Carl Banks
On Aug 27, 5:03 am, Emanuele D'Arrigo man...@gmail.com wrote: On Aug 27, 2:01 am, a...@pythoncraft.com (Aahz) wrote: Well, I'm not sure about exceptions, but you almost certainly won't get the results you want. What I'd like in this context is to iterate through the items in the list

Re: ubuntu dist-packages

2009-08-27 Thread Diez B. Roggisch
Paul Boddie wrote: On 26 Aug, 17:48, Jorgen Grahn grahn+n...@snipabacken.se wrote: Well, if you are thinking about Debian Linux, it's not as much ripping out as splitting into a separate package with a non-obvious name. Annoying at times, but hardly an atrocity. Indeed. Having seen two

Re: Move dictionary from instance to class level

2009-08-27 Thread Anthony Tolle
To take things one step further, I would recommend using decorators to allow symbolic association of functions with the message identifiers, as follows: == (MESSAGE_ONE ,MESSAGE_TWO ,MESSAGE_THREE ) = xrange(3) class MyClass(object): method_dict = {}

Re: Need help with Python scoping rules

2009-08-27 Thread Hendrik van Rooyen
On Thursday 27 August 2009 11:31:41 Steven D'Aprano wrote: What you are calculating might actually be quite complicated to enter as a literal. You might have something like: 8 -- Complicated Table Example --- Me? - never! I am just an assembler

Re: Q: multiprocessing.Queue size limitations or bug...

2009-08-27 Thread Michael
On Aug 27, 8:56 am, ryles ryle...@gmail.com wrote: On Aug 26, 4:56 am, Michael Riedel mrie...@inova-semiconductors.de wrote: Sorry for being not more specific but I'm not absolutely certain whether I encountered a bug or did anything wrong: The (stupid) code below results in a stall

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In 4a967b2f$0$19301$426a7...@news.free.fr Bruno Desthuilliers bruno.42.desthuilli...@websiteburo.invalid writes: The only thing one is entitled to expect when learning a new language is that the language's implementation follows the language specs. In fact, the official docs, when they discuss

Re: Object's nesting scope

2009-08-27 Thread zaur
On 26 авг, 23:56, MRAB pyt...@mrabarnett.plus.com wrote: zaur wrote: On 26 авг, 21:11, Rami Chowdhury rami.chowdh...@gmail.com wrote: person = Person():   name = john   age = 30   address = Address():      street = Green Street      no = 12 Can you clarify what you mean? Would

Re: ubuntu dist-packages

2009-08-27 Thread Paul Boddie
On 27 Aug, 15:27, Diez B. Roggisch de...@nospam.web.de wrote: You mean it's the problem of the python packaging that it can't deal with RPMs, debs, tgzs, OSX bundles, MSIs and put-in-the-next-big-packaging-thing-here? No, it's the problem of the Pythonic packaging brigade that package

Re: List iterator thread safety

2009-08-27 Thread Hendrik van Rooyen
On Thursday 27 August 2009 15:26:04 Carl Banks wrote: Deleting items from a list while iterating over it is a bad idea, exceptions or not. Hmm, this sounds like something someone might do for a game. You have a list of objects, and in a given time step you have to iterate through the list

Re: Object's nesting scope

2009-08-27 Thread Carl Banks
On Aug 26, 5:51 am, zaur szp...@gmail.com wrote: Hi folk! What do you think about idea of object's nesting scope in python? Let's imaging this feature, for example, in this syntax: obj=expression:      body or expression:    body That's means that result object of expression

Re: Parse xml file

2009-08-27 Thread Stefan Behnel
loial wrote: Is there a quick way to retrieve data from an xml file in python 2.4, rather than read the whole file? ElementTree is available as an external package for Py2.4 (and it's in the stdlib xml.etree package since 2.5). It's pretty much the easiest way to get data out of XML files. If

Re: List iterator thread safety

2009-08-27 Thread Carl Banks
On Aug 27, 7:25 am, Hendrik van Rooyen hend...@microcorp.co.za wrote: On Thursday 27 August 2009 15:26:04 Carl Banks wrote: Deleting items from a list while iterating over it is a bad idea, exceptions or not. Hmm, this sounds like something someone might do for a game.  You have a list

Re: Need help with Python scoping rules

2009-08-27 Thread Jan Kaliszewski
14:17:15 Steven D'Aprano st...@remove-this-cybersource.com.au wrote: The class is a scope, and inside the class scope, you can access local names. What you can't do is access the class scope from inside nested functions. s/from inside nested functions/from inside nested scopes Besides that

Re: Object's nesting scope

2009-08-27 Thread zaur
On 27 авг, 18:34, Carl Banks pavlovevide...@gmail.com wrote: On Aug 26, 5:51 am, zaur szp...@gmail.com wrote: Hi folk! What do you think about idea of object's nesting scope in python? Let's imaging this feature, for example, in this syntax: obj=expression:      body or

Re: Object's nesting scope

2009-08-27 Thread Carl Banks
On Aug 27, 8:01 am, zaur szp...@gmail.com wrote: On 27 авг, 18:34, Carl Banks pavlovevide...@gmail.com wrote: The idea has been discussed in various forms here quite a bit over the years.  I doubt there's any chance it'll be accepted into Python, because it goes against one of the main

Re: Move dictionary from instance to class level

2009-08-27 Thread Dave Angel
Frank Millman wrote: Dave Angel wrote: Frank Millman wrote: That is definitely *not* what I want to do. I want to make the server as generic as possible, so that it can handle any type of client, hopefully even including a browser eventually. Therefore the

Re: Object's nesting scope

2009-08-27 Thread zaur
On 27 авг, 19:19, Carl Banks pavlovevide...@gmail.com wrote: On Aug 27, 8:01 am, zaur szp...@gmail.com wrote: On 27 авг, 18:34, Carl Banks pavlovevide...@gmail.com wrote: The idea has been discussed in various forms here quite a bit over the years.  I doubt there's any chance it'll be

Re: ubuntu dist-packages

2009-08-27 Thread David Cournapeau
On Thu, Aug 27, 2009 at 8:27 AM, Diez B. Roggischde...@nospam.web.de wrote: Paul Boddie wrote: On 26 Aug, 17:48, Jorgen Grahn grahn+n...@snipabacken.se wrote: Well, if you are thinking about Debian Linux, it's not as much ripping out as splitting into a separate package with a non-obvious

Re: ubuntu dist-packages

2009-08-27 Thread Florian Diesch
Robin Becker ro...@reportlab.com writes: Florian Diesch wrote: . From /usr/lib/python2.6/site.py: , | For Debian and derivatives, this sys.path is augmented with directories | for packages distributed within the distribution. Local addons go | into

Re: Python on the Web

2009-08-27 Thread Phil
Thanks Graham. I actually ended up reading that blog post from a Google search last night before I saw your response. It was very informative. Bruno, I will take a look at those groups to expand my knowledge. When I gave that arbitrary percentage, I was basing it off of the information I had seen

Re: Overriding iadd for dictionary like objects

2009-08-27 Thread Robert Kern
On 2009-08-27 01:49 AM, RunThePun wrote: Anybody have any more ideas? I think python should/could havev a syntax for overriding this behaviour, i mean, obviously the complexity of supporting all operators with the getitem syntax could introduce alot of clutter. But maybe there's an elegant

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Robert Kern
On 2009-08-27 07:41 AM, David House wrote: 2009/8/27 Terry Reedytjre...@udel.edu: reply-all may send duplicate messages to the author. Not sure of this list. I'm fairly sure Mailman deals with that. Many of us read from comp.lang.python for gmane.comp.python.general. I do not appreciate

Re: Numeric literals in other than base 10

2009-08-27 Thread robin
James Harris james.harri...@googlemail.com wrote in message news:bc3607b3-7fdd-43fd-8ede-66ac3f597...@32g2000yqj.googlegroups.com... On 22 Aug, 10:27, David 71da...@libero.it wrote: They look good - which is important. The trouble (for me) is that I want the notation for a new programming

[ANN] pylint 0.18.1 / astng 0.19.1

2009-08-27 Thread Sylvain Thénault
Hi there, I'm pleased to announce a new bug fixes release of pylint and astng. To see what have been fixed and to download it (unless your using debian, ubuntu or easy_install of course :), check: http://www.logilab.org/project/pylint/0.18.1 http://www.logilab.org/project/logilab-astng/0.19.1

(Simple?) Unicode Question

2009-08-27 Thread Shashank Singh
Hi All! I have a very simple (and probably stupid) question eluding me. When exactly is the char-set information needed? To make my question clear consider reading a file. While reading a file, all I get is basically an array of bytes. Now suppose a file has 10 bytes in it (all is data, no

Re: About diagram and python

2009-08-27 Thread Dave Angel
catalinf...@gmail.com wrote: Hello! I see on my Diagram Editor software this : File - Export... - (on Export option is : PyDia Code Generation ... .py) What python is in this file ? How help me with python code ? Thank you ! And when I start my car the radio is tuned to the wrong station.

Re: (Simple?) Unicode Question

2009-08-27 Thread Rami Chowdhury
Further, does anything, except a printing device need to know the encoding of a piece of text? I may be wrong, but I believe that's part of the idea between separation of string and bytes types in Python 3.x. I believe, if you are using Python 3.x, you don't need the character encoding

Re: (Simple?) Unicode Question

2009-08-27 Thread Albert Hopkins
On Thu, 2009-08-27 at 22:09 +0530, Shashank Singh wrote: Hi All! I have a very simple (and probably stupid) question eluding me. When exactly is the char-set information needed? To make my question clear consider reading a file. While reading a file, all I get is basically an array of

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Grant Edwards
On 2009-08-27, Robert Kern robert.k...@gmail.com wrote: On 2009-08-27 07:41 AM, David House wrote: 2009/8/27 Terry Reedytjre...@udel.edu: reply-all may send duplicate messages to the author. Not sure of this list. I'm fairly sure Mailman deals with that. Many of us read from

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Dave Angel
Xavier Ho wrote: On Thu, Aug 27, 2009 at 7:04 PM, Dave Angel da...@ieee.org wrote: snip Thanks for those pointers. For example, I see a single message containing typically around 10 attachments. I do the reply-all to one of these attachments, and it handles the message body okay, the

Re: Object Reference question

2009-08-27 Thread josef
Thanks to everyone who responded. I will be going with some sort of a = MyClass(name = 'a') format. It's the Python way. For me, it was very hard to accept that EVERYTHING is an object reference. And that there are no object reference names, just string entries in dictionaries. But I think it

Re: Need help with Python scoping rules

2009-08-27 Thread Miles Kaufmann
On Aug 26, 2009, at 1:11 PM, kj wrote: I think I understand the answers well enough. What I *really* don't understand is why this particular feature of Python (i.e. that functions defined within a class statement are forbidden from seeing other identifiers defined within the class statement) is

Re: Annoying octal notation

2009-08-27 Thread Ethan Furman
Steven D'Aprano wrote: A mistake is still a mistake even if it shared with others. Treating its with a lead zero as octal was a design error when it was first thought up [snippage] I have to disagree with you on this one. The computing world was vastly different when that design decision

Re: Annoying octal notation

2009-08-27 Thread MRAB
Ethan Furman wrote: Steven D'Aprano wrote: A mistake is still a mistake even if it shared with others. Treating its with a lead zero as octal was a design error when it was first thought up [snippage] I have to disagree with you on this one. The computing world was vastly different when

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-27 Thread Mensanator
On Aug 26, 10:27 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Wed, 26 Aug 2009 18:53:04 -0700, Erik Max Francis wrote: In any case, unary is the standard term for what I'm discussing: http://en.wikipedia.org/wiki/Unary_numeral_system snip This really isn't anywhere

regexp help

2009-08-27 Thread Bakes
If I were using the code: (?Pdata[0-9]+) to get an integer between 0 and 9, how would I allow it to register negative integers as well? -- http://mail.python.org/mailman/listinfo/python-list

Re: regexp help

2009-08-27 Thread Iuri
You can use r[+-]?\d+ to get positive and negative integers. It returns true to these strings: +123, -123, 123 On Thu, Aug 27, 2009 at 3:15 PM, Bakes ba...@ymail.com wrote: If I were using the code: (?Pdata[0-9]+) to get an integer between 0 and 9, how would I allow it to register

Re: Python on Crays

2009-08-27 Thread Mark Dickinson
On Aug 25, 11:34 pm, Carrie Farberow farbe...@wisc.edu wrote: Ok, here are links to word documents outlining the commands I executed as well as the make.log file and the make_install.log file [links snipped] So from the output of make, it looks as though none of the modules specified in the

Re: Object Reference question

2009-08-27 Thread Ethan Furman
josef wrote: Thanks to everyone who responded. I will be going with some sort of a = MyClass(name = 'a') format. It's the Python way. For me, it was very hard to accept that EVERYTHING is an object reference. And that there are no object reference names, just string entries in dictionaries.

Question on the csv library

2009-08-27 Thread vsoler
I am trying to read a csv file generated by excel. Although I succeed in reading the file, the format that I get is not suitable for me. I've done: import csv spamReader = csv.reader(open('C:\\abc.csv', 'r')) print spamReader _csv.reader object at 0x01022E70 for row in spamReader:

Re: Python on Crays

2009-08-27 Thread Craig
Who the one from wisconsin and did you try the python group in madison maybe they can help. Well i from madison are and i just a newbie with python.What OS you useing? --- On Thu, 8/27/09, Mark Dickinson dicki...@gmail.com wrote: From: Mark Dickinson dicki...@gmail.com Subject: Re: Python on

Re: How does the file.seek() work ?

2009-08-27 Thread gert
On Aug 26, 7:28 pm, gert gert.cuyk...@gmail.com wrote: On Aug 26, 12:46 am, Graham Dumpleton graham.dumple...@gmail.com wrote: On Aug 25, 5:37 am, Tim Chase python.l...@tim.thechases.com wrote: I want the file pointer set to 100 and overwrite everything from there [snip] def

Re: Annoying octal notation

2009-08-27 Thread Ethan Furman
James Harris wrote: On 27 Aug, 18:31, Ethan Furman et...@stoneleaf.us wrote: Steven D'Aprano wrote: A mistake is still a mistake even if it shared with others. Treating its with a lead zero as octal was a design error when it was first thought up [snippage] I have to disagree with

Re: Question on the csv library

2009-08-27 Thread Benjamin Kaplan
On Thu, Aug 27, 2009 at 3:06 PM, vsoler vicente.so...@gmail.com wrote: I am trying to read a csv file generated by excel. Although I succeed in reading the file, the format that I get is not suitable for me. I've done: import csv spamReader = csv.reader(open('C:\\abc.csv', 'r'))

Re: Numeric literals in other than base 10 - was Annoying octal notation

2009-08-27 Thread Piet van Oostrum
Mensanator mensana...@aol.com (M) wrote: M On Aug 26, 4:59 pm, Piet van Oostrum p...@cs.uu.nl wrote: Mensanator mensana...@aol.com (M) wrote: M That's my point. Since the common usage of binary is for M Standard Positional Number System of Radix 2, it follows M that unary is the common

Re: Annoying octal notation

2009-08-27 Thread James Harris
On 27 Aug, 18:31, Ethan Furman et...@stoneleaf.us wrote: Steven D'Aprano wrote: A mistake is still a mistake even if it shared with others. Treating its with a lead zero as octal was a design error when it was first thought up [snippage] I have to disagree with you on this one.  The

Re: Annoying octal notation

2009-08-27 Thread Ethan Furman
MRAB wrote: Ethan Furman wrote: Steven D'Aprano wrote: A mistake is still a mistake even if it shared with others. Treating its with a lead zero as octal was a design error when it was first thought up [snippage] I have to disagree with you on this one. The computing world was

Re: TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str in windows xp, while making tarfile

2009-08-27 Thread Piet van Oostrum
Ryniek90 rynie...@gmail.com (R) wrote: R Hahah right. My fault. Must remember to read documentation so many times R until I find the solution. Thanks, now works fine. :-) And, by the way, how come the traceback refers to File backuper.py, line 197, in module while the posted code has only 188

Re: Question on the csv library

2009-08-27 Thread Andreas Waldenburger
On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger use...@geekmail.invalid wrote: [snip] Might I humbly suggest sheet = list(spamReader) # ? Oh, and while I'm humbly suggesting: spam_reader instead of spamReader or SpamReader or SpamrEadeR or suchlike. Caps are reserved for

Re: Python on Crays

2009-08-27 Thread Carrie Farberow
I am from Wisconsin -- is there a python group here? Do you have any contact info.? The compute node operating system is Compute Node Linux (CNL). Carrie - Original Message - From: Craig fasteliteprogram...@yahoo.com Date: Thursday, August 27, 2009 2:15 pm Subject: Re: Python on Crays

Re: Need help with Python scoping rules

2009-08-27 Thread Piet van Oostrum
kj no.em...@please.post (k) wrote: k No, the fact() function here represents an internal helper k function. It is meant to be called only once to help initialize k a class variable that would be inconvenient to initialize otherwise; k this helper function is not meant to be called from outside

Re: Question on the csv library

2009-08-27 Thread vsoler
On Aug 27, 9:42 pm, Andreas Waldenburger use...@geekmail.invalid wrote: On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger use...@geekmail.invalid wrote: [snip] Might I humbly suggest sheet = list(spamReader)  # ? Oh, and while I'm humbly suggesting: spam_reader instead of

Re: [OT] How do I reply to a thread by sending a message to python-list@python.org

2009-08-27 Thread Terry Reedy
David House wrote: 2009/8/27 Terry Reedy tjre...@udel.edu: reply-all may send duplicate messages to the author. Not sure of this list. I'm fairly sure Mailman deals with that. Nope. I got a duplicate sent to my mailbox, which I hate. -- http://mail.python.org/mailman/listinfo/python-list

  1   2   >