Re: [Tutor] python timers

2011-04-22 Thread Brad Desautels
Hello, my name is Brad and I am a student at Suny Plattsburgh. and Python programming is a course I am taking this semester. I find it a bit of a challenge doing all the chapter programming exercises that are assigned. We are currently in chapter 8 but some of the basics have not completely sunk i

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Steven D'Aprano
Frederick Grose wrote: I misread this sentence in the list description, "While the list is called tutor, anyone, whether novice or expert, can answer questions." .. to include 'ask' as well as answer questions that may be instructive. Well, you can *ask*, but the number of people on this list

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Frederick Grose
On Fri, Apr 22, 2011 at 8:55 PM, Steve Willoughby wrote: > On 22-Apr-11 17:14, Frederick Grose wrote: > >> The particulars are that I've rebuilt a Fedora LiveOS filesystem image >> from a currently running instance (incorporating the filesystem changes >> in the device-mapper overlay into a new b

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 17:14, Frederick Grose wrote: The particulars are that I've rebuilt a Fedora LiveOS filesystem image from a currently running instance (incorporating the filesystem changes in the device-mapper overlay into a new base filesystem image file). Right, so essentially you're talking abo

Re: [Tutor] Reading video streams from Internet

2011-04-22 Thread Steven D'Aprano
Ryan J wrote: Hello Python gurus! I am trying to 1) Read and decode video streams from internet. 2) Store them in a buffer. 3) Eventually convert them into data that can be used in Cycling '74's Jitter. If anyone has any idea how to start with this, that would be great! I have limited experienc

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Steven D'Aprano
Frederick Grose wrote: With Bash, when one needs to halt the current root filesystem, to pivot to a new filesystem, one can copy some of the command files and their dependencies to a temporary file system and execute from that code base. Is there a way to accomplish the same within a Python scri

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Frederick Grose
On Fri, Apr 22, 2011 at 7:59 PM, Steve Willoughby wrote: > On 22-Apr-11 16:54, Frederick Grose wrote: > >> With Bash, when one needs to halt the current root filesystem, to pivot >> to a new filesystem, one can copy some of the command files and their >> dependencies to a temporary file system an

Re: [Tutor] (no subject)

2011-04-22 Thread Steven D'Aprano
Brad Desautels wrote: Ya, I did try to run it and I am getting a syntax error before it runs. Then fix the syntax error. Do you need help understanding the error? If so, please COPY and PASTE the entire error here, do not try to re-type it, specially not from memory. One hint that a lot of

Re: [Tutor] Python trouble

2011-04-22 Thread Steven D'Aprano
Alex Butler wrote: Ok let me try to be more clear. I am trying to write code in the IDLE Python GUI of python 2.7. When I open the new python shell, there is a written header as well as the three >s on the left side. I now those are used as indents and I do not type them in. However, whenever

Re: [Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 16:54, Frederick Grose wrote: With Bash, when one needs to halt the current root filesystem, to pivot to a new filesystem, one can copy some of the command files and their dependencies to a temporary file system and execute from that code base. I'm not sure those words mean what yo

[Tutor] Run a few Python commands from a temporary filesystem when the rootfs is halted

2011-04-22 Thread Frederick Grose
With Bash, when one needs to halt the current root filesystem, to pivot to a new filesystem, one can copy some of the command files and their dependencies to a temporary file system and execute from that code base. Is there a way to accomplish the same within a Python script? Or must I chain Pyth

Re: [Tutor] (no subject)

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 16:03, Brad Desautels wrote: Hi Steve, I am getting my error on main() I think it is possibly be an indentation error It should be easy to check. Make sure "def main():" is all the way to the left, and all the lines under it are the same level as each other but usually indentati

Re: [Tutor] (no subject)

2011-04-22 Thread Brad Desautels
Hi Steve, I am getting my error on main() I think it is possibly be an indentation error -Original Message- From: tutor-bounces+outsideme99=live@python.org [mailto:tutor-bounces+outsideme99=live@python.org] On Behalf Of Steve Willoughby Sent: Friday, April 22, 2011 6:52 PM To: tuto

Re: [Tutor] Python trouble

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 11:52, Alex Butler wrote: Ok let me try to be more clear. I am trying to write code in the IDLE Python GUI of python 2.7. When I open the new python shell, there is a written header as well as the three >s on the left side. I now those are used as indents and I do not type them in. H

Re: [Tutor] (no subject)

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 15:48, Brad Desautels wrote: Ya, I did try to run it and I am getting a syntax error before it runs. and the message said? Where did it point to as the syntax error? ___ Tutor maillist - Tutor@python.org To unsubscribe or change s

Re: [Tutor] (no subject)

2011-04-22 Thread Brad Desautels
Ya, I did try to run it and I am getting a syntax error before it runs. -Original Message- From: tutor-bounces+outsideme99=live@python.org [mailto:tutor-bounces+outsideme99=live@python.org] On Behalf Of R. Alan Monroe Sent: Friday, April 22, 2011 6:38 PM To: tutor@python.org Subje

Re: [Tutor] (no subject)

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 15:37, Brad Desautels wrote: Hello, I am just learning Python 3.0 and I am working on this problem. I need to know what the output would be.Can anybody help What is your question? If you want to see what its output would be... run it and see the output. Is there more to your que

[Tutor] return values function thanks

2011-04-22 Thread Lea Parker
re <90 and score >79: score = B elif score <80 and score >69: score = C elif score <70 and score >59: score = D else: score = F return score # Call the main function main() -- next part -- An HTML a

[Tutor] (no subject)

2011-04-22 Thread Brad Desautels
Hello, I am just learning Python 3.0 and I am working on this problem. I need to know what the output would be. Can anybody help Thanks, Brad class Bozo: def __init__(self, value): print("Creating a Boso from:" , value) self.value = 2 * value def clown(self, x): p

Re: [Tutor] (no subject)

2011-04-22 Thread R. Alan Monroe
> Hello, I am just learning Python 3.0 and I am working on this > problem. I need to know what the output would be. What happened when you ran it on your computer? You _did_ try that, right? Alan ___ Tutor maillist - Tutor@python.org To unsubscribe o

[Tutor] Python trouble

2011-04-22 Thread Alex Butler
Ok let me try to be more clear. I am trying to write code in the IDLE Python GUI of python 2.7. When I open the new python shell, there is a written header as well as the three >s on the left side. I now those are used as indents and I do not type them in. However, whenever I write any type of

[Tutor] Reading video streams from Internet

2011-04-22 Thread Ryan J
Hello Python gurus! I am trying to 1) Read and decode video streams from internet. 2) Store them in a buffer. 3) Eventually convert them into data that can be used in Cycling '74's Jitter. If anyone has any idea how to start with this, that would be great! I have limited experience with Python, b

[Tutor] (no subject)

2011-04-22 Thread Brad Desautels
Hello, I am just learning Python 3.0 and I am working on this problem. I need to know what the output would be. Can anybody help Thanks, Brad class Bozo: def __init__(self, value): print("Creating a Boso from:" , value) self.value = 2 * value def clown(self, x): p

Re: [Tutor] Problem with running Python

2011-04-22 Thread Alan Gauld
"Alex Butler" wrote I am new to programming on Python and am teaching myself. I have figured out some basics of coding, however whenever I try to run the program or check its functionality (Alt + X on my windows) it always comes back saying that "there's an error in your program: invalid sy

Re: [Tutor] Problem with running Python

2011-04-22 Thread Steve Willoughby
On 22-Apr-11 07:13, Alex Butler wrote: Hello all, I am new to programming on Python and am teaching myself. I have figured Hi, Alex, welcome to programming and the Python language. If you want to get the most out of this list, it helps to ask very specific questions, showing what you have tr

[Tutor] Problem with running Python

2011-04-22 Thread Alex Butler
Hello all, I am new to programming on Python and am teaching myself. I have figured out some basics of coding, however whenever I try to run the program or check its functionality (Alt + X on my windows) it always comes back saying that "there's an error in your program: invalid syntax." Howe

Re: [Tutor] return values function

2011-04-22 Thread Alan Gauld
"Lea Parker" wrote Write the following functions in the program: * Calc_average: This function should take five test scores as parameters, and return the average score. Note that you are supposed to write a function to do this not just do it inline. *determine_grade; this function shoul

[Tutor] return values function

2011-04-22 Thread Lea Parker
Hello I am hoping someone can put me on the right track. The code below includes the assignment question at the beginning. I seem to have been able to calculate average ok, but what I can't seem to do is sort it so it will return a grade for each result. Can you give me some advice to h