Kırmızı Şapka

RedHat, Uygulama Kurulumu, Ayarlar vs.

Perşembe, Aralık 17, 2009

Jython, komut satiri giris parametreleri, modul ekleme

PySystemState pySystemState = new PySystemState();
pySystemState.path.append(Py.newString("python/"));
//Burada python dizini altindaki moduller sisteme tanimli hale geitiriliyor
pySystemState.argv.append(Py.newString(pathToInFile+urlId));
//Dikkat argv[0] bos o nedenle argv[1] den basla
Py.setSystemState(pySystemState);
PythonInterpreter python = new PythonInterpreter();

ByteArrayOutputStream outStream = new ByteArrayOutputStream();
python.setOut(outStream);
python.execfile("python/Expedia.py");
String text = outStream.toString();

Etiketler: , ,

Toplam 0 Yorum:

Yorum Gönder

<< Ana Sayfa