On 10/07/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
> Sorry for this, most likely, idiotic question on my part. I'm really
> liking Python and it's
> ease of use. My only trouble is that I'm not sure how to use a script that
> I've saved, during
> another script located withi
Hi,
Sorry for this, most likely, idiotic question on my part. I'm really
liking Python and it's ease of use. My only trouble is that I'm not sure how
to use a script that I've saved, during another script located within the same
folder.
The idea is that I want to make a few functions a
I have an external app that writes out a very basic xml files that
contains data that needs to be processed. For Example, one type of job
would be a simple file copy.
So in the XML file there would be (among other bits of information
about the job) things like
CopyFiles
Frank ( for who su
On 10/07/2008, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Wed, Jul 9, 2008 at 9:38 PM, John Fouhy <[EMAIL PROTECTED]> wrote:
> > Is the generator expression grammar right? How do I parse, e.g.,
> > '(x+1 for x in range(10))'? Seems like there's nothing there for
> > 'range(10)'. Like it shou
On Wed, Jul 9, 2008 at 9:38 PM, John Fouhy <[EMAIL PROTECTED]> wrote:
> On 10/07/2008, Kent Johnson <[EMAIL PROTECTED]> wrote:
>> The actual formal syntax definitions for the two are slightly different:
>> http://docs.python.org/ref/lists.html
>> http://docs.python.org/ref/genexpr.html
> Is the
On 10/07/2008, Kent Johnson <[EMAIL PROTECTED]> wrote:
> The actual formal syntax definitions for the two are slightly different:
> http://docs.python.org/ref/lists.html
> http://docs.python.org/ref/genexpr.html
>
> Presumably this means there is something that is syntactically allowed
> in on
On Wed, Jul 9, 2008 at 8:17 PM, Alan Gauld <[EMAIL PROTECTED]> wrote:
> No I meant in syntactic terms.
> We usually define an LC as
>
> [ expr for vars in sequence if expr ]
>
> or somesuch imprecise gobbledy gook ;-).
>
> Now we can define the generator expr (syntax) as
>
> expr for vars in
"Tim Golden" <[EMAIL PROTECTED]> wrote
In fact I guess you could say that the new definition of a list
comprehension is
[ generator expression]
Well, not if sure if you meant that literally
No I meant in syntactic terms.
We usually define an LC as
[ expr for vars in sequence if expr ]
o
"Kent Johnson" <[EMAIL PROTECTED]> wrote
Usually based on magnitude alone.
That seems a pretty strange definition of equal, that makes (1, 0)
== (0, 1).
Yes I know! But actually in many engineering situations where phase
is not important it's a good first approximation (for example power
ca
On Wed, Jul 9, 2008 at 5:02 PM, Mike Meisner <[EMAIL PROTECTED]> wrote:
> In creating a Player instance, that instance can create the Stats class,
> but when creating the first instance within the Stats class of a Details
> class, it fails with the following traceback:
>
> Traceback (most recent
To add to Alan:
On Wed, Jul 9, 2008 at 2:34 PM, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> You can interact with the operating system and file system using
> modules such as os etc. But you can't do it directly as you can
> in bash. But that is because bash has built in capability to execute
> exte
I've just started using classes in Python.
The basic goal is to develop a script that tracks individual player stats for
poker tournaments. This involves nesting a class within a class within a
class. The Player class incorporates a Stats class (three instances for three
different game types)
Alan Gauld wrote:
In fact I guess you could say that the new definition of a list
comprehension is
[ generator expression]
Well, not if sure if you meant that literally, but
it's certainly not: that would be a list whose one
item was a generator expression:
squares = (x * x for x in range (1
Hi!
I am coming closer to the talking editor and voice adjustments inside my
editor/talking module.
When reading the events over and over again I am slowly understanding
who wants what. Inside an editor there are key commands that do certain
things and I try to give some voice to them.
"Jeremiah Stack" <[EMAIL PROTECTED]> wrote
I was pondering something. when you are in the live environment
receiving
immediate feedback is it basically a compiler (or program),
responding to
what the user inputs,
Yes, technically its an interpreter rather than a compiler, although
there
i
"Don Jennings" <[EMAIL PROTECTED]> wrote
return ';'.join(x for x in l if x)
Ah! A list comprehension. Not at that point in the learning python
book,
Not quite, I believe its called a generator expression. Its like
a list comprehension but without the [] around it.
In fact I guess you coul
On Wed, Jul 9, 2008 at 2:17 PM, Alan Gauld <[EMAIL PROTECTED]> wrote:
> "Kent Johnson" <[EMAIL PROTECTED]> wrote
>>
>> That just raises the question of how do complex numbers compare?
>
> Usually based on magnitude alone.
> That's why I said the results would be equivalent to the length of a point
"Kent Johnson" <[EMAIL PROTECTED]> wrote
That just raises the question of how do complex numbers compare?
Usually based on magnitude alone.
That's why I said the results would be equivalent to the length of
a point approach. You assume that any point on the same sperical
locus is equal. At
Jeremiah Stack wrote:
Hello All,
I was pondering something. when you are in the live environment receiving
immediate feedback is it basically a compiler (or program), responding to
what the user inputs, or is it like the bash shell where I could tell it to
search the file system for a certain fi
Hello All,
I was pondering something. when you are in the live environment receiving
immediate feedback is it basically a compiler (or program), responding to
what the user inputs, or is it like the bash shell where I could tell it to
search the file system for a certain file?
Or how does python
Monika Jisswel googlemail.com> writes:
>
>
> Comment : I never did any VB so I am not sure if I understand you.supposing
your data comes like this :python code :
>
>
> Data = ( ('A', 1), ('B', 2), ('C', 3), ('D', 4) )#you can create a list of the
items like this : List_Letters = [ x[0] for x
On Wed, Jul 9, 2008 at 3:05 AM, Alan Gauld <[EMAIL PROTECTED]> wrote:
>
> Rather than comparing in that manner I'd take a different approach.
> I'd measure the length from the origin thus any point that was inside
> the circle upon whose ciorcumference the point sits is less than
> the point. Any p
Ah! A list comprehension. Not at that point in the learning python book,
yet, but I will be soon. Thanks!
Don
On Tue, Jul 8, 2008 at 9:34 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 8, 2008 at 6:35 PM, Don Jennings <[EMAIL PROTECTED]> wrote:
>
> > def __unicode__(self):
> >
"Christopher Spears" <[EMAIL PROTECTED]> wrote
def __cmp__(self, other):
if self.x == other.x and self.y == other.y:
return 0
elif self.x < other.x and self.y < other.y:
return -1
elif self.x > other.x and self.y > other.y:
return 1
Rather than comparing in that manner I'd
24 matches
Mail list logo