phpython Code
a python interpreter written in php
Status: Pre-Alpha
Brought to you by:
francescobianco
--- a/trunk/phpython.php +++ b/trunk/phpython.php @@ -3,30 +3,30 @@ ini_set('display_errors',true); error_reporting(E_ALL); -require_once __DIR__.'/python/python.lang.php'; +## +require_once __DIR__.'/lang/python/python.main.php'; ## class phpython { ## - public static function config($key,$value) { - lang_python::setConfig($key,$value); + public static function set_config($option,$value) { + + ## + lang_python_main::set_config($option,$value); } ## public static function import($file) { - if (file_exists($file)) { - echo '<pre>'; - lang_python::python_execfile($file); - echo '</pre>'; - } else { - die('file not found: '.$file); - } + + ## + lang_python_main::__exec__($file); } ## public static function import_once($file) { - lang_python::python_execfile($file); + + ## + lang_python_main::__exec__($file); } - }