From: Jamie C. <jca...@we...> - 2013-03-07 18:45:40
|
On 07/Mar/2013 09:57 Chris Nighswonger <cni...@fo...> wrote .. > Hi all, > > I'm attempting to use Inline::Python in a webmin module. > > I can execute the script from the command line and things go just fine: I > am able to bind to the Python lib and create objects based on Python > classes, etc. > > Once I add code to the script to load up the required webmin prereqs, the > problems start. I end up with an error like this: > > "Can't locate object method "new" via package "FooBar" (perhaps you forgot > to load "FooBar"?)" > > Where "FooBar" is the Perl name for a Python class "foobar". > > For some reason it looks like maybe @INC is not correct the second time > around, but I cannot confirm that. > > Could it be that Inline compiles the library in one location, but somehow > there is a change relative to that location once inside of the webmin > environment? > > Any thoughts on what's going on? It could be that Webmin is modifying @INC, such as when you call code in another Webmin module. You mentioned that this only happens when you call the webmin pre-reqs .. which specific line of code triggers the problem? - Jamie |