Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
How do I import everything in a subdir?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Dfenestr8, post: 1808380"] Hi. I have a program which I want a plugin directory for. I figured the way to go about that would be to just add a plugin/ dir to sys.path, and import everything in it. Then my program can just execute the main() method of each imported plugin. Is that a good way to go about it? If so, how do I import everything in the plugins dir? The method raises an error as you can see. .... import x .... Traceback (most recent call last): File "<stdin>", line 2, in ? ImportError: No module named x [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
How do I import everything in a subdir?
Top