diff options
author | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-16 22:41:44 +0200 |
---|---|---|
committer | Stefan Israelsson Tampe <stefan.itampe@gmail.com> | 2018-08-16 22:41:44 +0200 |
commit | 6ae273a9f5a0bbc9c02627287c8b5f958fc2095f (patch) | |
tree | 5c0a05616acb6d9ea70eefcedc33cf65fd83b0d0 /modules/language/python/module/sys.scm | |
parent | 849f5d8389aecbe4c7152061b118f5f6b098b8ba (diff) |
improvements of optparse
Diffstat (limited to 'modules/language/python/module/sys.scm')
-rw-r--r-- | modules/language/python/module/sys.scm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/language/python/module/sys.scm b/modules/language/python/module/sys.scm index ed52118..fe0a4ea 100644 --- a/modules/language/python/module/sys.scm +++ b/modules/language/python/module/sys.scm @@ -2,6 +2,7 @@ #:use-module (rnrs bytevectors) #:use-module (language python exceptions) #:use-module (language python hash) + #:use-module (language python module io) #:use-module (language python try) #:use-module (language python module python) #:use-module (oop pf-objects) @@ -13,7 +14,7 @@ tarcebacklimit platform maxsize hash_info base_prefix)) -(define-syntax stdin +(define-syntax stdin_ (lambda (x) (syntax-case x (set!) ((set! stdin port) @@ -22,7 +23,7 @@ (error "sys.stdin is not a function")) (s #'(current-input-port))))) -(define-syntax stdout +(define-syntax stdout_ (lambda (x) (syntax-case x (set!) ((set! stdin port) @@ -31,7 +32,7 @@ (error "sys.stdin is not a function")) (s #'(current-output-port))))) -(define-syntax stderr +(define-syntax stderr_ (lambda (x) (syntax-case x (set!) ((set! stdin port) @@ -40,6 +41,10 @@ (error "sys.stdin is not a function")) (s #'(current-error-port))))) +(define stdin (FileIO stdin_ )) +(define stderr (FileIO stderr_)) +(define stdout (FileIO stdout_)) + (define __stdin__ stdin) (define __stdout__ stdout) (define __stderr__ stderr) |