Blaesse, Michael wrote:
Hallo,
I have some questions regarding the pythonised COOT. Currently I am
testing the coot-0.5-pre-1-revision-1128-fedora-5-python-gtk2 binaries.
1.) Trying to switch of a molecule from python scripting window, I get
the following error message, regardless with or without “:
coot >> toggle_display_mol ( "0" )
BL WARNING:: Python error!
(Or you attempted to use an invalid guile command...)
Python error:
name 'toggle_display_mol' is not defined
toggle-display-mol is deprecated - using it (usefully) meant that you
needed to know the state beforehand. Use instead
set_mol_displayed(mol, state)
e.g
set_mol_displayed(6,1)
2.) Has somebody already ported the code for redefining keys from
scheme to python?
What would the python equivalent of the following code be?
(define graphics-general-key-press-hook [snip]
That is old style key bindings - and deprecated :)
Use instead
add_key_binding(name, key, func)
We should update the Coot wiki to provide the python equivalents of the
(new-style) scheme key bindings.
Paul.