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

serialize a tkinter thing

P: n/a
hi.

i tried to serialize a list of StringVar's, but i got a pickle error.

this got me to thinking that tkinter objects are not picklable (in general).

would somebody confirm and/or give examples?

thanks

macs
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
No reason why they shouldn't be.

-Harlin

Jul 18 '05 #2

P: n/a
I suspect you're right. Tkinter.Variable holds a reference to the tkapp
instance, which doesn't seem likely to be picklable. Imagining that tkapp
instances *were* picklable, unpickling the stringvar would get you a whole new
application toplevel that you didn't want.

You might be able to extend pickle in some clever way to make it work, but it
would probably be easier and less fragile to arrange to pickle something that
is not composed of Tkinter.Variable instances.

Jeff

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

iD8DBQFCWSwtJd01MZaTXX0RAgzwAKCCv/SAH7FrFK8wVIa5nLQ/aICftQCfYgf/
fuvJAgJwxqaBUWyGDeIfGMk=
=5Ro/
-----END PGP SIGNATURE-----

Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.