Menu

[r51]: / trunk / phpython.php  Maximize  Restore  History

Download this file

33 lines (26 with data), 552 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
xdebug_disable();
ini_set('display_errors',true);
error_reporting(E_ALL);
require_once __DIR__.'/python/python.lang.php';
##
class phpython {
##
public static function config($key,$value) {
lang_python::setConfig($key,$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);
}
}
##
public static function import_once($file) {
lang_python::python_execfile($file);
}
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.