Case mismatch on NT
Hoon Yoon
hyoon at bigfoot.com
Fri Jul 16 10:07:22 EDT 1999
More information about the Python-list mailing list
Fri Jul 16 10:07:22 EDT 1999
- Previous message (by thread): [XML-SIG] sgmllib has problems with dots in tag names
- Next message (by thread): Case mismatch on NT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido, The problem here is that both Dialog and dialog comes with pretty standard Python distribution for tk and mfc. I had similar prb with COM and callDll some time ago. If I use the first solution, then I am kinda lost because I don't know what those standard distribution call each other when and where. If I use the second way, then I cannot use either portion of tk (and Dialog.py in Tk is pretty important) or mfc (I am not sure how dialog.py is important, but..). My current thought is that I use sys.path with insert to control the precedence during run time, but it's not an amicable situation. Best solution is I guess standard packages to avoid name confusion like this. Or what I proposed earlier about searching through the whole PYTHONPATH before rasing case mismatch err. Thanks for the reply, Hoon, Guido van Rossum wrote: > > Hoon Yoon <hyoon at bigfoot.com> writes: > > > I realize that this has been discussed before. And you might think the > > solution is os.environ["PYTHONCASEOK"] = "hotdog" but try this one. > > There is dialog.py sitting in pythonwin/.../mfc directory and Dialog.py > > in lib-tk directory. If I have both directory in my Pythonpath, I cannot > > call the one sitting at the second directory with out encountering the > > dreaded "Case Mismatch" error. > > I feel that "Case Mismatch" should only occur after all directories has > > been searched to find the 'right' case import. Not after finding the > > first non-matching one. Is there a way to set environ to do what I want? > > If not, can anyone tell me how to get around this prob or tell me if > > what I am proposing makes sense or not? > > This is intentional -- it prevents people from *relying* on the case > matching to make their program work. (The case sensitivity is there > to make your program fail if you typed "import String" when you meant > "import string".) > > Two workarounds: (1) make a copy of the second one with a different > name, and use that; (2) rearrange your sys.path so that the one you > want to use comes first. Neither might work if you have some library > module that uses one and some other library module that uses the other... > > --Guido van Rossum (home page: http://www.python.org/~guido/) -- ***************************************************************************** S. Hoon Yoon (Quant) Merrill Lynch Equity Trading, yelled at yahoo.com hoon at bigfoot.com(w) "Miracle is always only few standard deviations away, but so is catastrophe." * Expressed opinions are often my own, but NOT my employer's. "I feel like a fugitive from the law of averages." Mauldin ***************************************************************************** -------------- next part -------------- A non-text attachment was scrubbed... Name: vcard.vcf Type: text/x-vcard Size: 202 bytes Desc: Card for Hoon Yoon URL: <http://mail.python.org/pipermail/python-list/attachments/19990716/367f92af/attachment.vcf>
- Previous message (by thread): [XML-SIG] sgmllib has problems with dots in tag names
- Next message (by thread): Case mismatch on NT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list