On 12/05/2014 at 10:53, xxxxxxxx wrote:
My Python plugin includes several modules, and I'm using sys.path.insert (and pop) as described elsewhere to import those modules. I've just discovered, though, that this doesn't seem to work with unicode. As far as I can tell, Python doesn't pass unicode strings to sys.path (on Windows at least - haven't tested mac).
Because the recommended install location for C4D plugins is the user prefs folder, this causes module loading to fail if the user has a username with accented (unicode) characters.
Is there any way around this, or is it a fundamental limitation at this point? Have others run into this? Do people with accented names usually use an ascii-equivalent username (sorry for my American English naivete - yes, I'm leaving the accents out of that word because I can't be bothered with unicode).
On 14/05/2014 at 12:31, xxxxxxxx wrote:
Can you please post a short piece of code how you construct the path?
On 14/05/2014 at 14:52, xxxxxxxx wrote:
base_path = unicode(os.path.dirname(__file__),'utf-8')
lib_path = os.path.join(os.path.dirname(__file__), 'lib')
On 14/05/2014 at 14:55, xxxxxxxx wrote:
Found a few articles that may relate to the issue.
On 15/05/2014 at 02:59, xxxxxxxx wrote:
From the bug-reports you posted it seems really to be in issue, that only seems to be fixed in Python 3.2. I will take a look if there is a workaround for this.