Difference between revisions of "Plugindirectory"

From PyMOLWiki
Jump to: navigation, search
(Infobox script-repo, some corrections)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Infobox script-repo
<div style="padding: 10px; border: 4px solid red; text-align: center; background-color: #fcc">
|type      = module
This script was superseded by the [[Plugin Manager]] which was introduced in PyMOL
|filename  = plugins/__init__.py
|author    = [[User:Speleo3|Thomas Holder]]
|license  = BSD
== Introduction ==
This page describes how to set up a personal plugin directory, that will automatically install plugins found herein.
It supports single python files as well as directories which contain a __init__.py file.
== Adding Pymol-script-repo to PyMOL search path ==
You should have the '''Pymol-script-repo''' directory added to your Python search path.
In '''Pymol-script-repo''', is located the folder '''plugins''', which holds the plugin to be automatically installed.
We need to import module '''plugins''' (folder '''Pymol-script-repo/plugins''') before the GUI launches. So insert into your [[pymolrc|$HOME/.pymolrc]] file:
<syntaxhighlight lang="python">
# eventually add ~/Pymol-script-repo to sys.path
import sys, os
# load the module
import plugins
=== For windows users ===
# Open notepad
# Paste lines from above
# Save under: '''C:/Users/YOURNAME/pymolrc.pym''' (Set: "Save as type" to "All files")
=== For Ubuntu/Mint users ===
# gedit ~/.pymolrc
# Paste lines from above
# Save and exit

Latest revision as of 10:18, 12 November 2018

This script was superseded by the Plugin Manager which was introduced in PyMOL