diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-02-14 18:50:32 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-02-14 18:50:32 +0100 |
commit | e3e131afbe52bbc595bd6a1d05b79e05056d3f9f (patch) | |
tree | 42084482b9c0ca17eb3c5d6acbbe8884c562fdb8 /src/__main__.py | |
parent | use correct cache (diff) | |
download | blueshift-e3e131afbe52bbc595bd6a1d05b79e05056d3f9f.tar.gz blueshift-e3e131afbe52bbc595bd6a1d05b79e05056d3f9f.tar.bz2 blueshift-e3e131afbe52bbc595bd6a1d05b79e05056d3f9f.tar.xz |
set globals
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/__main__.py')
-rwxr-xr-x | src/__main__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/__main__.py b/src/__main__.py index 0954993..c3c1924 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -33,6 +33,8 @@ sigmoid(None, None, None) clip() +global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result + ## Load extension and configurations via ponysayrc for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/etc/%rc'): file = file.replace('%', 'blueshift') @@ -49,7 +51,7 @@ for file in ('$XDG_CONFIG_HOME/%/%rc', '$HOME/.config/%/%rc', '$HOME/.%rc', '/et with open(file, 'rb') as script: code = script.read().decode('utf8', 'error') + '\n' code = compile(code, file, 'exec') - exec(code) + exec(code, globals) break |