Quote:
Originally Posted by DiapDealer
In addition to what KevinH said; there have been issues (for a long time) with the calibre OpenWith plugin and Windows and Sigil. The plugin "clears" the environment before launching Sigil (specifically) on Windows. Which means any environment variables (and possibly command-line args) that Sigil may get launched with are stripped beforehand. Perhaps you'd have better luck using the new(ish), built-in Open With feature of calibre.
|
This is the code in the Open With plugin:
Code:
# As of v1.5.3 will no longer use subprocess because it does not work
# for users who have non-ascii library paths
# However we need a special case for Sigil which has issues with C runtime paths
DETACHED_PROCESS = 0x00000008
if external_app_path.lower().endswith('sigil.exe'):
clean_env = dict(os.environ)
del clean_env['PATH']
subprocess.Popen(app_args_list, creationflags=DETACHED_PROCESS, env=clean_env)
That seems to only clear environment variable and the command-line arguments are whatever was put in the configuration.
This change was made in October 2012. That was done because of
problems with the Sigil 0.5.9 beta. If the newer versions of Sigil is not likely to hit the same problem, then I can make the change.