[python-win32] Issues with tkinter, COM servers and Python 3.x
divelez69
divelez69 at gmail.com
Tue May 19 01:28:25 CEST 2015
Yes, I did. In normal situations the value is a string, but when I call from a COM is bytes.
Sent from Samsung Mobile
<div>-------- Original message --------</div><div>From: Tim Roberts <timr at probo.com> </div><div>Date:05-18-2015 6:02 PM (GMT-05:00) </div><div>To: Python-Win32 List <python-win32 at python.org> </div><div>Subject: Re: [python-win32] Issues with tkinter, COM servers and Python 3.x </div><div>
</div>Diego Vélez Torres wrote:
>
> I finally was able to fix this issue in my code. Thanks for your
> advise. Now I want to share with the community exactly what I did by
> posting the whole "__init__" method of tkinter's "__init__.py" file:
>
> def __init__(self, screenName=None, baseName=None, className='Tk',
> useTk=1, sync=0, use=None):
> ... # Condition added by Diego Velez so 'tkinter' can be called
> from COM Servers. --May 18th, 2015
> if isinstance(baseName, bytes):
> baseName = baseName.decode()
That's very bizarre. Did you print out the value of baseName to see
what it was? I'm wondering if something in the Python COM machinery is
faking os.path.basename and didn't get the memo about strings in Python 3.
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
python-win32 at python.org
https://mail.python.org/mailman/listinfo/python-win32
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20150518/cb0b91d4/attachment.html>
More information about the python-win32
mailing list