From e3e131afbe52bbc595bd6a1d05b79e05056d3f9f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Feb 2014 18:50:32 +0100 Subject: set globals MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2