From f69061f857ec9e937591f901db4cb6fffa243c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Fri, 7 Feb 2014 17:10:10 +0100 Subject: [PATCH] python: fix path to test file --- extra/python/syntax/syntax-tests.factor | 11 +++++++---- extra/python/syntax/syntax.factor | 2 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/extra/python/syntax/syntax-tests.factor b/extra/python/syntax/syntax-tests.factor index 971cfac737..b821b107bb 100644 --- a/extra/python/syntax/syntax-tests.factor +++ b/extra/python/syntax/syntax-tests.factor @@ -1,6 +1,6 @@ -USING: arrays assocs destructors fry kernel math namespaces python python.ffi -python.objects python.syntax python.tests sequences sets splitting tools.test -unicode.categories ; +USING: arrays assocs destructors fry io.files.temp kernel math namespaces +python python.ffi python.objects python.syntax python.tests sequences sets +splitting tools.test unicode.categories ; IN: python.syntax.tests ! Importing functions @@ -80,7 +80,7 @@ PY-METHODS: file => tell ( self -- n ) ; [ t ] [ - "testfile" >py "wb" >py open + "python-file" temp-file >py "wb" >py open [ tell ] [ fileno ] [ close ] tri [ >factor integer? ] bi@ and ] py-test @@ -147,3 +147,6 @@ PY-METHODS: ArgumentParser => format_help >factor ] with-destructors [ blank? ] trim " " split "badger" swap in? ] py-test + +! Can you pass a callback written in factor to a python function? +PY-FROM: wsgiref.simple_server => make_server ( iface port callback -- httpd ) ; diff --git a/extra/python/syntax/syntax.factor b/extra/python/syntax/syntax.factor index 03818f8ea1..362863a18c 100644 --- a/extra/python/syntax/syntax.factor +++ b/extra/python/syntax/syntax.factor @@ -3,8 +3,6 @@ kernel lexer math namespaces parser python python.ffi python.objects sequences sequences.generalizations vocabs.parser words ; IN: python.syntax -py-initialize -