On Sat, Mar 22, 2008 at 5:17 PM, elis aeris [EMAIL PROTECTED] wrote:
sweet, I love built in functions. thanks !
Seriously, Elis. You would have learned raw_input in *any* Python tutorial.
You need to read some tutorials.
Seriously.
-Luke
___
Tutor
bob gailer [EMAIL PROTECTED] wrote Adding key testing:
if (original, to) in factors:
factor = factors[(original, to)]
print variable * factor
elif (to, original):
probably meant to be
elif (to,original) in factors:
factor = factors[(to, original)]
print variable / factor
else:
Nathan McBride wrote:
I've used pexpect for a few projects and love it. Basically pexpect
lets you spawn a program and interact with it from code like you
yourself were running it in a console. How would you send the ctrl key?
I don't use pexpect, so I am guessing...
The ctrl key by itself
Eric Walker wrote:
Ok, I found the responses, sorry..
I have been reading the book Text Processing in PYTHON by David Mertz.
I have some text that I have to parse. I want to use grammers.
It's grammAr. A grammar is a formal description of the structure of a
language. It is not a parser;
hi,
please ho to Unsubscrib from this mailing list ?
thanks...
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
What about Alt keys? I was thinking terminal control voodoo. But I don't
know any. man 5 termcap might be a start, though.
Cheers
On Sunday 23 March 2008 06:58, Kent Johnson wrote:
Nathan McBride wrote:
I've used pexpect for a few projects and love it. Basically pexpect
lets you spawn
What about Alt keys? I was thinking terminal control voodoo. But I don't
know any. man 5 termcap might be a start, though.
Cheers
On Sunday 23 March 2008 06:58, Kent Johnson wrote:
Nathan McBride wrote:
I've used pexpect for a few projects and love it. Basically pexpect
lets you spawn
Norman Khine wrote:
Hello,
Please excuse me in advance if this post is long winded. I have the
following nagging issue for which I have found a work around, but wanted
a better solution.
The reason
http://uk.expert.travel/companies/abakuc/;view?batchstart=5
fails while
Meftah Tayeb [EMAIL PROTECTED] wrote
please ho to Unsubscrib from this mailing list ?
Go to the mailing list page on python.org and unsubscribe
there.
http://mail.python.org/mailman/listinfo/tutor
HTH
Alan g
___
Tutor maillist -
Luciano Ramalho wrote:
Nowadays the best practice for invoking a method from all superclasses
(yes, multiple inheritance) is this:
class SubClass(BaseClass):
def __init__(self, t, *args, **kw):
super(SubClass, self).__init__(*args, **kw)
# do something with t
That
Thanks, Andreas. Why do we need to use classmethod/
staticmethod and where do we need to use them ?
thanks
iyer
--- Andreas Kostyrka [EMAIL PROTECTED] wrote:
Well, it's classmethod/staticmethod in truth, @ is
the decorator
operator:
def testdec(func):
return {funcobj: func}
class
I spent fruitless hours trying to get a (normal) division x/y to work and then
saw that you have to declare:
from __future__ import division
.. at the top of a module file. What is this all about?
Dinesh
___
Tutor maillist - Tutor@python.org
Dinesh B Vadhia wrote:
I spent fruitless hours trying to get a (normal) division x/y to work and
then saw that you have to declare:
normal division x/y works just as expected, with one caveat: remember
that if you divide two *integer* values, you will get an *integer*
division operation
Am Mittwoch, den 19.03.2008, 10:36 -0300 schrieb Ricardo Aráoz:
Luciano Ramalho wrote:
Nowadays the best practice for invoking a method from all superclasses
(yes, multiple inheritance) is this:
class SubClass(BaseClass):
def __init__(self, t, *args, **kw):
One usual usage for classmethods are alternate constructors.
Andreas
Am Sonntag, den 23.03.2008, 10:49 -0700 schrieb maser:
Thanks, Andreas. Why do we need to use classmethod/
staticmethod and where do we need to use them ?
thanks
iyer
--- Andreas Kostyrka [EMAIL PROTECTED] wrote:
Dear all,
I am trying to build an extension for the Firefox that will automatically
authorize users through KeyNote system. My components are the following:
1. Python implementation of KeyNote. Stand-alone, given some
information makes the authorization decision.
2. Firefox Extension:
maser wrote:
Thanks, Andreas. Why do we need to use classmethod/
staticmethod and where do we need to use them ?
I use staticmethods as a convenience to put related functions in the
namespace of a class. Perhaps foo.py contains class Foo with
staticmethod bar(). In client code I can say
from
t = 12345, 54321, hello!
print t[0]
the way the 3 items are saved and access fits my need, now how do I make t
have more than one entry so effectively I get this?
t[n][n]
?
___
Tutor maillist - Tutor@python.org
Kent
Would you show the examples which show where staticmethod
classmethod are used?
I've often wondered about the usefulness of these myself. Having read
many of the popular books on python, none provide a good clear
explanation
of why or where these should be used, and what the alternatives
elis aeris wrote:
t = 12345, 54321, hello!
print t[0]
the way the 3 items are saved and access fits my need, now how do I
make t have more than one entry so effectively I get this?
t[n][n]
(1) are you going through the tutorials as requested?
(2) please learn how to ask meaningful
in c++ i use array[n][n] to store things.
how do i create an array like that?
On Sun, Mar 23, 2008 at 4:13 PM, bob gailer [EMAIL PROTECTED] wrote:
elis aeris wrote:
t = 12345, 54321, hello!
print t[0]
the way the 3 items are saved and access fits my need, now how do I
make t have
On Sun, Mar 23, 2008 at 4:16 PM, elis aeris [EMAIL PROTECTED] wrote:
in c++ i use array[n][n] to store things.
how do i create an array like that?
Python doesn't have arrays. It has tuples, lists, and dictionaries. A
quick Google will tell you the distinctions between them.
It looks to me
t =[ [item1, item2, item3], [itemA, itemB, itemC], [itemI,
itemII, itemIII] ]
yes this is what I am looking for.
Now I want to talk about this: how should I have asked my Q to let everyone
know what I was looking for?
looking back to my first post, it seems to be a little weak. Can you suggest
thanks for the reply, btw.
On Sun, Mar 23, 2008 at 4:22 PM, Marc Tompkins [EMAIL PROTECTED]
wrote:
On Sun, Mar 23, 2008 at 4:16 PM, elis aeris [EMAIL PROTECTED] wrote:
in c++ i use array[n][n] to store things.
how do i create an array like that?
Python doesn't have arrays. It has
Tony Cappellini wrote:
Kent
Would you show the examples which show where staticmethod
classmethod are used?
Some good discussion here:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/56ee49c203fd72e2/922f84d9d26662fc?hl=enlnk=gst;
I don't use classmethods so I can't
def returning ():
a = 1
b = 2
return a, b
ab = returning()
does this work?
if it does, is ab a tuple of 2 and [0] being a and [1] being b?
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I don't use classmethods so I can't discuss that. For staticmethods,
suppose I have in foo.py
Where is the word staticmethod in the example below? Where is it used?
This is what I was hoping to see.
class Foo(object):
# Lots of useful stuff
In client.py I have
from foo import
On Sun, Mar 23, 2008 at 4:24 PM, elis aeris [EMAIL PROTECTED] wrote:
Now I want to talk about this: how should I have asked my Q to let
everyone know what I was looking for?
looking back to my first post, it seems to be a little weak. Can you
suggest something that I could have said?
maser [EMAIL PROTECTED] wrote
Thanks, Andreas. Why do we need to use classmethod/
staticmethod and where do we need to use them ?
Although there are minor technical details where they differ
static methods and class methods are nearly identical. The
names come from two programming
On Sun, Mar 23, 2008 at 4:41 PM, elis aeris [EMAIL PROTECTED] wrote:
def returning ():
a = 1
b = 2
return a, b
ab = returning()
does this work?
I cut and pasted into an interactive Python session:
def returning ():
... a = 1
... b = 2
... return a, b
...
ab
Steve Willoughby [EMAIL PROTECTED] wrote
normal division x/y works just as expected, with one caveat:
remember
that if you divide two *integer* values, you will get an *integer*
division operation yielding an *integer* result. So:
It's worth pointing out that although beginners tend to
elis aeris [EMAIL PROTECTED] wrote
in c++ i use array[n][n] to store things.
how do i create an array like that?
Please read any tutorial they nearly all cover multi dimensional
lists.
It is also easy to experiment at the prompt. Just try the obvious
thing - create a list of lists. It
elis aeris [EMAIL PROTECTED] wrote
def returning ():
a = 1
b = 2
return a, b
ab = returning()
does this work?
if it does, is ab a tuple of 2 and [0] being a and [1] being b?
Try it in the prompt, thats what its there for and will give you
an instant answer:
def
elis aeris [EMAIL PROTECTED] wrote
looking back to my first post, it seems to be a little weak. Can you
suggest
something that I could have said?
Your first post was downright confusing.
Your second post was better because it described what you wanted.
You did that by drawing comparison
Tony Cappellini wrote:
I don't use classmethods so I can't discuss that. For staticmethods,
suppose I have in foo.py
Where is the word staticmethod in the example below? Where is it used?
This is what I was hoping to see.
It would be
class Foo(object):
@staticmethod
def
def_a =[
[3.2.2.2.2.2.3., 0.0.3.2.2.2.2.2.3.0.0.0., O],
[8.1.1.4., 0.0.2.2.2.2.3.1.1.1.0.0., h],
[1.2., 0.1.1.1.0.0.0.0.0.0.0.0., ,],
[2.7.2., 0.0.3.1.1.1.1.1.3.0.0.0., I],
[5.1.1.4.1.1.4., 0.0.3.3.3.3.5.0.0.0.0.0., m],
[3.3.3.3.,
elis aeris [EMAIL PROTECTED] wrote
def_a =[
[3.2.2.2.2.2.3., 0.0.3.2.2.2.2.2.3.0.0.0., O],
[6., 0.0.1.1.1.1.1.0.1.0.0.0., i],
[6., 0.0.1.0.1.1.1.1.1.0.0.0., !]
]
def returnzero:
return def_a[2]
what I am trying to do is to write a generic function
it works :D
On Sun, Mar 23, 2008 at 6:40 PM, Alan Gauld [EMAIL PROTECTED]
wrote:
elis aeris [EMAIL PROTECTED] wrote
def_a =[
[3.2.2.2.2.2.3., 0.0.3.2.2.2.2.2.3.0.0.0., O],
[6., 0.0.1.1.1.1.1.0.1.0.0.0., i],
[6., 0.0.1.0.1.1.1.1.1.0.0.0., !]
]
Hey all,
I've started trying to make homebrew programs for my wii the past couple
of days, and have found that programming it in c is quite hard. I was
wondering how I would go about compiling python for something like this.
The wii has a ppc processor, and runs homebrew in the native .elf
39 matches
Mail list logo