By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,035 Members | 1,984 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,035 IT Pros & Developers. It's quick & easy.

Tkinter + Tcl help

P: n/a
Hello all,
I have a Tcldot package which I am using with Tcl (I source the package
by 'load .....\libtcldot.so.0' command.
Now I want to use this package in Tkinter.
Can anyone suggest me how to do this?
I tried the foll:
root=Tk()
root.tk.eval('load ......\libtcldot.so.0')
root.mainloop()
But I get error this way.
Any suggestions would be the most useful.
Thanks,
Sunita

Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I think you need to write
root.tk.eval('load', '...\\libtcldot.so.0')

When you write
root.tk.eval("x y z")
it's like doing this at the wish/tclsh prompt:
# {x y z}
Not like this:
# x y z
Now, how useful it is to have a command called "x y z", I can't
guess... but tcl would let you do it.

I've also doubled the backslash in your library filename. When using
windows-style paths in string literals, you must either double the
backslashes, or use r'' strings. When you don't, it will often work,
but if the character after the un-doubled backslash is one with special
meaning (including the commonly-seen \r and \t, but also other letters)
then you'll get a pathname and an error that leave you scratching your
head.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCyphLJd01MZaTXX0RAlqFAJ45AvrDg1JXbWTBGvw8pn 2zCNlfqgCgoV3t
EODHDbzmiUM3O9stQWnwkS4=
=QUop
-----END PGP SIGNATURE-----

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.