[Tutor] Can I use TKInter and Pygame together?

2005-11-12 Thread Nathan Pinno
Hey all,   Can I use Pygame and TKInter together in the same application? I want to use TKInter for the message boxes, and Pygame for the actual game interface, but is this possible?   Nathan Pinno ___ Tutor maillist - Tutor@python.org http

[Tutor] Do I have to initialize TKInter before I can use it?

2005-11-14 Thread Nathan Pinno
Hey all,   Do I have to initialize TKInter before I can use it, and if so, how would I go about doing that?   Thanks, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-14 Thread Nathan Pinno
John and all,   I am having problems. The latest error message I got was: Traceback (most recent call last):  File "D:\Python24\hockey.py", line 19, in -toplevel-    tkMessageBox.showinfo("Hockey",NameError: name 'tkMessageBox' is not defined   What do I hav

[Tutor] How do I display a changing thing in text?

2005-11-14 Thread Nathan Pinno
How do I display a changing thing (i.e.. the score of the game) in text? I think it has something to do with this key: %, but I forget how to do it. Can someone show me how to do it again?   Thanks, Nathan Pinno ___ Tutor maillist - Tutor

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-14 Thread Nathan Pinno
John, I learned it from the docs on pythonware.com - the introduction to TKInter - Standard Dialogs. Since it doesn't exist, how can I show a info box before the main part of my program? Nathan Date: Tue, 15 Nov 2005 14:54:15 +1300 From: John Fouhy <[EMAIL PROTECTED]> Subject: Re: [

Re: [Tutor] How do I display a changing thing in text?

2005-11-14 Thread Nathan Pinno
Hugo and all, So in order to write what I wanted the correct code would be: "Computer = %1.0d Player = %1.0d" (a,b) Am I correct or is this wrong? Nathan Pinno -Original Message- From: Hugo González Monteverde [mailto:[EMAIL PROTECTED] Sent: November 14, 2005 8:27 PM To: Na

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-14 Thread Nathan Pinno
_ BaseWidget._setup(self, master, cnf) File "D:\Python24\lib\lib-tk\Tkinter.py", line 1840, in _setup self.tk = master.tk AttributeError: 'str' object has no attribute 'tk' What does this mean, and how can I get it working? Nathan -Original Message- F

Re: [Tutor] Do I have to initialize TKInter before I can use it?

2005-11-15 Thread Nathan Pinno
Albertito and all, It worked! Thanks again! Thanks for all the help! Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 -Original Message-

[Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-11-27 Thread Nathan Pinno
site = raw_input("Site: ") if sitelist.has_key(site): del sitelist[site] else: print site," was not found."   def print_login_info():    print "Login Info"    for site in sitelist.keys():    print "Site: ",site," \tID Pass

Re: [Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-11-29 Thread Nathan Pinno
Hey Danny and all, Alberto told me that there was a password entry box in TKInter. Can anyone tell me about that, please? Thanks, Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter3

[Tutor] How does pickle save files?

2005-11-30 Thread Nathan Pinno
Hey all,   In what format does pickle save files as? I mean it is .txt, .dat, or some other way?   Thanks Nathan Pinno, Owner/operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 1990

Re: [Tutor] Is it a good idea to use TKInter to change my password program into a GUI?

2005-12-02 Thread Nathan Pinno
I like the Toolkit, is there anywhere where there is a how to use it?   Thanks, Nathan Pinno, Co-owner/co-operator of The Web Surfer's Store. http://www.the-web-surfers-store.com/ MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705     From:

[Tutor] Does anyone have any experience with ezPyCrypto?

2005-12-02 Thread Nathan Pinno
Does anyone have any experience with ezPyCrypto? If so, can you please tell me whether or not I can use it to encrypt dictionaries (i.e. user:password or site:username password for examples)?   Thanks, Nathan Pinno, Co-owner/co-operator of The Web Surfer's Store. http://www.the-web-su

[Tutor] Is this a good idea to improve my currency program?

2005-12-14 Thread Nathan Pinno
?   Thanks Nathan Pinno, MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705   ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] How do I fix this error so that my exchange rates program will work?

2005-12-14 Thread Nathan Pinno
currency."    print "5. Update exchange rates."    print "9. Save and Exit"   def exchange_update():    print "1. Update Canadian to US rate."    print "2. Update US to Canadian rate."    print "3. Update Canadian to Euro rate."    print

[Tutor] How do I fix this StopIteration error?

2005-12-15 Thread Nathan Pinno
7;) # create new empty file    store.close()   When I ran the program, I got this: The Currency Exchange ProgramBy Nathan Pinno   Traceback (most recent call last):  File "D:\Python24\exchange.py", line 45, in -toplevel-    load_rates(rates)  File "D:\Python24\exchange.py",

[Tutor] How do I fix this IndexError?

2005-12-16 Thread Nathan Pinno
ickle.dump(conv,rate) store.close() def load_rates(exch): store = open('exch.txt','r') exch = pickle.load(store) store.close() And here is the latest error: The Currency Exchange Program By Nathan Pinno Traceback (most recent call last): File "D:\Py

Re: [Tutor] How do I fix this IndexError?

2005-12-16 Thread Nathan Pinno
Danny, 'conv' is for the name of the conversion [i.e 'can_us'] and rate is for the conversion rate [i.e. 0.80276] Thanks, Nathan Pinno, MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 -Original Message- From: Dann

[Tutor] How do I fix this Invalid Mode?

2005-12-17 Thread Nathan Pinno
Here is the latest error: The Currency Exchange ProgramBy Nathan Pinno   Traceback (most recent call last):  File "D:\Python24\exchange.py", line 27, in -toplevel-    store = open('exch.txt', 'b')#loadIOError: invalid mode: b   and the latest code:

[Tutor] How do I fix this IndexError?

2005-12-20 Thread Nathan Pinno
Here is the error: The Currency Exchange ProgramBy Nathan Pinno   Traceback (most recent call last):  File "D:\Python24\exchange.py", line 28, in -toplevel-    exch = pickle.load(store)  File "D:\Python24\lib\pickle.py", line 1390, in load    return Unpickler(f

Re: [Tutor] How do I fix this IndexError?

2005-12-20 Thread Nathan Pinno
Simon and all, What would you recommend? I don't know what I should code, because I haven't coded anything that loads a file. Thanks, Nathan Pinno MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 -Original Message- From: Si

Re: [Tutor] How do I fix this IndexError?

2005-12-20 Thread Nathan Pinno
Thanks Simon! It worked like a charm! All I have to do now is change it into GUI format, and then use py2exe to create an executable file. Thanks for all the help! Nathan Pinno MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 AIM: f3mighty ICQ: 199020705 -Original

[Tutor] What's the invalid syntax?

2006-04-05 Thread Nathan Pinno
Hey all,   What's the invalid syntax in the following code? I tried figuring it out by myself, and I couldn't.   # This program finds the date of Easter Sunday between the years 1900 & 2099.# By Nathan Pinno# Inspired by Programming and Problem Solving with Java, 1st ed., qu

[Tutor] How do I do cubic roots and cubic exponents (and higher roots and exponents) in Python?

2006-05-08 Thread Nathan Pinno
Hi all,   How do I do cubic (and higher) roots and exponents in Python? I already took a look in Python and didn't find anything.   Thanks, Nathan Pinno Web Surfer's Store http://www.websurfstore.ca MSN Messenger: [EMAIL PROTECTED] Yahoo! Messenger: spam_swatter31 ICQ:

[Tutor] How do I create the equivalent of a Java class in Python?

2006-05-13 Thread Nathan Pinno
Hey all,   How do I create the equivalent of a Java class in Python? I've been looking at the reference, and it's been confusing to me at least.   Thanks, Nathan Pinno   ___ Tutor maillist - Tutor@python.org http://mail.python.o

[Tutor] Is this correct syntax for what I want?

2006-06-22 Thread Nathan Pinno
I want to be able to add and subtract from a number in a tuple in a list. Is this the correct syntax?   letterlist[x] = letterlist[x] + amount # for addition   letterlist[x] = letterlist[x] - amount # for subtraction   If this is not correct, what is the correct syntax?   Thanks, Nathan

[Tutor] Needing help with my account tracker program.

2006-06-23 Thread Nathan Pinno
;Amount: "))    accountlist[account] += amount    print account,"\t $",accountlist[account]    else:    print account," was not found."   def withdraw():    print "Withdraw Funds."    account = raw_input("Account: ")    if accountli

Re: [Tutor] Is this correct syntax for what I want?

2006-06-23 Thread Nathan Pinno
The data is account name and 12.50 (example). I want to access the data to add and subtract from it. For example 12.50 - 2.25 = 10.25 10.25 + 4.75 = 15.00 Thanks, Nathan Pinno - Original Message - From: "Alan Gauld" <[EMAIL PROTECTED]> To: "Nathan Pinno"

Re: [Tutor] Is this correct syntax for what I want?

2006-06-24 Thread Nathan Pinno
print account,"\t $",accountlist[account]+"\n" TypeError: unsupported operand type(s) for +: 'float' and 'str' So how do I fix this error? Thanks for the help so far! - Original Message - From: "Alan Gauld" <[EMAIL PROTECTED]> To

Re: [Tutor] Is this correct syntax for what I want?

2006-06-25 Thread Nathan Pinno
Thanks, it works now perfectly! Thanks for all the help! - Original Message - From: "Alan Gauld" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Sunday, June 25, 2006 1:07 AM Subject: Re: [Tutor] Is this correct syntax for what I want?

Re: [Tutor] Is this correct syntax for what I want?

2006-06-25 Thread Nathan Pinno
lename): store = open(filename, 'r') for line in store: account = line.strip() amount = line.next().strip() ac[account] = amount else: store = open(filename, 'w') store.close Thanks. Nathan Pinno - Original

[Tutor] Why doesn't it save the data before exiting?

2006-06-26 Thread Nathan Pinno
    else:    print account," was not found."   def withdraw():    print "Withdraw Funds."    account = raw_input("Account: ")    if accountlist.has_key(account):    amount = float(raw_input("Amount: "))    accountlist[account] -= amount   

Re: [Tutor] Why doesn't it save the data before exiting? CORRECTION

2006-06-26 Thread Nathan Pinno
How do I know? Simple. Next time I load it and ask it to print the list of accounts and how much in each, I only get: Account Info then the menu again, with no info. Nathan Pinno - Original Message - From: "Bob Gailer" <[EMAIL PROTECTED]> To: "Bob Gailer&qu

Re: [Tutor] Why doesn't it save the data before exiting? CORRECTION

2006-06-26 Thread Nathan Pinno
Would it be this line? pickle.dump(ac, store) Would this make it work? ac = pickle.dump(store) Nathan - Original Message - From: "Bob Gailer" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Monday, June 26, 2006 5:33 PM Subject:

[Tutor] Is there a method like this already?

2006-07-24 Thread Nathan Pinno
second date: "))   def calculate_days(year, month, day):    [/code]   Just being curious, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] What's the invalid syntax?

2006-07-24 Thread Nathan Pinno
_input("Enter the 2nd year: "))    m2 = int(raw_input("Enter the 2nd month: "))    d2 = int(raw_input("Enter the 2nd day: "))    date2 = date(y2, m2, d2)    return date2   print "Date Calculator"print "By Nathan Pinno"printwhile 1:    menu()    menu_

Re: [Tutor] What's the invalid syntax?

2006-07-24 Thread Nathan Pinno
Ignore this. I've created too many errors to even begin to solve. - Original Message - From: Nathan Pinno To: Tutor mailing list Sent: Monday, July 24, 2006 7:24 PM Subject: What's the invalid syntax? What's the invalid syntax?   [code]

[Tutor] What's the invalid syntax?

2006-08-23 Thread Nathan Pinno
k = k + 1    elif X < E & Y < N:    print "Go NorthEast"    k = k + 1    else:    print "Congrats! You found the hurkle in", %d1.0, " guesses!" (k)    break    else:

Re: [Tutor] What's the invalid syntax?

2006-08-23 Thread Nathan Pinno
Sorry, but it only showed a text-box with the message "Invalid syntax!", then highlighted the %. HTH, Nathan Pinno - Original Message - From: "Alan Gauld" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list"

[Tutor] How do I make Python read a string character by character?

2006-08-23 Thread Nathan Pinno
Hey all,   How do I make Python read a string character by character?   Thanks, Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What's the invalid syntax?

2006-08-24 Thread Nathan Pinno
I sure did. It was choking because it was the wrong format. - Original Message - From: "Bob Gailer" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: "Tutor mailing list" Sent: Thursday, August 24, 2006 12:56 PM Subject: Re: [Tutor]

Re: [Tutor] e-learning Python (PA)

2006-09-26 Thread Nathan Botts
That might depend on what you consider eLearning. I've found that the "How to Think Like a Computer Scientist" (http://ibiblio.org/obp/thinkCS/python/english2e/html/index.html) online book is a great learning guide. Or are you looking for something more intera

[Tutor] Why is startfile unavailable on my mac?

2006-12-04 Thread Nathan Cain
Why is this unavailable to me? I am trying to open a url in a browser window. If startfile is just not available on the mac, can someone please give me some simple example code that will open http://www.python.org in a safari window? Thank you. **

[Tutor] clicking a javascript link in a browser

2006-12-04 Thread Nathan Cain
There is a link on a pop-up window from a page that I opened with webbrowser.open() the link is: javascript:Events.clearList(); is there a way for python to "click that link"? Thank you. ******* Nathan Cain http://www.Web-Magnets.com Re

[Tutor] Why doesn't it choose a new number each time?

2007-02-13 Thread Nathan Pinno
Hey all, I wrote a rock, paper, scissors game and every time you play without exiting, it chooses the same number. How can I fix this problem? The relative code is below: [code] # -*- coding: cp1252 -*-from random import * print "Welcome to Rock, Paper, or Scissors!"print "

Re: [Tutor] [Tutor} Why doesn't it choose a new number each time?

2007-02-15 Thread Nathan Pinno
GUI stage. Thanks, Nathan > Date: Wed, 14 Feb 2007 17:17:57 +0100> From: "Rikard Bosnjakovic" <[EMAIL > PROTECTED]>> Subject: Re: [Tutor] Why doesn't it choose a new number each > time?> To: tutor@python.org> Message-ID:> <[EMAIL PROTECTED]>>

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Why don't you just use 'commands.getoutput'? -Original Message- From: linuxian iandsd <[EMAIL PROTECTED]> Sent: Sunday, March 16, 2008 3:12 PM To: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() use os.popen("your cmd here") On Sun, Mar 16, 2008 at 8:06 PM, Luk

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Would you mind perhaps show an example running an interactive command like su and show how to send input to the commands waiting propmts? -Original Message- From: linuxian iandsd <[EMAIL PROTECTED]> Sent: Sunday, March 16, 2008 3:17 PM To: tutor@python.org Subject: Re: [Tutor] how to get

Re: [Tutor] how to get response from os.system()

2008-03-16 Thread Nathan McBride
Yup I use the pexpect module for a lot however couldn't get 'pexpect.run' to work with mysqldump piping to gzip -Original Message- From: Jeff Younker <[EMAIL PROTECTED]> Sent: Sunday, March 16, 2008 6:59 PM To: Nathan McBride <[EMAIL PROTECTED]> Cc: tutor@pyt

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh <[EMAIL PROTECTED]> Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride <[EMAIL PROTECTED]> Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi N

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh <[EMAIL PROTECTED]> Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride <[EMAIL PROTECTED]> Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi N

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh <[EMAIL PROTECTED]> Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride <[EMAIL PROTECTED]> Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi N

Re: [Tutor] how to get response from os.system()

2008-03-17 Thread Nathan McBride
That's a great tip I'll have to save than. -Original Message- From: Martin Walsh <[EMAIL PROTECTED]> Sent: Monday, March 17, 2008 9:38 AM To: Nathan McBride <[EMAIL PROTECTED]> Cc: tutor@python.org Subject: Re: [Tutor] how to get response from os.system() Hi N

[Tutor] Maybe advanced pexpect question?

2008-03-22 Thread Nathan McBride
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? nomb ___ Tutor maillist - Tutor@python.org h

Re: [Tutor] Maybe advanced pexpect question?

2008-03-25 Thread Nathan McBride
I'm thinking more along the lines as of running a program, sending tab to get to the field send text to put on the field, tab, send text ? On Sun, 2008-03-23 at 14:00 -0500, mwalsh wrote: > Kent Johnson wrote: > > Nathan McBride wrote: > >> I've used pexpect fo

[Tutor] socket / over network

2008-04-03 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys, I'm pretty tired of the lame backup solution we have at work. Could anyone point me to a (more or less newbieish) example of how to have python open a socket on one box and get data from it, then have another box write to it over the network

Re: [Tutor] socket / over network

2008-04-06 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alan Gauld wrote: > "Nathan McBride" <[EMAIL PROTECTED]> wrote > > Hi Nathan, > > Please don't reply to an existing message to start a new discussion. > It messes up those of us using threaded mail/news readers a

[Tutor] free loop device

2008-05-05 Thread Nathan McBride
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey Guys, I have a program that uses the loop devices. However I originally was finding the free one with: 'losetup -f'. Which returns the next free loop device. :D However, I found that some of the other distros have a version of losetup that does

Re: [Tutor] free loop device

2008-05-05 Thread Nathan McBride
dded it to the end of "/dev/loop_". The only other thing I had to do was put a check in incase there were no used loop devices in which case then it defaults to "/dev/loop0". Works like a charm. :D Nate bob gailer wrote: > Nathan McBride wrote: >> -BEGIN PGP SIGN

[Tutor] Hands-on beginner's project?

2008-06-24 Thread nathan virgil
I'm very new to Python, and (to a slightly lesser extent) programming in general. I'd like to get some experience by practicing simple-yet-functional programs, with a bit of an emphasis on games. The first game I'd like to attempt would be a simple, non-linear story, similar to those choose-your-ad

[Tutor] Script Name/Path Information

2008-07-05 Thread Nathan Farrar
rint self.name print self.path would output: FileInfo.py /home/username ... Thanks! Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Exploring the Standard Library

2008-07-05 Thread Nathan Farrar
I'd like to spend some time exploring the standard library. I'm running python on Ubuntu. How would I find the location of the modules (find / -name "os.py" does not yield results)? Thanks! Nathan ___ Tutor maillist - T

Re: [Tutor] Hands-on beginner's project?

2008-10-02 Thread nathan virgil
Okay, I'm resurrecting this project. I did a little more work on it then what you see here, but that ended up getting accidentally deleted, and I haven't done anything with Python since. I'm running into one problem already, and I haven't really added any extra code. In the content (at this point,

Re: [Tutor] Hands-on beginner's project?

2008-10-03 Thread nathan virgil
t; variable name > doesn't exist in the current namespace, so it can't be compared to start. > It looks like you wanted room = start. > > On 10/2/08, nathan virgil <[EMAIL PROTECTED]> wrote: > >> Okay, I'm resurrecting this project. I did a little more wo

Re: [Tutor] Finding the "streaks" in heads/tails list

2008-10-03 Thread nathan virgil
You need to store the count before resetting it since you want > to know the largest value of count over the list. Or at least keep a > separate max variable that you update if count > max. > Fairly easy: if Cur_Count > Max_Count: Max_Count = Cur_Count See? Just two extra lines of code. _

Re: [Tutor] Hands-on beginner's project?

2008-10-03 Thread nathan virgil
On Fri, Oct 3, 2008 at 9:19 AM, David <[EMAIL PROTECTED]> wrote: > > Okay, I'm resurrecting this project. > Where is this project code? > Right here. The content is going to eventually go through some drastic changes, but what's here should be good enough for testing.

Re: [Tutor] Hands-on beginner's project?

2008-10-03 Thread nathan virgil
On Fri, Oct 3, 2008 at 10:02 AM, Luke Paireepinart <[EMAIL PROTECTED]>wrote: > On Fri, Oct 3, 2008 at 8:50 AM, nathan virgil <[EMAIL PROTECTED]> > wrote: > > > > > > On Fri, Oct 3, 2008 at 9:19 AM, David <[EMAIL PROTECTED]> wrote: > >> > &

Re: [Tutor] Hands-on beginner's project?

2008-10-03 Thread nathan virgil
On Fri, Oct 3, 2008 at 10:24 AM, nathan virgil <[EMAIL PROTECTED]>wrote: > > > On Fri, Oct 3, 2008 at 10:02 AM, Luke Paireepinart <[EMAIL PROTECTED] > > wrote: > >> On Fri, Oct 3, 2008 at 8:50 AM, nathan virgil <[EMAIL PROTECTED]> >> wrote: >>

[Tutor] Creating sub-menus?

2008-12-30 Thread nathan virgil
I was reading the Non-Programmer's Tutorial for Python, and became really proud of myself when I realized I could create a menu for functions. I decided to try to take this one step further and see if I could create not just a menu, but a menu with sub-menus, too! Ultimately, the idea I came up wit

Re: [Tutor] Creating sub-menus?

2008-12-31 Thread nathan virgil
Okay, so I changed line 84 from: current_menu to: choice = current_menu, and the menu prtion seems to work fine. Only problem now is, once I select a formula, it repeats that function over and over again, never going back to a menu. Should I just add something like: choice = current_menu to ea

[Tutor] problem with code

2015-08-20 Thread Nathan Clark
I have written a basic program out of python and it is not functioning, please could you proof read my code and tell me how to fix it.It is in python 3.3 time=int(input("How long on average do you spend on the computer per day?") (print("that seems reasonable")) if time<=2 else print ("get a life"

Re: [Tutor] problem with code

2015-09-01 Thread Nathan Clark
15 at 4:08 PM, Job wrote: > #i would do it this way in python2 > #maybe you can use as reference > > time = int(raw_input('x')) > > If time => 2: > print 'y' > else: > print 'z' > > Good luck, > > Job > > > On

Re: [Tutor] Squaring every digit in number

2015-11-21 Thread Nathan Hilterbrand
lueError: return 0 The "str(int(num))" could be shortened to "str(num)", also, but I liked being able to accept any argument that could be converted to an int, and also raising the ValueError before looping . Have fun at codewars Nathan Hilterbrand

[Tutor] Python trouble

2015-12-29 Thread Nathan Clark
This is a fibonnaci sequence generator, the colon causes a syntax error #set variables num_1 = 1 num_2 = 2 count = 0 terms = int(input("How many terms of the fibonnaci sequence would you like?") #function while terms != count : num_3 =num_1+num_2 print (num_3) num_1=num_2 num_2

[Tutor] New Python 3.3.2 Install Fails to Start-Up

2013-07-10 Thread Nathan Schlaffer
please help me? Second, I tried to run my Python programs today via IDLE but when I checked the Edit Menu I couldn't find a Run Menu to execute or run my program. How do I run a program once I have written the code in IDLE? Sincerely, Nathan Schlaffer E-mail: natha

[Tutor] Full screen mode

2014-10-21 Thread Nathan Spencer
Hi there, I'm running python on Scientific Linux. The problem is that I'm permanently stuck in full screen mode. Exiting out of that mode (via F11) doesn't do anything. Do you have any suggestions? Thanks, Nathan -- Nathaniel J. Spencer, PhD Post-Doctoral Research Associate

[Tutor] Python Bind DNS Zone config

2017-05-03 Thread Nathan D'Elboux
of where i want the domain to be inserted into but i dont know how to structure the syntax of a zone file in a function within I apologise if its basic, i don't necessarily want the answer just given to me but more of a clue of how someone else may structure

Re: [Tutor] Python Bind DNS Zone config

2017-05-04 Thread Nathan D'Elboux
{} statement I need to either escape the opening { after the IN statement as the .format(new_domain)) statement doesnt seem to be detecting i have the {} ready to take the parameter new_domain? Thanks for the link it certainly helped On Wed, May 3, 2017 at 10:24 PM, boB Stepp wrote: &g

[Tutor] Executing "if :" function on terminal

2017-09-05 Thread Nathan Kckaiyer
Dear Tutor, i have just started learning python. I have repeatedly hit a road block on my mac os terminal . Everytime i use the "if :" command i get syntax errors. i do not see any errors on text editor i am following instructions from a book Original input on editor >>> a=2 >>> if a==2 :

[Tutor] Argparse Error

2018-08-12 Thread Nathan Johnson
x64 Based PC Windows 10 Home Version 1803 OS Build 17134.191 Python 3.7.0 x32 Hello I am trying to glitch video files for artistic purposes by using a scrip I found on Reddit (linked below). This is the first time I have tried to use Python and I need some help with an error that I keep getting a

Re: [Tutor] Argparse Error

2018-08-12 Thread Nathan Johnson
erstanding. On Sun, Aug 12, 2018 at 2:45 AM, Alan Gauld via Tutor wrote: > On 12/08/18 00:51, Nathan Johnson wrote: > > > Hello I am trying to glitch video files for artistic purposes by using a > > scrip I found on Reddit (linked below). This is the first time I have > tri

Re: [Tutor] Argparse Error

2018-08-12 Thread Nathan Johnson
PT> python D:\Python\bytsh.py D:\Video\test.mp4 SyntaxError: unexpected character after line continuation character >>> which program should I be running this through? On Sun, Aug 12, 2018 at 12:24 PM, Alan Gauld via Tutor wrote: > On 12/08/18 16:52, Nathan Johnson wrote: >

[Tutor] playing sound files in python

2018-12-07 Thread nathan tech
Hello all! My name is nate, and I am relatively new to this list, relatively being just signed up. I have a question that you would think would be obvious, but alas I have struggled to figure out. How do I play sound files in python. More specificly, I want to play ogg files especially, with

[Tutor] running a game server

2019-01-06 Thread nathan tech
Hello all, Above all I am a game developer and I want to make multi player games. For my first trick I want to make a game that is building related, with a map and such. For the map I was thinking of using a dict and running along those lines. My question is, is python really the way to go for

[Tutor] schedulers

2019-02-28 Thread nathan tech
it in the background... def scheduler():  global tus # tus=time until schedule  while(time.time()>tus):   time.sleep(5)  scheduler() Is that wise? Is that how it should be done? This is a program for windows. Thanks! Nathan ___ Tutor

Re: [Tutor] schedulers

2019-03-01 Thread nathan tech
guys pointing out the floors. :) Thanks again. Nathan On 28/02/2019 23:23, Alan Gauld via Tutor wrote: > On 28/02/2019 14:45, nathan tech wrote: > >> but I'm thinking, should I do this? > No. fOr several reasons... > >> def do_backup >>  # backup code he

[Tutor] Import error, no module named app script

2019-03-21 Thread nathan tech
Hi guys, So I recently begun using Mac to program in python. For one of the modules I am going to be using, it calls app script in order to send commands to voiceover, which is a screen reader for the MAC. The only problem is, it gives an error about no module named appscript. Indeed, when I go i

[Tutor] urlGET information

2019-04-28 Thread Nathan D'Elboux
linux man page equivalent within the wheel that would provide more context? Thanks Nathan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] feedparser in python

2019-04-29 Thread nathan tech
Hello everyone, Most recently, I have started work using feedparser. I noticed, almost straight away, it's a  bit slow. For instance:     url="http://feeds.bbci.co.uk/news/rss.xml";     f1=feedparser.parse(url) On some feeds, this can take a few seconds, on the talk python to me feed, it

Re: [Tutor] feedparser in python

2019-04-29 Thread nathan tech
ppreciated. Thanks Nate On 29/04/2019 08:43, Alan Gauld via Tutor wrote: > On 29/04/2019 01:26, nathan tech wrote: > >> Most recently, I have started work using feedparser. > I've never heard of it let alone used it so there may > be another forum where you can get specific an

[Tutor] don't steel my code Mister user

2019-05-03 Thread nathan tech
Hi there, Hope you like the subject, I was feeling inventive. my question today concerns compilation. I hear this a lot from the communities I hang around in, and it is something I wonder about often. There are tools like py2exe and pyinstaller that are able to compile your python code into .

Re: [Tutor] don't steel my code Mister user

2019-05-04 Thread nathan tech
roducts it would be £5, or $7, and 7 bucks just isn't worth all the effort to make python difficult to hack. Nothing is impossible, but, deterring the average user just for $7? Not worth it. Thanks anyway guys. Nate On 04/05/2019 12:46, Alan Gauld via Tutor wrote: > On 04/05/2019 00:45,

Re: [Tutor] don't steel my code Mister user

2019-05-05 Thread nathan tech
alone 700 bucks, the other is I'm a sucker for helping as many people as I can. Anyway, staying on topic here, I really appreciate all of you taking the time to give me advice and help, thank you very much :) Thanks Nate On 04/05/2019 22:50, Alan Gauld via Tutor wrote: > On 04/05/2019

[Tutor] cython and threads, and feedparser

2019-05-12 Thread nathan tech
Hello! After a day of various attempts yesterday, I managed to get cython installed on my windows 10 machine. Allow me to prefix this by saying, if there is somewhere else I should put this, II'M SORRY! So I ran cython on my python project, and it worked fine, there was one error about an in

[Tutor] tweeting from python

2019-05-26 Thread nathan tech
Hi there, I was wondering if anyone had some tips that might direct me to answers to this problem: I have a program which one downloads to your computer, and you install. Then, I want to add into this program a share button. This share button would send a tweet to your twitter saying, "I am w

[Tutor] is this doable

2019-05-31 Thread nathan tech
Hi there, So for a future project of mine, I was wondering something. Is it possible, in python, to store a running task id in the registry? I might be using the complete wrong terms here, because I'm only used to doing this with a specific language, but here's what I want to do: python mytes

Re: [Tutor] is this doable

2019-06-01 Thread nathan tech
app or through psutil.send_signal()  # exit the program Hope I'm making more sense now, and thank you for the help everyone. Nate On 01/06/2019 04:30, Mats Wichmann wrote: > On 5/31/19 1:41 PM, nathan tech wrote: >> Hi there, >> >> So for a future project of mine, I was wonde

[Tutor] would someone please explain this concept to me

2019-06-04 Thread nathan tech
s. but why does it work? Why does that semi unlink all the variables? Thanks Nathan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

[Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread nathan tech
Thought I addressed this to the list... Aparrently my mail client hates me. Forwarded Message Subject:Re: [Tutor] would someone please explain this concept to me Date: Wed, 5 Jun 2019 02:37:49 +0100 From: nathan tech <mailto:nathan-t...@hotmail.com> To:

Re: [Tutor] Fwd: Re: would someone please explain this concept to me

2019-06-05 Thread nathan tech
mit And later did g.checklimit=7000 Would it change feeds[feed1]["limit"] too? Thanks Nathan On 05/06/2019 19:45, Alan Gauld via Tutor wrote: >> That is why I was going to use g.blank-feed as the template, >> assign that to d["feed 1's link"] then just

<    1   2   3   4   >