All,
Thanks for the help...I am using the older Numeric 23.4. I have some stuff
that cannot use Numarray yet. Numeric does not seam to have the same
functionality.
Happy Holidays.
John Ertl
-Original Message-
From: Danny Yoo [mailto:[EMAIL PROTECTED]
Sent: Friday, December 10, 2004
before it would
search the entire string for a match. This seems a bit unusual from my past
experience, but it solved the issue I was experiencing.
Thank you for your help.
John Gooch
-Original Message-
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 10:41 AM
o look like 00011000
22.33 needs to look like 00223330
.22 needs to look like 2200
Any ideas on the right padding the decimal side using "0"
Thanks,
John
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
This is weird. I have a script that checks walks through directories, checks
to see if their name matches a certain format ( regular expression ), and
then prints out what it finds. However, it refuses to ever match on numbers
unless the regexp is ".*". So far I have tried the following regular
exp
Very elegant, It makes me feel like "I should have thought of that". Thanks
for the help and the reminder to think of the simplistic approach.
John
-Original Message-
From: Tim Peters [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 15, 2004 12:15
To: Ertl, John
Cc:
Hello,
I'm not a Mac user, but I'm a promoter of Python! I have a good friend using
a Mac who's becoming sceptical of python due to frustrations with the
PYTHONPATH. I'm trying to help...
Everything is fine running vanilla python. Importing modules works fine. But
in ipython, the module paths ne
yntax
I've tried every changing where the white space is and the commas but i just
cant get it to work.
any help would be much appreciated and thank you in advance
John
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
dh6SX3q>, which uses Steve
> D'Aprano's random_digits function, took 201 seconds (3.35 minutes).
>
> Still, I understand yours, and not his (the return line). I'd never
> noticed random.sample() before, nor tried out extend() on a list. So
> thanks, Bob.
>
> Dick
line with the word in it off the
screen, but I don't really like it to be honest. The getpass module seems to
be the best solution i just don't understand why its not working for me.
Regards
John
On 19 July 2010 16:02, wrote:
> Send Tutor mailing list submissions to
&g
Right thanks for all the help guys, finally got it working. It was because
as previously suggested, I was using Idle instead of the terminal.
Again thanks for all the help
John
___
Tutor maillist - Tutor@python.org
To unsubscribe or change
e:
> m.append(a[I])
> m=map(float,m)
> print m;print len( m )
> >> [1,2,3]
> >> 3
>
> looking forward to seeing your help,
> regards,
> Ahmed
>
>
>
>
> ___
> Tutor maillist - Tutor@python.org
> To unsubscribe or change subscription options:
#shutil.move(src, dst)
shutil.copy(src,dst2)
shutil.move(src,dst3)
##
--
Thanks
Joseph John
http://www.oss101.com/
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
e"
>> #
>> dst2 = "/home/joseph/Projects/Training/Python/example/Two/"
>> dst3 = "/home/joseph/Projects/Training/Python/example/Three/"
>> #
>>
>> #
>> #shutil.move(src, dst)
>> shutil.copy(src,dst2)
>> shutil.move(src,dst3)
>>
>> ##
stop now before I install a bunch of extra
applications that I need only to install one or two Python modules.
I like Python itself. Very powerful. But I guess I'll look for some
other language which provides the features I need without the hassle.
Thanks again for your help.
Cheers,
John
n the list,
Does this word use all the required letters?
If so, print it out."
You can use your first function to make that loop work.
Hope this helps.
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
t;,
line 14359, in CallAfter
assert app is not None, 'No wx.App created yet'
AssertionError: No wx.App created yet
Whereas if I do the same thing from pycrust, nothing happens (that is,
presumably my lambda executes).
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
not do what you want if
you initialise it as something like: o_dict(foo=1, bar=2)
All of which goes to show that you're probably better off looking for
an implementation online, since someone else is bound to have tied off
all the issues :-)
--
John.
___
2009/2/16 Alan Gauld :
> for index, item in [9,8,7,6]:
> print index, item
>
>
> 0 9
> 1 8
> 2 7
> 3 6
You mean:
for index, item in enumerate([9,8,7,6]):
print index, item
:-)
--
John.
___
Tutor maillist - Tutor@python.or
nput('Type "quit" to quit:')
if response.lower() == 'quit':
self.done = True
break
Or even more simply:
raw_input("Hit return to quit.")
self.done = True
It would also be easy to replace this with, say, Tkinter code to put a
"Quit"
a,b=tem.split(' ',1)
> ??? de.write(line[:60]+a+'\n')
> ??? line=b
> except ValueError:pass
So you have a while loop, whose condition depends on line.
This will loop infinitely if the body of the loop does not change the
stamps. Although you will probably need to look at the time
module to get the different codes -- the documentation isn't superbly
organised in this area, I feel.
Anyway, as a start:
>>> import datetime
>>> s = '09:35:23'
>>> datetime.datetime.strptime(s,
2009/3/3 Wayne Watson :
> What is this: d = [ int(x) for x in s.split(":") ]
It's a list comprehension:
http://docs.python.org/tutorial/datastructures.html#list-comprehensions
--
John.
___
Tutor maillist - Tutor@python.org
http
, and board[3].
The error means that you're trying to use square brackets after
something that doesn't support them. It's telling you that 'board' is
a function (as opposed to a list or a dict, for example) and functions
don't support [].
Possibly you're meant t
eems to be 'get out the old curry comb' and go
> letter by letter, between the monitor and the page. Headache time.
I think Brett's suggestion is the most likely one. Look for a line
that starts with:
board =
That's p
sing this code to design a dialog for the larger
> application program, so I don't need to get too fussy about how it ends. I
> just want to see that I've got the elementary widgets place properly.
I didn't notice any call to root.mainloop() in your original code.
Are you
pretty rusty, but I'm guessing that your dialog
may not work if there is no event loop running.
Try this:
root = Tk()
root.after_idle(DialogPrototype, root)
root.mainloop()
See docs here for the after_idle() method:
http://effbot.org/tkinterbook/widget.htm
--
John.
___
return -1
... elif len(x) > len(y):
... return 1
... else:
... return cmp(x,y)
...
>>> words.sort(cmp=wcmp)
>>> words[words.index('a'):words.index('bb')+1]
['a', 'b', 'c', 'd', 'e', 'f'
lease reply me =)
Drop the .py. Just type:
import listen
You can use the __import__ function if you want, but generally you
want the import statement as above. The equivalent to 'import listen'
is:
listen = __import__('listen')
See the tutorial here: http://docs.pytho
I am trying to write a program that displays the string expression "Game
Over", in a console window that remains open.
my code is as follows:
# Game Over console window
print "Game Over"
raw input("\n\nPress the enter key to exit.")
The error I am recieve is "There is an error in your progra
uot;
> raw_input("\n\nPress the enter key to exit.")
>
> In Python 3.x:
>
>print("Game Over")
> input("\n\nPress the enter key to exit.")
>
> -Mark
>
> "John Jenkinson" wrote in message
> news:58fd32380903222035
2009 at 8:35 PM, John Jenkinson > wrote:
>
>> I am trying to write a program that displays the string expression "Game
>> Over", in a console window that remains open.
>>
>> my code is as follows:
>>
>> # Game Over console window
>
My Code:
# Game Over - Version 2.0
# Demonstrates the use of quotes in strings
print "Program 'Game Over' 2.0"
print \
"""
- --- --- ----
/ ___|/ | / |/ | | ___|
| | / /| | / /| / | | |__
| | _ / ___ | / / |__/ |
On Mon, Mar 23, 2009 at 12:08 AM, John Jenkinson
wrote:
> My Code:
>
> # Game Over - Version 2.0
> # Demonstrates the use of quotes in strings
>
> print "Program
I am using Python 2.4.1. I am using the IDLE process, and I was not saving
as ".py". Thank you, everyone, for your continued help.
On Mon, Mar 23, 2009 at 3:35 AM, Alan Gauld wrote:
>
> "John Jenkinson" wrote
>
> I am trying to write a program that disp
l help?
>>> round(12345, -2)
12300.0
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
would I join those to be a float again?
The easiest way would be to convert decnum1 and decnum2 into strings,
join them together, and then call float() on the result.
e.g.
myfloat = float('%s.%s' % (decnum1, decnum2))
--
John.
___
Tutor maill
0001, 11.6, 12.0]
However, the builtin range() only works with integers. I think there
is a range() function in the python cookbook that will do fractional
step sizes.
But really, there's nothing wrong with your while loop.
--
John.
___
Tuto
help
me for this project.
- John Jenkinson
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
;1', '1', '1', '1', '1', '1', '1'], 'names': ['RA7',
'RA6', 'RA5', '-', 'RA3', 'RA2', 'RA1', 'RA0']}
If regular expressions aren't powerful enough, you could look into a
full-fledged parsing library. There are two I know of: simpleparse
and pyparsing. SimpleParse works well if you're familiar with writing
grammars: you write a grammar in the usual style, and simpleparse
makes a parser out of it. pyparsing is more OO.
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
2009/5/22 Eduardo Vieira :
> I will be looking for lines like these:
> Lesson Text: Acts 5:15-20, 25; 10:12; John 3:16; Psalm 23
>
> So, references in different chapters are separated by a semicolon. My
> main challenge would be make the program guess that 10:12 refers to
> the
2009/5/26 Eduardo Vieira :
> Now, a little farther on the topic of a Bible database. I'm not sure
> how I should proceed. I don't really have the db file I need, I will
> have to generate it somehow, from a bible software, because the
> version I want is for Portuguese. I have found a bible in sql,
Hello, I am trying to create a class to hold and reference things similar to
matlab's structure.
## A class definition to hold things
class stuff(object):
""" holds stuff """
def __init__():
pass
@classmethod
def items(cls):
stuff = []
for i in cls.__dict__
n)
(oh, there is a third source for python: MacPorts. Are you using macports?)
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
sure you could find many discussions
on this topic in the list archives.
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
2009/6/23 Alan Gauld :
> Interesting! How is a NaN stored in Python?
> ie. How do you get to the point of having one in the first place?
Well, you can do this:
>>> float('nan')
nan
(try float('inf') too)
--
John.
_
Thanks everyone, all of this feedback is valuable!
--
View this message in context:
http://www.nabble.com/creating-a-dict-like-class---asigning-variables...-this-one-may-take-some-thought--%29-tp23759398p24218879.html
Sent from the Python - tutor mailing list archive at Nabble.com.
__
spir wrote:
>
>
> What you're looking for is a dictionary...
> s = {"cheese":"Brie", "country":"France", ...}
>
> Or maybe a kind of object type that works ~ like a dict, but with object
> syntax (get rid of {} and "" for keys). Example:
>
> class Stuff(object):
> def __iter__(self):
>
Here's a function I wrote to calculate hourly averages:
It seems a bit slow, however... any thoughts on how to improve it?
def calc_hravg(X):
"""Calculates hourly average from input data"""
X_hr = []
minX = X[:,0].min()
hr = dt.datetime(*minX.timetuple()[0:4])
while hr
points in the data.
As for your comment regarding the invariant... would it be:
while hr q:
NOT
while hr not q:
The latter makes more sense to me, but I'm not familiar with this
approach...
Thanks,
john
Bob Gailer wrote:
>
> John [H2O] wrote:
>> Here's a function I wro
Alan Gauld wrote:
>
>
> I assume there is a good reason to use a numpy array instead of
> a regular list? ie You need a numpy array elsewhere in the code?
> I've never used numpy bt there is a possibility that array access
> is slower than list access, but I have no idea. It just adds an extra
Sanders,
The problem is I don't want date, I want the date AND hour, just not
minutes.
As for the comparison, in numpy here's what happens when I change the way I
construct the where statements:
--> 196 ind = np.where( (t1 < Y[:,0] < t2) ) #same result
with/without inner parens
197
//www.crummy.com/cgi-bin/msm/map.cgi/ASCII%2C+Dammit
--
John Krukoff
Land Title Guarantee Company
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
For the time being, I would like to be removed from the Tutor Mailing List
for Python Users.
Thanks,
- John Jenkinson
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
e that's what your method returns.
What you need to do is put an actual function in there, instead of a
function call.
Here's a toy example:
>>> def say_hello():
... print 'Hello world!'
...
>>> myDict = { 1:say_hello }
Can someone please let me know how to read a file one record at a time (just
say fixed block for now - see small example below) and assign columns to
fields. Then reference the field names with if-then-else logic.
Sample Fixed Block File:
John98762
John82634
John11234
Thank you.
John Filben
-toplevel-
os.removedirs("DAF")
File "/home/ertlj/ertljVersion/lib/python2.3/os.py", line 167, in
removedirs
rmdir(name)
OSError: [Errno 17] File exists: 'DAF'
Thanks,
John Ertl
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
...but the
straight forward path might be the best.
Thanks,
John Ertl
-Original Message-
From: Jason Child [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 16, 2004 12:36
Cc: [EMAIL PROTECTED]
Subject: Re: [Tutor] removedirs ?
Ertl, John wrote:
>I am trying to remove a directory t
t see it.
$ dtg
2004122212
Thanks,
John Ertl
___
Tutor maillist - [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor
you gave using the new 2.4 Popen? It looks like the older
popen. I can get the older popen to work but not Popen.
Thanks again.
John Ertl
-Original Message-
From: Roger Merchberger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 10:25
To: [EMAIL PROTECTED]
Subject: Re
I am trying to do the usual thing of asking for an input and then checking
it to see if it is valid. If the entry is not valid then ask again until
you get the correct answer.
I have come up with this class. I am trying to make a transition from
procedural programming to object oriented. Is th
Hugo,
That looks like it will work great.
Thanks,
John
-Original Message-
From: Hugo González Monteverde [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 12:41
To: [EMAIL PROTECTED]
Cc: Ertl, John
Subject: Re: [Tutor] Popen? or something else
You may use the 'com
elow there's a space between the function name (main) and the
parenthesis. I don't believe that's supposed to be there.
Good Luck.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ken Stevens
Sent: Thursday, December 23, 2004 09:33
T
their rightful place in a peaceful community!
And I got my Christmas wish when UPS delivered my very own RS/6000!
Happiness is being root on your very own 'nix box!
Merry Solstice Season everybody!
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
sean dwyer wrote:
On Fri, Dec 24, 2004 at 11:01:13AM -0800, John Purser wrote:
And I got my Christmas wish when UPS delivered my very own RS/6000!
Happiness is being root on your very own 'nix box!
I've been lurking so long I almost forgot I could email, but I HAVE to ask,
what
g my setup I like to
document things. Say running "set > Environment-Before.txt" in a nice
safe directory. This will output your current setup so if things get
weird you can at least bring things back to you starting point.
Have a good one,
John Purser
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
environ["USERNAME"]
Sorry, haven't done any CGI stuff with any languages. Can't help you there.
John Purser
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
king, have some
certifications in Unix and Windows. I guess my status would be "involved".
Nice to meet you Jacob.
John Purser
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jacob S.
Sent: Monday, December 27, 2004 13:31
To: tutor@python.org
Subject
Thanks. I've bounced off tkinter several times and have been looking for a
new approach. I'll check it out as soon as I can.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Ron Alvarado
Sent: Wednesday, December 29, 2004 13:52
ere tkdnd.py is located simply type:
pythonw tkdnd.py
and it will work. If you find anything simpler or more bare bones,
please let us know.
John Miller
On Dec 29, 2004, at 4:25 PM, Sean McIlroy <[EMAIL PROTECTED]>
wrote:
I'd like to get some example code showing how to move
widge
I'd like to thank everyone who posted on this thread. I was reading a Korn
shell manual the other day and could not figure out what a "here" document
was. I'm going to take another run at it with this conversation in mind!
Sometimes I can't see the path until I know wh
is in /usr/bin. And that is a hash
mark followed by an exclamation point. This is called "hash bang" in
uningo.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Patric Michael
Sent: Tuesday, January 04, 2005 14:56
To: tutor@python.or
I'm not sure why it fails "of course". How do you know it's failing at the
first slash? Also you might want to look at your .profile file in your home
directory and modify your path there.
John Purser
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PRO
Hi,
I'm using SUSE x86_64 Linux and unable to compile the KInterbasdb interface
for Python. I'm wondering if anyone has it compiled on either a 32bit or
64bit linux. Of course I'm hoping someone is willing to post it. Or tell me
where I might get it. Thanks in
Thanks all I fixed it.
John
On Tuesday 04 January 2005 21:30, John Fabiani wrote:
> Hi,
> I'm using SUSE x86_64 Linux and unable to compile the KInterbasdb interface
> for Python. I'm wondering if anyone has it compiled on either a 32bit or
> 64bit linux. Of course I'
A year of so ago I had a major data conversion project to deal with and used
python, mysql, and the resources listed below to "get 'er done" (my abject
apologies to the non-American readers who will not get that reference). It
was very quick to get real results with this toolse
Great Link. Thanks for the reference!
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of David Rock
Sent: Tuesday, January 11, 2005 19:03
To: tutor@python.org
Subject: Re: [Tutor] Python with MySQL ?
* Danny Yoo <[EMAIL PROTECTED]> [2005-01-11 10:55]:
>
>
Guillermo Fernandez Castellanos wrote:
Is there any "table" frame that I am unaware of? or a way of changing
the type of character so I can have a font with characters of equal
width?
You might see if this does what you want:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/5226
This is my first attempt at programing and my first program sort of did work
hear is the program and if any one can tell me what i did wrong or forgot i
would appreciate it
a = input("Type in the Grose: ")
b = input("type in the Miles: ")
print "a * 0.74 / b is" a*0.74/b
as you can see it sh
log module)
--
John.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on
Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from
the editor ), the threads do their work, halt, and the 'join' command picks
them up. When I run the same script from windows command line ( cmd.exe ),
ter way built into Popen but I could not
figure out the documentation.
Any help would be appreciated.
John
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
That is too easy. I was looking at the examples of how to replace the old
popen and I just did not get it but the page you sent is great.
John
-Original Message-
From: Danny Yoo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 10:34
To: Ertl, John
Cc: tutor@python.org
ut:
Travel: $2300.00
Accommodation: $200.00
Food: $12.50
Food: $19.95
Food: $2.35
Travel: $500.00
and the same in the file 'myExpenses.txt'.
The str() function automatically calls .__str__() on its argument (if
you don't define __str__, it will call a boring default one). And the
p
Very interesting sites. Thank you.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Alan Gauld
Sent: Friday, January 21, 2005 14:33
To: Liam Clarke; Tutor Tutor
Subject: Re: [Tutor] Ooer, OT Lisp
> 1) Anyone here familiar with both?
Yes
I have a threaded python ( Python 2.3.4 ) script that runs perfectly on
Windows 2000 Server SP4 when it is executed from IDLE ( i.e. press 'F5' from
the editor ), the threads do their work, halt, and the 'join' command picks
them up. When I run the same script from windows command line ( cmd.exe ),
e. Then I pulled the data
out via python and wrote it to a new ISAM file. The whole thing took longer
to code that way but boy it sure scaled MUCH better and was much quicker in
the end.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Alan G
explicitly
with the lines?
Thanks,
John Ertl
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
territory for me. I will
take a look at difflib.
Thanks again
John Ertl
Simplified example of a text files.
Sldfsdf
Sdfsdfsf
Sdfsdfsdfwefs
Sdcfasdsgerg
Vsadgfasgdbgdfgsdf
-Beginning flag
This
Text
Should be
The
Same in the other file.
-Ending flag
Sdfsdfsdfsd
Sdfsdfsdfasd
Sdfsadfsdf
Sdfsadfasdf
Thanks,
So simple...DAA just do an equivalency on the list...no need to do sets
or step through each line.
John
-Original Message-
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 29, 2005 06:05
Cc: Tutor@python.org
Subject: Re: [Tutor] Diffing two files.
OK
s and rolled them into one.
That's when I came across Python. Never looked back.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Liam Clarke
Sent: Wednesday, February 02, 2005 15:18
To: Tutor Tutor
Subject: [Tutor] Are you allowed to sh
print value
print tracebak
In the log file I get this:
exceptions.SystemError
error return without
exception set
How do I get the actual
traceback so I can read it?
Thanks,
John Ertl
___
Tutor maillist - Tutor
Danny,
That is great...every time I have a problem someone has already solved
it...the other problem is finding that solution...Thanks again.
John Ertl
-Original Message-
From: Danny Yoo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005 10:39
To: Ertl, John
Cc: 'tutor@pytho
Thanks for the tip.
John Purser
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Michael Dunn
Sent: Thursday, February 24, 2005 14:43
To: tutor@python.org
Subject: [Tutor] Reading Tutor with gmail: monospace fonts
Hi all,
This is slightly off topic
a python 2.3 noob asks:
# I have some lists
GameLogic.varList0=[1,1,1,1]
GameLogic.varList1=[1,1,1,1]
GameLogic.varList3=[1,1,1,1]
# I want to change specific list elements
GameLogic.varList0[2]=0
print GameLogic.varList0
[1,1,0,1]
# But I want the assignment
# to be based on variables
LIST=1
PO
a HTML / Java
script issue.
Thanks,
John Ertl
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Liam,
Thanks for the code chunk and the advice. Java script here I come.
John Ertl
-Original Message-
From: Liam Clarke [mailto:[EMAIL PROTECTED]
Sent: Monday, February 28, 2005 13:27
To: Tutor Tutor
Subject: Re: [Tutor] Python and a web image map
I would say it's best done
tkMessageBox.showerror('Error', '%s: File not found!' % prog)
return
args = filter(None, [arg1, arg2, arg3])
os.system(' '.join([prog] + args))
Button(tk, text='Run', command=runProgram).grid()
tk.mainloop()
---
item):
bisect.insort(self.queue, item)
# usage
queue = PriorityQueue(0)
queue.put((2, "second"))
queue.put((1, "first"))
queue.put((3, "third"))
priority, value = queue.get()
--
John.
___
Tutor maillist - Tutor@python.org
http
Try c:\\my documents\\memo.txt
John
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Dave S
Sent: Tuesday, March 08, 2005 14:24
To: Python Tutor
Subject: [Tutor] Acessing files in Windows 2000
I have a script that converts data relating to my work.
It
I agree with a previous poster, check your path. I think either the path
doesn't exist or you don't have permission to get to it.
John
-Original Message-
From: Dave S [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 08, 2005 14:50
To: [EMAIL PROTECTED]
Cc: 'Python Tut
101 - 200 of 1089 matches
Mail list logo