Re: [Tutor] Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-21 Thread Chris Smith
From: Kent Johnson Is it possible that the script is not running as __main__? Add print __name__ to the script and see what it says... It says '__main__'. Here is the end of the output after printing vars() if that helps: '__file__': '/Users/csmith/Desktop/misc python/timeit eg.py', 't': , 'y1'

[Tutor] Re: Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-21 Thread Chris Smith
### def y1(): pass def foo(): from __main__ import y1 pass foo() ### Here is a version of the code, stripped of the timeit code. The above segment exhibits the same symptoms as the previously submitted one. Even though I am running this as "__main__" it behaves as though it is not _

Re: [Tutor] GNUPLOT

2005-04-21 Thread ray007
Hi all I thank you all who have particapted in solving/providing good feedback to this GNUPLOT issue. I have managed to get this to work it was just simply adding the following path to the gp_win32.py file under the site packages: gnuplot_command = r'"C:\Program Files\gp373w32\pgnuplot.exe"' man

Re: [Tutor] GNUPLOT

2005-04-21 Thread dreamz93
Hello, I just ran into a similar problem. Here's what I found: http://sourceforge.net/tracker/index.php?func=detail&aid=416091&group_id=17434&atid=217434 Just follow the instructions on the link and everything should work fine. I think it has to do with emulating the unix pipe not being availabl

Re: [Tutor] trouble setting the environment

2005-04-21 Thread Alan Gauld
> Is this possible? I vaguely remember something about the system env and the > interpreters env being separate after the interpreter starts up. When you execute another process it gets its own environment. When it dies its environment dies with it. You can get round this in your case by forking t

Re: [Tutor] Re: Error Raising

2005-04-21 Thread Alan Gauld
The tutorial is one of the documents, but you should have downloaded all of the documentation for the current version, not just the tutor. Alan G. - Original Message - From: "Joseph Quigley" <[EMAIL PROTECTED]> To: ; Sent: Thursday, April 21, 2005 3:43 PM Subject: [Tutor] Re: Error Rais

Re: [Tutor] Installation Routines (Joseph Quigley)

2005-04-21 Thread Alan Gauld
> Also, there was a project at some point that aimed at making Linux > applications into self-contained "executable folders" (like .app > bundles in Mac OS X). I don't remember the name, but I recall Rox-filer > supports it. Tcl/Tk now comes in such a bundle, it makes installation a breeze and you

Re: [Tutor] How to obfuscate a database password. (fwd)

2005-04-21 Thread Alan Gauld
> I am not necessarily talking about passwords for users but about the > password that is used for connecting to the database. In a compiled > language you would have to look pretty hard in a dll to find where the > password had been encoded. IT would be insanely bad practice to embed the password

Re: [Tutor] Dynamically composing a module name

2005-04-21 Thread Alan Gauld
> Inside of the setup() function, a call to the cgi object determines > the name of the calling application (form1,py ... etc.) and > then imports another module (automatically generated from another > process), always having the same members, composing that auto module > name from the na

RE: [Tutor] trouble setting the environment

2005-04-21 Thread Ertl, John
Kent, Like you allude ...a bit too much "what the heck is that" going on. I will give a few other things a try...I may just have to have the program run and get the info then stop and have the user source the correct .ksh then run another py program. (basically the same thing but manually). Tha

Re: [Tutor] Installation Routines (Joseph Quigley)

2005-04-21 Thread Alan Gauld
> Then again, how many free installers are there for linux? The two most common are Red Hat's Package Manager (rpm) and the GNU apt-get system. But other distros also have install systems and so far as I know they are all free. But OTOH its also much easier to write a Unix installer since it s

Re: [Tutor] trouble setting the environment

2005-04-21 Thread Kent Johnson
Ertl, John wrote: Kent, Good idea except that the environment that needs to be set depends on the answers to some of the input that I get in the Python program. Nothing is ever easy here. Maybe you could write a Python program that asks the questions, then spawns a shell task which sets the corr

Re: [Tutor] TKinter and things over Linux

2005-04-21 Thread Alberto Troiano
Hey all Thanks for all your help. I solved the problem by installing ALL the packages of Red Hat 9.0 so basically I have 5 GB of OS in my HD haha :D I must something you said about the development libraries but I really don't have time to find out which one so I install them all Thanks again an

RE: [Tutor] trouble setting the environment

2005-04-21 Thread Ertl, John
Kent, Good idea except that the environment that needs to be set depends on the answers to some of the input that I get in the Python program. Nothing is ever easy here. Thanks for the ideas. John Ertl -Original Message- From: Kent Johnson [mailto:[EMAIL PROTECTED] Sent: Thursday, Ap

Re: [Tutor] Re: Error Raising

2005-04-21 Thread Kent Johnson
Joseph Quigley wrote: PS. Would the Tutorial included with IDLE be the same as the site's docs? Yes, I think so, though the site docs might be slightly newer, they are updated occasionally. Kent ___ Tutor maillist - Tutor@python.org http://mail.python.

Re: [Tutor] trouble setting the environment

2005-04-21 Thread Kent Johnson
Ertl, John wrote: All, I have program and init I want to "source" a .ksh file to set some environment variables and then use those variables in my program. Is this possible? I vaguely remember something about the system env and the interpreters env being separate after the interpreter starts up. Wh

Re: [Tutor] GNUPLOT

2005-04-21 Thread Kent Johnson
[EMAIL PROTECTED] wrote: Hi I have also now tried this on version 2.4 and w2k.no luck. Anything special with installing gnuplot or just extracting it and running the .exe.. No, nothing special that I remember. This thread on c.l.python has a suggestion at the end that might help: http://grou

[Tutor] Re: Error Raising

2005-04-21 Thread Joseph Quigley
Ahh. I really like the ability to make my own exceptions. This info will help alot. Thanks, Joe PS. Would the Tutorial included with IDLE be the same as the site's docs? The standard (built-in) exceptions are documented here: http://docs.python.org/lib/module-exceptions.html If you don't

Re: [Tutor] GNUPLOT

2005-04-21 Thread Danny Yoo
> Yeah, it looks like Joshua Pollack ran into this issue three years ago: > > http://mail.python.org/pipermail/tutor/2002-September/017579.html > > I'm going through the archive now to see if he was able to resolve the > problem ok. Hi Ray, Yikes, it looks like someone never really answered

Re: [Tutor] GNUPLOT

2005-04-21 Thread Danny Yoo
[Kent] > Strange. This example works for me on Win2K with Python 2.4. [Ray] > > Hoping that someone can help me here. I have been reading about > > gnuplot and it's plotting functionality, so i decided to install this: > > I downloaded the gnuplot windows function and then installed the > > gnu

[Tutor] trouble setting the environment

2005-04-21 Thread Ertl, John
All, I have program and init I want to "source" a .ksh file to set some environment variables and then use those variables in my program. Is this possible? I vaguely remember something about the system env and the interpreters env being separate after the interpreter starts up. For instance if I

Re: [Tutor] Installation Routines (Joseph Quigley)

2005-04-21 Thread Jay Loden
Rpm does in fact have dependency resolution, and rpm-based distributions use a package manager that can download the dependencies and install them for you - urpmi on mandrake, yum or apt4rpm on Fedora and Redhat, Yast on Suse I've used all of these, they are all rpm based, and they all install

Fwd: [Tutor] crash - switching between text window and graphics/gamewindow (high score)

2005-04-21 Thread D. Hartley
Thanks for the encouragement!! I'm going to be completing some further updates today and hope to post a url where anyone can get the whole game and try it out. I made a fall-back version where the game displays not a high score list requiring input in the text window, but only keeps track of the

Re: [Tutor] crash - switching between text window and graphics/gamewindow (high score)

2005-04-21 Thread Alberto Troiano
Hi Sorry about that, I'm using Python 2.3.4 cause when Python 2.4 was released there wasn't libraries like MySQLdb and ReportLab (and I needed those) I agree with Max, the problem is somewhere else but it'll take time (I don't have to do a report but I do have to finish a web-based system over L

Re: [Tutor] crash - switching between text window and graphics/gamewindow (high score)

2005-04-21 Thread Alberto Troiano
Hi Sorry about that, I'm using Python 2.3.4 cause when Python 2.4 was released there wasn't libraries like MySQLdb and ReportLab (and I needed those) I agree with Max, the problem is somewhere else but it'll take time (I don't have to do a report but I do have to finish a web-based system over L

Re: [Tutor] Error Raising (Joseph Q.)

2005-04-21 Thread Kent Johnson
Joseph Quigley wrote: (here I go again?) Where could I find a nice long list of the errors I can raise? (I mean like EOF errors when some one doesn't fill in their name when they're supposed to). The standard (built-in) exceptions are documented here: http://docs.python.org/lib/module-exceptions.

[Tutor] Error Raising (Joseph Q.)

2005-04-21 Thread Joseph Quigley
(here I go again?) Where could I find a nice long list of the errors I can raise? (I mean like EOF errors when some one doesn't fill in their name when they're supposed to). Thanks, Joe ___ Tutor maillist - Tutor@python.org http://mail.python.org/ma

Re: [Tutor] GNUPLOT

2005-04-21 Thread Kent Johnson
Strange. This example works for me on Win2K with Python 2.4. Kent [EMAIL PROTECTED] wrote: Hi Hoping that someone can help me here. I have been reading about gnuplot and it's plotting functionality, so i decided to install this: I downloaded the gnuplot windows function and then installed the gnu

Re: [Tutor] Weird import problem with PythonIDE on Mac (was 'import problem')

2005-04-21 Thread Kent Johnson
Is it possible that the script is not running as __main__? Add print __name__ to the script and see what it says... Kent Chris Smith wrote: On Tuesday, Apr 19, 2005, Lee Cullens wrote: I assume you mean PythonIDE for Python 2.3 (I usually use 2.4 and WingIDE). Here it is (indents screwed up with

[Tutor] GNUPLOT

2005-04-21 Thread ray007
Hi Hoping that someone can help me here. I have been reading about gnuplot and it's plotting functionality, so i decided to install this: I downloaded the gnuplot windows function and then installed the gnuplot.py file using the setut.py and install command all worked. I also installed the numeri