Re: [PyMOL] Sessions and Scope

2009-10-02 Thread Warren DeLano
Tsjerk,

Great question with a crummy answer: you can't! 

But this seems like a really good idea, at least for primitives stored
in ordinary built-in Python containers.  Saving class instances would be
problematic, since session files wouldn't necessarily be restorable in
the absence of accompanying class definitions [we do rely upon Python
pickling machinery, and are thus subject to its limitations].

Cheers,
Warren

> -Original Message-
> From: Tsjerk Wassenaar [mailto:tsje...@gmail.com]
> Sent: Friday, October 02, 2009 6:04 AM
> To: pymol-users
> Subject: [PyMOL] Sessions and Scope
> 
> Hi,
> 
> At present I'm setting some variables in the globals()
> dictionary/global scope, but when I save the session, these variables
> are lost. What would be the best way to preserve them? (This question
> may also be interpreted as: what does Pymol write to a session file?).
> 
> Cheers,
> 
> Tsjerk
> 
> --
> Tsjerk A. Wassenaar, Ph.D.
> Junior UD (post-doc)
> Biomolecular NMR, Bijvoet Center
> Utrecht University
> Padualaan 8
> 3584 CH Utrecht
> The Netherlands
> P: +31-30-2539931
> F: +31-30-2537623
> 
>

--
> 
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
your
> developing skills, take BlackBerry mobile applications to market and
stay
> ahead of the curve. Join us from November 9-12, 2009. Register
> now!
> http://p.sf.net/sfu/devconf
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives:
http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> 
> 



--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] Sessions and Scope

2009-10-02 Thread Tsjerk Wassenaar
Hi,

At present I'm setting some variables in the globals()
dictionary/global scope, but when I save the session, these variables
are lost. What would be the best way to preserve them? (This question
may also be interpreted as: what does Pymol write to a session file?).

Cheers,

Tsjerk

-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net