Re: A beginner's problem...

2004-12-18 Thread Amir Dekel
Mike Meyer wrote: Doing a second import will find the module in sys.modules and not bother looking in the file system. The solution is to reload(module) instead of import module. What if I import using "from module import class"? It seems to me that I can't use reload then, or I just could

Re: A completely silly question

2004-12-17 Thread Amir Dekel
Mike Meyer wrote: Hmm. That tells me he's probably on a Windows box, so my unix solution wouldn't do him much good. Yes, Windows...too bad -- http://mail.python.org/mailman/listinfo/python-list

Re: A completely silly question

2004-12-17 Thread Amir Dekel
Harlin Seritt wrote: Simple, Simple, Simple: Var = raw_input("Some prompting text here: ") Frans Englich wrote: > > See sys.stdin > What I need from the program is to wait for a single character input, something like while(getchar()) in C. All those Python modules don't make much sence to me...

A completely silly question

2004-12-17 Thread Amir Dekel
This must be the silliest question ever: What about user input in Python? (like stdin) Where can I find it? I can't find any references to it in the documentation. Amir -- http://mail.python.org/mailman/listinfo/python-list

Re: Adding paths to sys.path permanently, and another problem...

2004-12-17 Thread Amir Dekel
Jeff Shannon wrote: Judging from this, I think that os.environ['USERPROFILE'] seems like it may do what you want, though os.environ['APPDATA'] might be useful as well. Of course, if you're trying to get something to work cross-platform, things may be more difficult -- but that's because Window

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Amir Dekel wrote: 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Variables" in WinXP system properties

Re: Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Jeff Shannon wrote: Not only can one modify the environment variable PYTHONPATH, but one can also use a .pth file. Under windows, when the interpreter starts up it will search its default sys.path for any files with extension .pth; if it finds any, then it will use each line of those files as a

Adding paths to sys.path permanently, and another problem...

2004-12-16 Thread Amir Dekel
Hi everyone, I have two problems: 1. How can I keep my changes in sys.path after closing the interpreter? 2. os.path.expanduser("~") always gives me "C:\\" instead of my homepath. I have tried to change my homepath in WinXP using set homepath(in command line), and alsaw using the "Environment Var

A beginner's problem...

2004-12-15 Thread Amir Dekel
Hello everyone, First, I have to say that Python is one of the coolest programing languages I have seen. And now for the problem (must be a silly one): When I import a module I have wrote, and then I find bugs, it seems that I can't import it again after a fix it. It always shows the same proble