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

2009-08-27 Thread ryles
On Aug 26, 4:56 am, Michael Riedel 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 TROUBLE_MAKER. > > Any help, th

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 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, meant to be called only on

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 Terry Reedy
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

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

2009-08-27 Thread Frank Millman
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 better than Outlook Express.

Re: Protecting against callbacks queuing up?

2009-08-27 Thread Hendrik van Rooyen
On Wednesday 26 August 2009 22:06:01 Esben von Buchwald wrote: > > I don't really get it... > > I can see that I should put a t.after(...) around the function that does > the work, when calling it. That delays each call for the given period. I > just tried it out, the console keeps saying > --

Re: Python for professsional Windows GUI apps?

2009-08-27 Thread Hendrik van Rooyen
On Wednesday 26 August 2009 22:47:23 David C Ullrich wrote: > That's great. But do you know of anything I can use as a > visual form design tool in wxPython? Boa Constructor - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
Ulrich Eckhardt a écrit : (snip) Now, what actually causes problems is that 'fact_rec' is not universally accessible until class 'Demo' is fully defined, but you need this in order to fully define it. Here comes a drawback of the dynamic nature of Python, that the declaration phase (compiling) i

Re: Need help with Python scoping rules

2009-08-27 Thread Stephen Fairchild
kj wrote: > Because, as I've explained elsewhere, it is not a method: it's a > "helper" function, meant to be called only once, within the class > statement itself. So why didn't you delete it after you were done with it? Class Demo(object): def fact(x): ... _classvar = fact(5)

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
kj a écrit : (snip) I fully agree that this case is rather vexing to my (and obviously your) biased brain. I wouldn't call this a bug before fully understanding why e.g. you can not access a class before its definition is finished. I understand this, what I don't understand is why do it this

Python on HP-UX

2009-08-27 Thread Westlund, David
Hi I'm trying to compile Python on an HP-UX v11.23 running on an Itanium. I have tried with both gcc and cc, and python versions 2.5.4, 2.6.2 as well as an SVN checkout. In all cases, alloca.h needs to be included. On most systems I'm guessing it is already included from stdlib.h, but not on HP

Re: Move dictionary from instance to class level

2009-08-27 Thread Dave Angel
Frank Millman wrote: 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

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
kj a écrit : In <1bf83a7e-f9eb-46ff-84fe-cf42d9608...@j21g2000yqe.googlegroups.com> Carl Banks writes: Yeah, it's a little surprising that you can't access class scope from a function, but that has nothing to do with encapsulation. It does: it thwarts encapsulation. The helper function in

Re: Need help with Python scoping rules

2009-08-27 Thread Bruno Desthuilliers
kj a écrit : In "Martin P. Hellwig" writes: kj wrote: 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 limited form of class encapsulation (e.g. class variables). "class

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 bette

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 proble

Re: Parse xml file

2009-08-27 Thread Balamurugan S
On Thu, Aug 27, 2009 at 2:26 PM, loial 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 information, http://www.feedparser

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 fac

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 > writes: > >> >Why are you defining a method without a self parameter? >> >> Because, as I've explained elsewhere, it

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 th

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

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 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 saves me the

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

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 > > 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 ( > > let's

Re: Python on the Web

2009-08-27 Thread Graham Dumpleton
On Aug 27, 1:02 pm, Phil 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 missed > all

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 b

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 a

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In Jean-Michel Pichavant 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 are forbidden from >> "seeing" other identifiers defined within t

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 -- http://mail.python.org/mailman/listinfo/python-

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, a

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In Jean-Michel Pichavant 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 is created, then c is added as a property of that >object, th

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In <02a6427a$0$15633$c3e8...@news.astraweb.com> Steven D'Aprano 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 >> writes: >> >>> >Why are you defining

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/python/dist-packages, Debian addons | install into /usr/{l

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 statem

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 ?-) -- http://mail.python

Re: Python for professsional Windows GUI apps?

2009-08-27 Thread Neuruss
On 26 ago, 05:29, erikj 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 (because of

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 : > 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 tw

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 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 | Democracy is three

Re: List iterator thread safety

2009-08-27 Thread Xavier Ho
On Tue, Aug 25, 2009 at 3:43 AM, Emanuele D'Arrigo 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 something sim

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 over

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). -- http://mail.python.org/mailman/li

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 cla

Re: Does Class implements Interface?

2009-08-27 Thread Benjamin Kaplan
On Thu, Aug 27, 2009 at 9:16 AM, Emanuele D'Arrigo 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 superclass of > C. Th

Re: List iterator thread safety

2009-08-27 Thread Carl Banks
On Aug 27, 5:03 am, "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 pr

Re: ubuntu dist-packages

2009-08-27 Thread Diez B. Roggisch
Paul Boddie wrote: > On 26 Aug, 17:48, Jorgen Grahn 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 packages toda

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 program

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

2009-08-27 Thread Michael
On Aug 27, 8:56 am, ryles wrote: > On Aug 26, 4:56 am, Michael Riedel > 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()' > > depen

Re: Need help with Python scoping rules

2009-08-27 Thread kj
In <4a967b2f$0$19301$426a7...@news.free.fr> Bruno Desthuilliers 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 scopes, are off to a bad start: Nam

Re: Object's nesting scope

2009-08-27 Thread zaur
On 26 авг, 23:56, MRAB wrote: > zaur wrote: > > On 26 авг, 21:11, "Rami Chowdhury" wrote: > >>> person = Person(): > >>>   name = "john" > >>>   age = 30 > >>>   address = Address(): > >>>      street = "Green Street" > >>>      no = 12 > >> Can you clarify what you mean? Would that define a Pers

Re: ubuntu dist-packages

2009-08-27 Thread Paul Boddie
On 27 Aug, 15:27, "Diez B. Roggisch" wrote: > > You mean it's the problem of the python packaging that it can't deal with > RPMs, debs, tgzs, OSX bundles, MSIs and > ? No, it's the problem of the Pythonic packaging brigade that package retrieval, building and installing is combined into one unsat

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

Re: Object's nesting scope

2009-08-27 Thread Carl Banks
On Aug 26, 5:51 am, zaur 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=: >       > > or > > : >     > > That's means that result object of evaluation is used as > nested scope for eva

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. I

Re: List iterator thread safety

2009-08-27 Thread Carl Banks
On Aug 27, 7:25 am, Hendrik van Rooyen 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 of objects, a

Re: Need help with Python scoping rules

2009-08-27 Thread Jan Kaliszewski
14:17:15 Steven D'Aprano 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 detail, I fully agree. *j -- Jan Kal

Re: Object's nesting scope

2009-08-27 Thread zaur
On 27 авг, 18:34, Carl Banks wrote: > On Aug 26, 5:51 am, zaur 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=: > >       > > > or > > > : > >     > > > That's means that

Re: Object's nesting scope

2009-08-27 Thread Carl Banks
On Aug 27, 8:01 am, zaur wrote: > On 27 авг, 18:34, Carl Banks 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 design points of Python: that attr

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 wrote: > On Aug 27, 8:01 am, zaur wrote: > > > On 27 авг, 18:34, Carl Banks 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

Re: ubuntu dist-packages

2009-08-27 Thread David Cournapeau
On Thu, Aug 27, 2009 at 8:27 AM, Diez B. Roggisch wrote: > Paul Boddie wrote: > >> On 26 Aug, 17:48, Jorgen Grahn 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, b

Re: ubuntu dist-packages

2009-08-27 Thread Florian Diesch
Robin Becker 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 /usr/local/lib/python/dist-pack

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 solut

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 Reedy: 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 getting reply email

Re: Numeric literals in other than base 10

2009-08-27 Thread robin
"James Harris" 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 language and already use these

[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 metad

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 mum

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

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 wrote: > On 2009-08-27 07:41 AM, David House wrote: >> 2009/8/27 Terry Reedy: >>> 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 or gmane.comp.python.gen

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 wrote: 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 To/CC fields okay,

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 all

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)

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 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 > This really isn't anywhere near as controversial as you guys

regexp help

2009-08-27 Thread Bakes
If I were using the code: (?P[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 wrote: > If I were using the code: > > (?P[0-9]+) > > to get an integer between 0 and 9, how would I allow it to register > negative in

Re: Python on Crays

2009-08-27 Thread Mark Dickinson
On Aug 25, 11:34 pm, Carrie Farberow 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 Modules/Setup fi

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. But

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 spamRe

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 wrote: > From: Mark Dickinson > Subject: Re: Python on Crays > To: python-list@python.org

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

2009-08-27 Thread gert
On Aug 26, 7:28 pm, gert wrote: > On Aug 26, 12:46 am, Graham Dumpleton > wrote: > > > > > On Aug 25, 5:37 am, Tim Chase wrote: > > > > > I want the file pointer set to 100 and overwrite everything from there > > > [snip] > > > > def application(environ, response): > > > >     query=os.path.join

Re: Annoying octal notation

2009-08-27 Thread Ethan Furman
James Harris wrote: On 27 Aug, 18:31, 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. Th

Re: Question on the "csv" library

2009-08-27 Thread Benjamin Kaplan
On Thu, Aug 27, 2009 at 3:06 PM, vsoler 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')) > > >>> print

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

2009-08-27 Thread Piet van Oostrum
> Mensanator (M) wrote: >M> On Aug 26, 4:59 pm, Piet van Oostrum wrote: >>> > Mensanator (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 usage for Standard P

Re: Annoying octal notation

2009-08-27 Thread James Harris
On 27 Aug, 18:31, 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 computi

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 vastly

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 (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 while the posted code has only 188 lines? -- Pi

Re: Question on the "csv" library

2009-08-27 Thread Andreas Waldenburger
On Thu, 27 Aug 2009 21:36:28 +0200 Andreas Waldenburger 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 classes. Not a ne

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 Date: Thursday, August 27, 2009 2:15 pm Subject: Re: Python on Crays To: python-list@python.org, M

Re: Need help with Python scoping rules

2009-08-27 Thread Piet van Oostrum
> kj (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 the >k

  1   2   >