Has anyone had a problem posting to either of these mailing lists. I am a
member and have sent a few posts to each of them over the last couple
months, but none of them show up in the list. I always receive a 'awaiting
moderator approval' email. I have sent an email to the owner about this,
but
Hello all,
Thanks in advance for any thoughts, direction, and guidance.
Let's say I have a list like the following:
a = ['a1','a2','a3','a4','a5','a6']
and then I have dictionary like the following:
b = {'a1,a2,a3':'super'}
I need some direction and thoughts on how I might seach the list for
I'm not even sure if this is possible... and so far a google search of
"python move windows xp" has failed to yield any helpful looking
results.
I'm trying to create a script that will move a program window around
on the desktop, and other than that search I'm not sure where to look.
What we have
W W wrote:
I'm not even sure if this is possible... and so far a google search of
"python move windows xp" has failed to yield any helpful looking
results.
I'm trying to create a script that will move a program window around
on the desktop, and other than that search I'm not sure where to look.
On Mon, Jun 16, 2008 at 10:41 AM, GTXY20 <[EMAIL PROTECTED]> wrote:
> I need some direction and thoughts on how I might seach the list for the
> string (the key in dict b) sequence in list a and replace the occurance with
> the value from dict b. At the end I would like to have list a represented
>
On Mon, Jun 16, 2008 at 11:41:25AM -0400, GTXY20 wrote:
> Hello all,
>
> Thanks in advance for any thoughts, direction, and guidance.
>
> Let's say I have a list like the following:
>
> a = ['a1','a2','a3','a4','a5','a6']
>
> and then I have dictionary like the following:
>
> b = {'a1,a2,a3':'
"Tim Golden" <[EMAIL PROTECTED]> wrote
Currently I move it manually, but I want to automate the movement.
If
there's a way to move the program window by a specific X, Y value,
I
could make it work no problem. Does anyone have any experience with
this sort of task? Or can someone point me towa
*Module Name eli.py*
x = 0
y = [1, 2]
print 'Running module "eli"'
def whitney():
print 'whitney'
def printValues():
print x , y
*When I imported the Module*
from eli import x, y, printValues
printValues()
y[0] = 'cat'
x = 'dog'
printValues()
Output
Running module "eli"
0 [1, 2]
0 [
"Guess?!?" <[EMAIL PROTECTED]> wrote
*Module Name eli.py*
x = 0
y = [1, 2]
def whitney():
print 'whitney'
def printValues():
print x , y
*When I imported the Module*
from eli import x, y, printValues
Note that by doing this you are not really importing the module
but the names fr
On Mon, Jun 16, 2008 at 4:38 PM, Guess?!? <[EMAIL PROTECTED]> wrote:
> Also once we reload the module every value reverts to its original
> value .. Am I Right?
Yes, but maybe not in the way you think. A new copy of the module will
be loaded and bound to the name 'eli'. But the names x, y an
Thanks Alan and Kent ...Its much clearer now.
Any tutorial/reference you recommend to read about python modules?
Thanks
G
On Mon, Jun 16, 2008 at 5:08 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2008 at 4:38 PM, Guess?!? <[EMAIL PROTECTED]> wrote:
>
> > Also once we reload the
when i execute my program without an argument i receive,
infile = sys.argv[1]
IndexError: list index out of range
is there a way that i could suppress this and add my own error code
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
when i execute my program without an argument i receive,
>
>
> infile = sys.argv[1]
>
> IndexError: list index out of range
>
> is there a way that i could suppress this and add my own error code
The direct way to handle this is to check the length of sys.argv
first. sys.argv is a list, so you
Hi!
I am resending this SAPI examples for speech, I guess in some cases the
email message gets messed up so I attached the
SAPI 5 test for voices along with an HTML version using Java Script. It also
has the methods and a voice by name assignment since the voices are an array
list by eleme
Exercise 17.6 Write a definition for a class named Kangaroo with the
following methods:
1. An init method that initializes an attribute named pouch contents to an
empty list.
2. A method named put in pouch that takes an object of any type and adds it to
pouch contents.
Test your code by creating tw
On Tue, Jun 17, 2008 at 12:14 AM, Guess?!? <[EMAIL PROTECTED]> wrote:
> Exercise 17.6 Write a definition for a class named Kangaroo with the
> following methods:
[cut]
Be careful about asking for homework help. We're restricted from
giving much help on homework questions.
The error message you
A followup on the message below. The source code has errors in it
because I keyed it in rather than copying and pasting, as pointed out by
Alan Gauld. Joe replied with corrected code and said it worked for
him. I took his code and ran it on the Mac and had the same problem as
before: everyt
Hello Danny,
It isnt my homework. I am reading Think Python: An Introduction to
Software Design . This is Exercise question of Chap 17
Thanks,
G
On Mon, Jun 16, 2008 at 9:24 PM, Danny Yoo <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 12:14 AM, Guess?!? <[EMAIL PROTECTED]> wrote:
>> E
Hello All,
Just made a minor change . its fixed now :)
class Kangaroo:
def __init__(self, pouch_contents=None):
if pouch_contents is None:
self.pouch_contents = []
else:
self.pouch_contents = pouch_contents
def put_in_pouch(self,obj):
I've been learning about how to implement an iterator in a class from Core
Python Programming (2nd Edition).
>>> class AnyIter(object):
... def __init__(self, data, safe=False):
... self.safe = safe
... self.iter = iter(data)
...
... def __iter__(self):
... return self
20 matches
Mail list logo