Re: [Tutor] Python Editor For Mac Os X

2007-12-13 Thread शंतनु (Shantanoo)
On Dec 14, 2007 10:02 AM, chinni <[EMAIL PROTECTED]> wrote: > Hi which editor for python on Mac os x platform is best with color syntax > compiler etc... You can try emacs, vim, textmate, eclipse(?) regards, shantanoo ___ Tutor maillist - Tutor@python

[Tutor] Python Versions

2007-12-13 Thread Gman
Well, I dont feel Igrint, yet I must be. Turns out that Early Light was right regarding the command prompt. I had to go back and try a few of the exercises again to see if i actually had overlooked something so obvious, and it turns out I had! Enclosed is a example of my ineptitude.I didnt

Re: [Tutor] Introspect function or class' required arguments

2007-12-13 Thread Luis N
On Dec 14, 2007 12:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: > Luis N wrote: > > Is there a way to introspect a function or class' required arguments, > > particularly keyword arguments? > > See inspect.getargspec() and formatargspec(). > Look at the source if you want details of where the inf

[Tutor] Python Editor For Mac Os X

2007-12-13 Thread chinni
Hi which editor for python on Mac os x platform is best with color syntax compiler etc... -- Cheers, M.Srikanth Kumar, Phone no: +91-9866774007 ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Fw: what is the difference

2007-12-13 Thread johnf
On Thursday 13 December 2007 03:28:46 pm ALAN GAULD wrote: > Terry Carroll wrote: > > On Thu, 13 Dec 2007, Alan Gauld wrote: > >> > if self._inFlush: > >> > return > >> > self._inFlush = True > >> > > >> > > >> > I can not see the difference but the second one acts differently > > in >

Re: [Tutor] Tutor Digest, Vol 46, Issue 39

2007-12-13 Thread Andre Mueninghoff
my tongue on that one. My guess is it varies from > one module to the next depending on how well maintained they are, but > I don't really know. > > > I'm sure Kent will be able to comment further, he seems to have made > > himself an expert in this area! (and I

Re: [Tutor] Introspect function or class' required arguments

2007-12-13 Thread Kent Johnson
Luis N wrote: > Is there a way to introspect a function or class' required arguments, > particularly keyword arguments? See inspect.getargspec() and formatargspec(). Look at the source if you want details of where the info is stored. > I can easily use a dictionary since it is my own function tha

[Tutor] using quotes in IDLE

2007-12-13 Thread Jim Morcombe
A really dumb question... When typing things into IDLE, how are quotes meant to work? If I type" employee.name = "Susan" then IDLE ignores the last " and I get an error. Jim ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listi

[Tutor] Introspect function or class' required arguments

2007-12-13 Thread Luis N
Is there a way to introspect a function or class' required arguments, particularly keyword arguments? I can easily use a dictionary since it is my own function that I wish to introspect. I haven't tested the below code yet, but e.g. obj = getattr(self, 'obj')() preprocessors = {'Card':[{'obj_attr

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Luke Paireepinart
On Dec 13, 2008 3:12 PM, Tiger12506 <[EMAIL PROTECTED]> wrote: > I may sound like a know-it-all, but dictionaries *are* iterators. I'm used to that from you :P > > [a for a in eventData if eventData[a] < time.time()] > > This is more efficient. The keys method creates a list in memory first and

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Luke Paireepinart
> > > By the way, what was the purpose of the line with > > time.sleep(1) > > It pauses for 1 second. But i'm not sure why he wanted a pause! :-) > Just because it would dump a bunch of stuff to the screen really quickly that you couldn't read as soon as some events expired. ___

Re: [Tutor] ipython / readline problem

2007-12-13 Thread Kent Johnson
Alan Gauld wrote: > But I think Python itself is pretty safe with unicode v ascii in most > cases. I was actually holding my tongue on that one. My guess is it varies from one module to the next depending on how well maintained they are, but I don't really know. > I'm sure Kent will be able

[Tutor] Fw: what is the difference

2007-12-13 Thread ALAN GAULD
Terry Carroll wrote: On Thu, 13 Dec 2007, Alan Gauld wrote: >> > if self._inFlush: >> > return >> > self._inFlush = True >> > >> > >> > I can not see the difference but the second one acts differently in >> > my code. >> >> The first has no else clause so the second assignment alway

Re: [Tutor] ipython / readline problem

2007-12-13 Thread Alan Gauld
"Tiago Saboga" <[EMAIL PROTECTED]> wrote > But in general, in the python libraries, I thought it would be safe > to > assume that one can equally send a string or a unicode object, and > that otherwise there would be a warning in the docs. Is this > assumption plain wrong, is this info really mis

Re: [Tutor] what is the difference

2007-12-13 Thread Alan Gauld
"Tiger12506" <[EMAIL PROTECTED]> wrote >>> I can not see the difference but the second one acts differently >>> in >>> my code. >> >> The first has no else clause so the second assignment always >> happens. >> >> Alan G. > > No it doesn't. The return statement does not allow the second > assig

Re: [Tutor] Python Versions

2007-12-13 Thread Tiger12506
> Hey Tiger, > your system clock is set incorrectly and your e-mail was flagged as being > sent 12/12/2008, causing it to appear after an e-mail sent as a reply - > confusing. > Please remedy this situation ;P > -Luke Whoops!! I have to mess with my clock occasionally to test the integrity of

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Kent Johnson
Tiger12506 wrote: > I may sound like a know-it-all, but dictionaries *are* iterators. Mmm, to nit-pick a little, dictionaries are iterables, not iterators. They don't have a next() method. > [a for a in eventData if eventData[a] < time.time()] > > This is more efficient. The keys method creates

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Tiger12506
I may sound like a know-it-all, but dictionaries *are* iterators. [a for a in eventData if eventData[a] < time.time()] This is more efficient. The keys method creates a list in memory first and then it iterates over it. Unnecessary. > > "Che M" <[EMAIL PROTECTED]> wrote > >> Although I was not

Re: [Tutor] what is the difference

2007-12-13 Thread Tiger12506
> "johnf" <[EMAIL PROTECTED]> wrote > >> if self._inFlush: >> return >> self._inFlush = True >> >> >> AND >> >> if not self._inFlush: >> ... >> self._inFlush = True >> else: >> return >> >> I can not see the difference but the second one acts differently in >> my code. > > T

Re: [Tutor] ipython / readline problem

2007-12-13 Thread Tiago Saboga
On Thu, Dec 13, 2007 at 07:41:08AM -0500, Kent Johnson wrote: > Tiago Saboga wrote: >> : 'ascii' codec can't encode >> character u'\xe7' in position 2: ordinal not in range(128) >> >> === >> >> What's happening? Why do the readline methods accept a multibyte >> s

Re: [Tutor] what is the difference

2007-12-13 Thread Alan Gauld
"johnf" <[EMAIL PROTECTED]> wrote > if self._inFlush: > return > self._inFlush = True > > > AND > > if not self._inFlush: > ... > self._inFlush = True > else: > return > > I can not see the difference but the second one acts differently in > my code. The first has no els

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Alan Gauld
"Che M" <[EMAIL PROTECTED]> wrote > Although I was not familiar with what you can do with a list such > as you did here: > [a for a in eventData.keys() if eventData[a] < time.time()] This is known as a list comprehension (and is described in the Functional Programming topic of my tutorial - o

[Tutor] what is the difference

2007-12-13 Thread Michael H. Goldwasser
Hi John, It depends upon whether the "..." code fragment is affected in any way by the value of self._inFlush. The first code sample you offer should be identical to the following. if not self._inFlush: self._inFlush = True# reset this before the ... ... else:

[Tutor] what is the difference

2007-12-13 Thread johnf
if self._inFlush: return self._inFlush = True AND if not self._inFlush: ... self._inFlush = True else: return I can not see the difference but the second one acts differently in my code. -- John Fabiani ___ Tutor m

Re: [Tutor] ipython / readline problem

2007-12-13 Thread Kent Johnson
Tiago Saboga wrote: > : 'ascii' codec can't encode > character u'\xe7' in position 2: ordinal not in range(128) > > === > > What's happening? Why do the readline methods accept a multibyte > string ('ação') but not a unicode (u'ação')? I don't know what is hap

[Tutor] ipython / readline problem

2007-12-13 Thread Tiago Saboga
Hi, I am facing what seems like a bug, and the docs are not enough to tell me where the bug lies. In ipython, I can't type a multiline unicode string. The bug is reported here [1], and the output is like that (except that the commented out lines are modifications I have done): ===

Re: [Tutor] thread and os.pipe

2007-12-13 Thread Tiago Saboga
On Sun, Dec 09, 2007 at 12:25:59AM -, Alan Gauld wrote: > > updated to show the output from the commands. What I want to do > > is make the doit() method of the Converter class return a pipe, > > through which it will then send the output of the programs. > > I'm still not convinced that a pip

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Che M
> Date: Thu, 13 Dec 2007 01:58:10 -0600 > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: tutor@python.org > Subject: Re: [Tutor] user-given variable names for objects > > Che M wrote: > > I'm sure this is a classic beginner's topic, and I've read a bit about > > it online already, but I

Re: [Tutor] user-given variable names for objects

2007-12-13 Thread Che M
> To: tutor@python.org > From: [EMAIL PROTECTED] > Date: Thu, 13 Dec 2007 07:53:36 + > Subject: Re: [Tutor] user-given variable names for objects > > > "Che M" <[EMAIL PROTECTED]> wrote > > > I'm sure this is a classic beginner's topic, > > Indeed it is, it comes up about once a month

Re: [Tutor] Python Versions

2007-12-13 Thread Luke Paireepinart
Tiger12506 wrote: > The OP has not specified what his problems specifically are, but "earlylight > publishing" described his problem before, and he was not understanding why > the >>> prompt was expecting immediate keyboard input when he typed in > raw_input(). So a noob cannot figure out why it