[IronPython] IronPython versus Tkinter...

Kurt Harriger kurtharriger at comcast.net
Sun Jun 4 22:11:23 PDT 2006


Sounds like you're just using the wrong tool for the task at hand.
If CPython has what you need and you don't want or need to use .Net then why
not just use CPython?  Sorry, I couldn't help but point that out :).
I agree that it would be nice to be able to use more of the existing python
libraries without additional modification. I had a small issue myself
experimenting with PLY as it apparently depends on md5, but in that case I
it turned out to be rather trivial to replace with the .net implementation.
Although IronPython doesn't support C extensions, perhaps you can use a C#
class to wrap the win32 calls and import that, seems like it could work.  If
all else fails you could use CPython - it's just a bit slower :)

- Kurt


> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Kevin Bjorke
> Sent: Sunday, June 04, 2006 10:12 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython versus Tkinter...
> 
> That is bizarre, considering that Tk works fine under windows. Theu
> underlying purpose of python seems to be subverted by the lack of what
> most folks think of as basic python services, no?
> 
> kb
> 
> -----Original Message-----
> From: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
> Sent: Sunday, June 04, 2006 1:01 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] IronPython versus Tkinter...
> 
> Kevin Bjorke wrote:
> >
> > Any clues on running this under Beta7, or is it currently
> non-functional?
> >
> > I want to be able to run a GUI under both IronPython and Cpython since
> 
> > my app's intent targets two different kinds of host machine.
> >
> > Current behavior:
> >
> > I have a Tkinter app called "smtk" which I call from this shell:
> >
> Tkinter is a C extension "_tkinter.pyd".
> 
> C extensions are not currently supported (nor likely to be supported) by
> 
> IronPython.
> 
> A cross-platform GUI for IronPython/CPython doesn't currently exist -
> perhaps you can build an abstraction layer over the top of your GUI code
> 
> which detects the underlying platform ?
> 
> Michael Foord
> http://www.voidspace.org.uk/python/index.shtml
> 
> > import sys
> >
> > addThesePaths = ['c:\\Python24\\lib',
> >     'c:\\Python24\\lib\\plat-win',
> >     'c:\\Python24\\lib\\lib-tk',
> >     'c:\\Python24',
> >     'c:\\Python24\\lib\\site-packages']
> >
> > for p in addThesePaths:
> >     print "Adding %s" % (p)
> >     sys.path.append(p)
> >
> > import smtk
> >
> > Which works fine in cpython but under IronPython I get:
> >
> > Adding c:\Python24\lib
> > Adding c:\Python24\lib\plat-win
> > Adding c:\Python24\lib\lib-tk
> > Adding c:\Python24
> > Adding c:\Python24\lib\site-packages
> > Traceback (most recent call last):
> >   File e:\devrel\Playpen\kbjorke\python\ipsm.py, line 13, in
> Initialize
> >   File , line 0, in __import__##3
> >   File e:\devrel\Playpen\kbjorke\python\smtk.py, line 3, in Initialize
> >   File , line 0, in __import__##3
> >   File c:\Python24\lib\lib-tk\Tkinter.py, line 38, in Initialize
> >   File , line 0, in __import__##3
> > ImportError: No module named _tkinter
> >
> > Am I missing some important path or step?
> >
> > Thanks
> > KB:
> >
> >
> ------------------------------------------------------------------------
> > This email message is for the sole use of the intended recipient(s)
> > and may contain confidential information.  Any unauthorized review,
> > use, disclosure or distribution is prohibited.  If you are not the
> > intended recipient, please contact the sender by reply email and
> > destroy all copies of the original message.
> >
> ------------------------------------------------------------------------
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > users mailing list
> > users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> 
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the users mailing list