| 1 | initial version |
It seems there are various PTI PSS/e python modules that aren't very friendly with unicode formatted strings (psse_env_manager,dyntools, etc). I never had this issue with Rev 32 and the previous bundled python utilities, but the new version is causing some issues with some of my programs. I believe the issue stems from the new wxPython module that is unicode rather than ascii. Anytime I grab text from any one of my GUI's, it converts the text string to unicode format (ie u"string"). Often, I grab a portion of a string from a GUI to define something like a dynamic channel file name. Any time I even grab a portion of the original text and manipulate it, it still formats it as unicode. So if I specify a file in unicode format in psse_env_manager or dyntools, the packages straight up ignore the text and either do nothing (dyntools) or throw an error (psse_env_manager).
So, what I am wondering is if any of you all have ever dealt with this issue? I feel I have two options, both of which are less than ideal:
str(object.GetValue())) in every single GUI, orAny ideas?
Is it possible to force ASCII/utf-8 encoding in my programs to disable it ever encoding a string as unicode?
Is it possible to build a function to loop through local/global variables and convert any unicode string to a general string?
whit loves you. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.