On 5/9/07, Bob Gailer <[EMAIL PROTECTED]> wrote:
[...]
> If you don't have to include it, please consider omitting it.
Considering the OP's domain name, he might not be able to omit it.
--
- Rikard - http://bos.hack.org/cv/
___
Tutor maillist - Tu
Treloar, Nick wrote:
i am tying to buil a
program using child screens
the program is going the make a
random number and the user has to guess it .
so far i have made the gui but how
do i progame it to make the random number
Use the random module. Look it up in the Python doc
i am tying to buil a program using child screens
the program is going the make a random number and the user has to guess it .
so far i have made the gui but how do i progame it to make the random number
This message is intended for the addressee named and may contain privileged
information or
here is my code so far
from Tkinter import*
root = Tk()
root.title("main screen")
root.maxsize(width=350,height=200)
root.minsize(width=350,height=200)
root.resizable(width=YES,height=YES)
def child1():
c1 = Toplevel(root)
c1.guess_ent = Entry(c1, width = 35,)
c1.guess_ent.grid(row = 1
On 09/05/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> try:
> print "The fridge contains %s" %fridge[food_sought]
> except (KeyError):
> print "The fridge does not contain %s"%food_sought
[...]
> Is the same true of Python? Or is ok to use Exception handling like the book
> suggests?
<[EMAIL PROTECTED]> wrote
> fridge={"apple":"A shiny red apple","pear":"a nice ripe
> pear","grapes":"seadless grapes"}
> food_sought="apple"
> fridge_list=fridge.keys();
Not sure what this line is for...
> try:
>print "The fridge contains %s" %fridge[food_sought]
> except (KeyError):
>
2007/5/8, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> I'm working my way through the book "beginning python" and I came across an
> exercise that suggests using Exception trapping to see if a value is in a
> dictionary:
>
> fridge={"apple":"A shiny red apple","pear":"a nice ripe
> pear","grapes":"s
[EMAIL PROTECTED] wrote:
> I'm working my way through the book "beginning python" and I came across an
> exercise that suggests using Exception trapping to see if a value is in a
> dictionary:
>
> fridge={"apple":"A shiny red apple","pear":"a nice ripe
> pear","grapes":"seadless grapes"}
> food_
I'm working my way through the book "beginning python" and I came across an
exercise that suggests using Exception trapping to see if a value is in a
dictionary:
fridge={"apple":"A shiny red apple","pear":"a nice ripe
pear","grapes":"seadless grapes"}
food_sought="apple"
fridge_list=fridge.keys
>> Except that there is a conventional set of names so a
>> better path would be:
>>
>> /usr/local/bin/fileName.py
>That's incredibly helpful. As another Linux noob, would you mind if I
>jump in with 2 follow-up questions:
>
>To continue the example above, for say, Opera and CoolEditor, I'd use
"John Washakie" <[EMAIL PROTECTED]> wrote
>I have a FORTRAN program which reads in unformatted sparse matrix
> data. Rather than rewriting the code in Python, I was hoping there
> is
> a way to call the Fortran program, passing filename variables TO
> Fortran, and returning the data (which is an
"Antonio Diaz" <[EMAIL PROTECTED]> wrote
> I have a project in school and I was wondering if its
> possible to make a python program that uses
> Imaging library to make a GUI of the same functions
> that Imaging has.
Yes thats very possible.
> If its possible to make it in glade.?
I assume
"Alexander Kapshuk" <[EMAIL PROTECTED]> wrote
> I've got an old Toshiba Satellite 110CT laptop with Windows 95
>
> Would I be able to run Python on it?
> If so, what version of Python should I install?
Python 1.5.1 definitely works on Win95. I suspect v2.0 will too.
The 32 bit DOS version wil
"Dave C" <[EMAIL PROTECTED]> wrote
> when you are doing print these two characters keep showing up in
> this book
> "%s" %
>
> What do they do?
Its called string formatting.
%s means insert a string(the s) here.
%d means insert a decimal number(the d) here
There are a whole bunch of other codes
"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 5/6/07, Jason Coggins <[EMAIL PROTECTED]> wrote:
>
>> Is there a way to send a command to the Linux Terminal
>> from inside a Python program?
To be picky you don't send the command to the Terminal
but to the OS
"Jason Coggins" <[EMAIL PROTECTED]> wrote
> I am new to Linux. On Windows the base directory
> is c:\.
Or D:\ or E:\ etc... In other words Windows has many
base directories, one per physical drive.
> What is the base directory for Linux?
In *nix there is only one logical directory structur
"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote
>> I can see how to use it to execute a script of code embedded in the
>> program
>> (that example was provided in the documentation) but I cannot
>> figure out the
>> syntax to use it to run another python program in another file.
>
> Use execfile
super krital wrote:
> Hi need to get this program running for school so my teacher said to use the
> forum etc. Its working fine except its not comparing my guess with the
> result. im only having trouble with the second half or def update_text_count
> can you please help find a solution so my p
Hi,
Where you ever able to get this issue resolved, I've got the same issue?
http://mail.python.org/pipermail/tutor/2007-February/052994.html
Best Regards,
Jason Meiers
Production Monitoring
Pay By Touch
--
101 2nd Street, Suite 1500
S
19 matches
Mail list logo