From: Leo U. <leo...@ya...> - 2006-12-20 01:04:47
|
have you tried the reload function yet? import Thing Thing.doSomething() #change Thing.py src reload(Thing) Thing.doSomething() leouser --- Mike Rogers <mik...@ma...> wrote: > Hi All, > > I'm embedding Jython in a Java servlet and have set > the 'python.path' to include a directory which > contains python scripts I have written and packaged. > > > For example I have a folder "/package" which > contains 'myscript.py' and '__init__.py'. > > My servlet executes some arbitary python script > which imports the module 'myscript'. The first time > this happens 'myscript.py' is compiled to > 'myscript$py.class' which is fine. However, if I > change 'myscript.py' there is no detection of the > new script and I must shutdown and restart the > servlet to reload my changes. > > Is there any simple way around this? > > Thanks > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get > the chance to share your > opinions on IT & business topics through brief > surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |