Re: sys.path and unicode folder names
Martin v. Löwis wrote: > Nir Aides wrote: >> If few people use file names not in their respective CP_ACP as you say, >> why did Microsoft bother to make Windows XP a unicode OS? > > Because it simplifies their implementation, in the long run. > >> It is because of this situation that people in non-English speaking >> countries prefer to install English Windows XP. After all why should >> they get all messed up with incompatible software? > > I see. Why do these people then refuse to change the code page of > their system (which *is* possible, even in English XP)? > They don't refuse. You assume they actually know about its existence. I think that in most cases they are not aware of that thing. Sometimes they call their 10 year old neighbors to fix their computer if they are tired of seeing garbage on their screen instead of readable characters, but their computer usually crashes under the heavy load of dozens of viruses and spy-ware long before that kid neighbor gets a chance to look at it anyway. >> Python is Broken. > > I agree. Please contribute a patch. > I will do my best. > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: sys.path and unicode folder names
If few people use file names not in their respective CP_ACP as you say, why did Microsoft bother to make Windows XP a unicode OS? It does not make any sense. The existence of such bugs is the source of the problem itself. It is because of this situation that people in non-English speaking countries prefer to install English Windows XP. After all why should they get all messed up with incompatible software? And from my experience a considerable percent of these stay-on-the-safe-side users have their CP_ACP pages setup incorrectly. My software installs per-user Python modules in a sub-folder of the User's Application-Data folder. The software itself resides under Program-Files. The User's Application-Data folder will contain unicode characters if the User's account name contains unicode characters. You can argue that the design is good or wrong or can be altered to work around the problem, but the fact remains: Python is Broken. Martin v. Löwis wrote: > Nir Aides wrote: >> Actually, I already managed to make a Patch for this problem. >> I will post it soon on my website and in this group. >> >> But I find it strange that this problem even exists, and that I could >> not find any workarounds on the Internet. > > Very few people use file names not in their respective CP_ACP (why > do you need such filenames?), and virtually nobody wants to put such > a file name on Python's sys.path (why do you want to? - just rename > the directory and be done). > > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: sys.path and unicode folder names
Actually, I already managed to make a Patch for this problem. I will post it soon on my website and in this group. But I find it strange that this problem even exists, and that I could not find any workarounds on the Internet. Nir Martin v. Löwis wrote: > Nir Aides wrote: >> I can not restrict the name to CP_ACP. >> I am interested in the general case of Unicode. > > So you should implement a patch, and contribute this > to sf.net/projects/python. > > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list
Re: sys.path and unicode folder names
I can not restrict the name to CP_ACP. I am interested in the general case of Unicode. Windows XP is a native Unicode OS. Martin v. Löwis wrote: > Nir Aides wrote: >> Is there a solution or a work around for the sys.path problem with >> unicode folder names on Windows XP? >> >> I need to be able to import modules from a folder with a non-ascii name. > > If the name is restricted to the CP_ACP code page (i.e. more than ASCII, > less then full Unicode), using the "mbcs" encoding should work fine. > > Regards, > Martin -- http://mail.python.org/mailman/listinfo/python-list
sys.path and unicode folder names
Hello, Is there a solution or a work around for the sys.path problem with unicode folder names on Windows XP? I need to be able to import modules from a folder with a non-ascii name. Thanks, Nir -- http://mail.python.org/mailman/listinfo/python-list
Re: Looking for a Python mentor
Hello Len, You should try the #python IRC room. It is always very active and helpful. Nir LenS wrote: > Hello > > Was wandering if there is any place where some one could go to get > mentoring on python coding. I have started coding in python but I am > the only one in the shop using it. So there is no one around to look > over my code give suggestions on improvement, in style, logic, easier > ways of doing things etc. I am not really looking for hand holding as > much mentoring. I have purchased about every python book out and have > a list a mile long on my internet bookmarks. I believe I have a good > grasp of the fundamentals procedurally and I am fighting my way through > OOP. I am more at the stage of trying to pull things together into > programs that perform real world tasks. At one point I thought I saw > some place on one of the web site that did this kind of thing but I > can't find it now. > > Any help or suggestions welcomed > Len Sumnler > -- http://mail.python.org/mailman/listinfo/python-list
tracing crash
Hi, I am facing a strange problem. I will appreciate an explanation and a work around for the problem. Look in the following code paste. It seems that taking a reference to the frame object crashes python in some scripts: # # trace_hell.py # # crashes with spe (stani's python editor) v0.7.3.a # # to see the crash add "import trace_hell; trace_hell.unleash_hell()" as # the first line in spe.py # # 1. The statement that triggers the crash is "g_frame = frame" # import sys g_frame = None def tracer(frame, event, arg): global g_frame g_frame = frame return None def unleash_hell(): sys.settrace(tracer) -- http://mail.python.org/mailman/listinfo/python-list
tkinter and threads
Hello, In Tkinter, is it safe to call widget.after(time, callback) from another thread (other than the gui thread)? Thanks, Nir -- http://mail.python.org/mailman/listinfo/python-list
Tkinter and Windows XP themes (via manifest files)
Hello, How do I make Tkinter use windows XP themes? ordinary root Tkinter windows ignore the manifest file (which is placed by wxPython for the same purpose) but message dialogs popped with tkMessageBox.Message do use the Windows Theme, so it should be possible. Does anyone has a clue? Thanks, Nir -- http://mail.python.org/mailman/listinfo/python-list