Support Forums
My Python Journey//\\Q & A - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Python Programming Language (https://www.supportforums.net/forumdisplay.php?fid=32)
+---- Thread: My Python Journey//\\Q & A (/showthread.php?tid=2252)



My Python Journey//\\Q & A - Dingo_Dog - 10-27-2009

Hello SF.net

Thanks to this thread http://www.supportforums.net/showthread.php?tid=194 , I'm now starting to learn Python, mind you I'm still a beginner, I have had no experience with programming before, and so of course I'll have a few problems, and so I'll ask for help. I'm a fast learner, so I hope no one thinks I'm a skid that's too lazy to do anything.

That's why I've started this thread, so instead of starting a new thread every time I get an error, or I'm stuck somewhere, I'll just post in this 1 thread here asking and hopefully some people can help me.

OK with the intro done, I'm going to go ahead and ask my first question.

How do I execute files? I copied the source from here http://www.supportforums.net/showthread.php?tid=1856 (The roulette game) And pasted into the notepad-alike window and saved the file in C:\Python26 as Poker.py. I fired up shell (or I think I did) and I typed in
Quote:execfile("Poker.py")
I'm getting this error. Here are two pics of me trying to execute it in 1 computer, and the second pic on the 2nd computer. I don't know what I'm doing wrong.

After I get this settled out, I hope that the rest of my python experience becomes a whole lot smoother. Thumbsup

PIC 1

PIC 2




RE: My Python Journey//\\Q & A - L0iz - 10-28-2009

The script you tried has some strange ASCII coding issues.
Try another script, it should work.


RE: My Python Journey//\\Q & A - Spl3en - 10-28-2009

I've looked into this python code, this is not really good coded ... You should try an other if you want to learn.
Quote:The script you tried has some strange ASCII coding issues.
QFT


RE: My Python Journey//\\Q & A - L0iz - 10-28-2009

(10-28-2009, 01:55 PM)Spl3en Wrote: I've looked into this python code, this is not really good coded ... You should try an other if you want to learn.QFT

Try ti run it, it demands a UTF-8 encoding. Roflmao Dunno why


RE: My Python Journey//\\Q & A - Yoshi - 10-29-2009

You could use the example in the tut that your following, that will work fine.