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 
<t...@probo.com> </div><div>Date:05-18-2015  6:02 PM  (GMT-05:00) 
</div><div>To: Python-Win32 List <python-win32@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, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to