SIC> PYTHON Python 2.5 (r25:51908, Nov 14 2006, 22:44:28) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] on linux2 Entering interactive session. Type 'Sic()' to go back to SIC. >>> |
The SIC variables are not yet available at this stage, assuming the user may not need them. You have to invoke the .get() method (with no arguments) to import them (see section 2.4 for details):
>>> pysic.get() Importing all SIC variables into Python... ... done. >>> |
SIC> TYPE test.py print "Hello world!" a = 1 a print "a value is", a # This line is a comment for i in xrange(1,4): print i if True: print "True" else: print "False" SIC> PYTHON test.py Hello world! a value is 1 1 2 3 True SIC> |
SIC> SIC VERIFY ON I-SIC, VERIFY is ON SIC> PYTHON test.py >>> print "Hello world!" Hello world! >>> a = 1 >>> a >>> print "a value is", a a value is 1 >>> for i in xrange(1,4): ... print i 1 2 3 >>> if True: ... print "True" ... else: ... print "False" True SIC> |
SIC> TYPE test2.py import sys for i in sys.argv: print i, type(i) SIC> PYTHON test2.py 1 qwerty "ABCD" test2.py <type 'str'> 1 <type 'str'> qwerty <type 'str'> ABCD <type 'str'> SIC> |
SIC> DEFINE DOUBLE A SIC> LET A 1.234 SIC> py test2.py A "A" 'A' test2.py <type 'str'> A <type 'str'> A <type 'str'> 1.234 <type 'str'> SIC> |
SIC> py test2.py /usr/bin E-INTER, Unknown option /USR/BIN for command PYTHON SIC> py test2.py "/usr/bin" test2.py <type 'str'> /usr/bin <type 'str'> SIC> |
SIC> PYTHON print "Hello world!" Hello world! SIC> |
SIC> SIC VERIFY ON I-SIC, VERIFY is ON SIC> PYTHON print "Hello world!" >>> print "Hello world!" Hello world! SIC> |
SIC> PYTHON print 'Hello world?' >>> print 'Helloworld?' Helloworld? SIC> |