Resource Menu


RE : run python script from command line
Thanks for your support,

Sorry for my answear a bite late but I was quite busy lately...

It's possible to run some setup at the begining to do so you will have to do something like that.

JyConsole consolePython = new JyConsole();
// load a file 
consolePython.executePythonFile(new File("setup.py"));

// add a variable inside a console consolePython.getPythonInterpreter().set("console", consolePython);

JFrame f = new JFrame("frame title"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(consolePython, BorderLayout.CENTER); f.setSize(600, 400); f.setLocationRelativeTo(null); f.setVisible(true);

posted by Jourdain Sebastien at Apr 19, 2006 4:19 AM