To make it easier to manage the set of paths you need Python to be able to search, you can add an entry_point to your setup.py and buildout will generate a wrapper file which you can call your script from with all of the same paths as your Grok application. An example from one of my apps for creating a script called 'slurp':<div>
<br></div><div><div> entry_points = """</div><div> [console_scripts]</div><div> haystack-debug = grokcore.startup:interactive_debug_prompt</div><div> haystack-ctl = grokcore.startup:zdaemon_controller</div>
<div> slurp = gsc.searchindexer.slurp:main</div><div><br></div><div> [paste.app_factory]</div><div> main = grokcore.startup:application_factory</div><div> debug = grokcore.startup:debug_application_factory</div>
<div> """</div></div><div><br></div>