Hello Bernhard,
Thanks for your email .

It turns out that my file was not called coot.py and I also had a few
"hidden" new-line characters due to a copy paste from your wiki python
key bindings.
Once I named the file coot.py and corrected the python syntax..I see
the following behavior:

At startup I do have windows coot inform me that it read in coot.py.
However the key bindings do not work and do not show up in the User
key bindings listing. Also activating a shortcut gives a "Key 119is
not bound message"

If I now read in the same coot.py using the Menu-Run-Script-select
coot.py. The key-bindings then get registered and show up in the
listing and work just great.


So there is something..maybe in the order the python files are read in
..but having a valid coot.py file didnt add the key bindings at
startup.

 I am wondering how I can avoid reading the key bindings in every time manually.

Thanks
Hari


On Wed, Feb 8, 2012 at 2:57 AM, Bernhard Lohkamp <bernhard.lohk...@ki.se> wrote:
>
> Hi Hari,
>
> python scripts are read in from the following locations (*)(x):
>
> - $HOME/.coot.py   (equivalent to .coot)
> - $HOME/.coot-preferences  (a directory, all script file from here are read)
> - $COOT_PYTHON_EXTRAS_DIR  (a directory which you can specify yourself)
>
> Calculate->Run script should always work. If it doesnt there may be
> something wrong with the script. What does the DOS console tell you.
>
> Hope this helps,
>
> B
>
> (*) on Windows (currently) $HOME is $COOT_HOME which is the directory
> WinCoot is installed in
>
> (x) wonder if this needs a better documentation, some can be found here:
> http://strucbio.biologie.uni-konstanz.de/ccp4wiki/index.php/Coot#Startup_files
>
>
>> Hi recently found myself using coot on windows and was wondering where
>> the user specific key bindings are to be introduced to coot.
>> This was windows 7 and I think it defines the users home directory as
>> C:\Users\user.name\ , but I know that other Windows versions use
>> "C:\Documents and Settings\user.name" as the home.
>> I tried to add my python coot bindings based off Bernhard Lohkamp to
>> both of those locations and they didnt seem to get picked up.
>>
>> I then tried reading in the script bearing the key bindings using
>> Calculate-Runscript- and picking the filename.py . Strangely that
>> didnt work either.
>>
>> When I then copy-pasted the python script directly into the scripting
>> window within coot using Calculate-Scripting-Python and then pasting
>> in the code there. The key bindings did show up and work proving that
>> there were no in-advertant syntax errors like new line charcaters etc
>> that were corrupting the python syntax in the filename.py.
>>
>> Am I correct in that coot windows only supports python scripting and
>> where do I have my key-bindings python scipt so that they are picked
>> up on startup and show up in Extensions-Settings-Key-bindings.
>>
>> Thanks
>>
>> Hari
>
>
>
> --
> ***************************************************
>
> Dr. Bernhard Lohkamp
> Assistant Professor
> Div. Molecular Structural Biology
> Dept. of Medical Biochemistry and Biophysics (MBB)
> Karolinska Institutet
> S-17177 Stockholm
> Sweden
>
> phone: (+46) 08-52487651
> fax:   (+46) 08-327626
> email: bernhard.lohk...@ki.se

Reply via email to