not realise I could
do something like:
key=(x, y)
game_map[key]=bla.
LEarned a lot, so thanks!
Nathan
On 19/08/2019 15:02, Mats Wichmann wrote:
> On 8/18/19 5:55 PM, nathan tech wrote:
>> Hi there,
>>
>> So I am running over some coding ideas in my head for creatin
r(player_x)+":"+str(player_y)
map[key]=default_grid_format
Is this an efficient method compared to 1?
Is it, code wise, sound logic?
I guess I'm just looking for a second opinion from experienced peoples.
thanks everyone.
Nathan
__
/08/2019 23:10, nathan tech wrote:
>
>> import speedtest
> This is not a standard library module so I have no idea
> what it does so obviously there could be magic afoot of
> which I am unaware. But assuming it behaves like most
> Python code...
>
>> def do-test(
:
If the user clicks the button, say, 3 times, will I have three separate
speedtest objects?
or will the python garbage collector clean them up for me so I only have
one, which gets cleaned when do_test returns.
Thanks for the answer in advance.
Nathan
Hi alan,
thanks so much for clearing that up.
Now you've explained it in that way, I understand what it is doing and
how it went wrong.
Thank you so much!
Nathan
On 06/06/2019 00:57, Alan Gauld via Tutor wrote:
> On 05/06/2019 20:47, nathan tech wrote:
>
>> so for exa
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:
t 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
l.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 wondering something.
>>
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
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
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
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 15:35, nathan t
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, nathan tech wr
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
.
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 answers.
> But
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
a 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
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
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 here,
>&g
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 maill
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
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
hon 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:
> > Oka
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
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
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 :
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 <robertvst...@gmail.com&
ace 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 it a
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
5 at 4:08 PM, Job <jobrh2...@gmail.com> 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
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)
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
Psychoacoustics
HU. HU. HU.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
?
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: nathanschlaf...@gmail.com
a single Frame and a loop
that adds a variable number of widgets. Now I just destroy that Frame (and
thus, the widgets it holds), recreate it, and repopulate it.
Which, re-reading this discussion, is probably what you meant by standard
practice.
Thanks for your help!
On Nov 25, 2012 8:10 PM, Nathan
On Nov 25, 2012 6:49 PM, ALAN GAULD alan.ga...@btinternet.com wrote:
CC'ing the list...
Oops, my bad. I forget to hit Reply All.
I know you can use images instead of text with Labels, like you can with
Buttons.
The advantage of a Text widget, in this case, is that you can use both
in the
I'm working on a simple Tarot reading program in Python 2.7, and I'm having
a bit of trouble with some GUI abstract. (Sorry, no code in here.)
As of right now, all of the logic is working, and I can generate Tarot
spreads that tell me, in text, the role of each card position, and what
card is in
24 November 2012, Nathan wrote:
I'm working on a simple Tarot reading program in Python 2.7, and I'm
having
a bit of trouble with some GUI abstract. (Sorry, no code in here.)
As of right now, all of the logic is working, and I can generate Tarot
spreads that tell me, in text, the role
Which edition do you have? My copy mentions nothing about a companion
guide, so my guess is that you don't need it. That said, my copy also
doesn't send me to any sites for the exercises. Everything I need is right
in the book.
On Sep 28, 2012 7:30 AM, Debbie Snowdon dsnow...@carolina.rr.com
I'm using Tkinter for a GUI for a program of mine, and I'm trying to
use radio buttons to select different functions, but it's not working
right at all. Originally, I had something like
class ClassOne(self):
def ___str___(self):
return This is the base class.
class
who can tell me how to unsubscribe the message.
At 2011-06-13 01:13:05,Steven DAprano st...@pearwood.info wrote:
Ryan Strunk wrote:
Hi everyone,
I'm designing a timeline. When the user presses the right arrow, 0.1 is
added to the current position. The user can add events to the timeline,
unsubscribe
在 2011-06-08 07:11:33,Walter Prins wpr...@gmail.com 写道:
Hi,
2011/6/7 Válas Pétersuli...@postafiok.hu
Hi,
let X be a mutable container, such as dict/set/list=bytearray, and Y=X,
When I change X, Y will follow it, having always the same value, although
id(X)!=id(Y).
That's not
,
Nathan Finney.___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Hello All,
I'm attempting to write a simple telnet client. Yes, I've been told that I
should be using twisted to do this. I want to learn to do it myself first,
so that I can fully understand the concepts - then I will scrap it and
switch to using twisted.
When I started, I didn't realize
I haven't been able to find any real examples of pexpect usage, nor
documentation. Just little bits here and there, so I'm kind of
struggling through.
I've got the follow bit of code I'm working with:
def main():
try:
print 'attempting to spawn connection ... '
session =
that pexpect uses a maxread and a
searchwindowsize value, but I'm not sure how to use them.
Any tips? Thanks again.
On Tue, Oct 20, 2009 at 11:26 AM, vince spicer vinces1...@gmail.com wrote:
On Tue, Oct 20, 2009 at 11:11 AM, Nathan Farrar nathan.far...@gmail.com
wrote:
I haven't been able
times), I
want to send a newline character to the session and continue gathering
the output.
Thanks for the help!
Nathan
--
The presence of those seeking the truth is infinitely to be preferred
to the presence of those who think they've found it.
–Terry Pratchett
homework assignment. I was successful in
problem one, but having a hard time with problem two. Any help would be
greatly appreciated!
Regards,
Nathan
Here is the problem:
A wealthy donor has given MIT $500,000 to be used to pay the tuition of one
student every other year until the money runs out
I'm experimenting with OOP using the Critter Caretaker script from Python
Programming for the Absolute Beginner as my basis. I've noticed that a
dictionary/function combo is a great way to handle menus, and so I've
adapted the menu to read as:
selection = raw_input(Choice: )
choices = {0:quit,
On Tue, Feb 24, 2009 at 6:50 PM, Alan Gauld alan.ga...@btinternet.comwrote:
Or you can build the param value into the dictionary:
selection = raw_input(Choice: )
choices = {
0:(quit, None),
1:(crit.talk, Hi there),
2:(crit.eat, Nuts),
3: (crit.play, Soccer)
4: (crit.play, Baseball)}
Erm, it's still not working...
Whenever I try to use the talk method (which reports the mood, and doesn't
take parameters), it says I gave it too many parameters. Maybe it might help
if I posted the code in it's entirety
# Critter Caretaker
# A virtual pet to care for
class
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
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 isub/i-menus, too! Ultimately, the idea I
came up
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 work on it then
what you see here, but that ended up getting accidentally deleted, and I
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.
On Fri, Oct 3, 2008 at 9:19 AM, David [EMAIL PROTECTED] wrote:
Okay, I'm resurrecting this project.
Where is this project code? http://www.linuxcrazy.com
Right here. The content is going to eventually go through some drastic
changes, but what's here should be good enough for testing.
#
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:
Okay, I'm resurrecting this project.
Where is this project code
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:
On Fri, Oct 3, 2008 at 9:19 AM, David [EMAIL PROTECTED] wrote
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
would output:
FileInfo.py
/home/username
... Thanks!
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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 - Tutor@python.org
http
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
-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
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 SIGNED MESSAGE-
Hash: SHA1
Hey Guys,
I have
-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 and
increases the likelihood that your message
-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
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 for a few projects and love it. Basically
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
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 Nathan,
Nathan McBride wrote
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 Nathan,
Nathan McBride wrote
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 Nathan,
Nathan McBride wrote
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 Nathan,
Nathan McBride wrote
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, Luke
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
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@python.org
Subject: Re: [Tutor] how
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hey guys,
I'm practically still a beginner with python. I am working on a program
that originally I used popen for but then switched to pexpect because it
was easier for me to understand.
I was hoping someone could help me get this working:
I do a:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Anyone have any recomendations? Seems like it is giving it the
passwords since it finishes cleanly,
but maybe not like I think?
Nate
Nathan McBride wrote:
Hey guys,
I'm practically still a beginner with python. I am working on a program
Is it possible to write a program that you pipe other programs through
and it measures the MBs per second of data moved? Like I could pipe it
a cp and find out how fast the cp is working?
Thanks,
Nate
___
Tutor maillist - Tutor@python.org
---Original Message---
From: Tiger12506 [EMAIL PROTECTED]
Yuck. Talk about a one shot function! Of course it only reads through the
file once! You only call the function once. Put a second print randline(f)
at the bottom of your script and see what happens :-)
JS
*sigh*
.
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] Content-Type:
text/plain; charset=ISO-8859-1; format=flowed On 2/14/07, Alan
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 by Nathan Pinnoprint
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.
***
Nathan Cain
http://www.Web-Magnets.com
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
Refrigerator Magnets
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
interactive?
-Nathan
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 tutor@python.org
Sent: Thursday, August 24, 2006 12:56 PM
Subject: Re: [Tutor] What's the invalid syntax?
My
E Y
N:
print "Go
North"
k = k + 1
elif X E Y ==
N:
print "Go
East"
k = k + 1
elif X E Y
N:
print "Go
SouthEast"
k = k + 1
elif X E Y
N:
print "Go
NorthEast"
k = k + 1
else:
print "Congrats! You found the hurkle in", %d1.
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@python.org
Sent: Wednesday, August 23, 2006 10:10 PM
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
def calculate_days(year, month,
day): [/code]
Just being curious,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
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_choice() if choice ==
A:
date1() days =
int(raw_input(&q
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]
from datetime
$"+str(accountlist[account]),"\n"
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] -=
am
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 [EMAIL PROTECTED]
Cc: 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: tutor@python.org
Sent: Monday, June 26, 2006 5:33 PM
Subject: Re: [Tutor] Why doesn't
Thanks, it works now perfectly! Thanks for all the help!
- Original Message -
From: Alan Gauld [EMAIL PROTECTED]
To: Nathan Pinno [EMAIL PROTECTED]; tutor@python.org
Sent: Sunday, June 25, 2006 1:07 AM
Subject: Re: [Tutor] Is this correct syntax for what I want?
File C:\Python24
:
account = line.strip()
amount = line.next().strip()
ac[account] = amount
else:
store = open(filename, 'w')
store.close
Thanks.
Nathan Pinno
- Original Message -
From: Alan Gauld [EMAIL PROTECTED]
To: Nathan Pinno [EMAIL PROTECTED]; tutor
$,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: Nathan Pinno [EMAIL PROTECTED]; tutor@python.org
Sent: Saturday, June 24, 2006 3:54 PM
nt = float(raw_input("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
accountlist.has_key(account):
amount =
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 [EMAIL PROTECTED]; tutor@python.org
I want to be able to add and subtract from a number
in a tuple in alist. Is this thecorrect 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 Pinno
1 - 100 of 276 matches
Mail list logo