| View previous topic :: View next topic |
| Author |
Message |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
Anyone knows a module does for python what Module::Find does for Perl ?
Reply with quote
|
| |
|
|
Klimapol Enthusiastic Coder
Joined: 27 May 2006 Posts: 134
| |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
searching (and loading) of modules it searchs by a given namespace
Reply with quote
|
| |
|
|
Klimapol Enthusiastic Coder
Joined: 27 May 2006 Posts: 134
| |
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
I want to loat a large set of plugins are in many subdirs, and they are scattered across different python-libpaths - something like perls module::find would be handy
Reply with quote
|
| |
|
|
Klimapol Enthusiastic Coder
Joined: 27 May 2006 Posts: 134
|
well in python the module is the namespace, so if they arent in the same place, they wont have the same namespace. thus your comparison falls short. however, you might look at twisted.plugin, which may do what you want pretty well.
Reply with quote
|
| |
|
|
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
| |
Klimapol Enthusiastic Coder
Joined: 27 May 2006 Posts: 134
|
still it doesnt translate to python, but twisted.plugin will help you.
Reply with quote
|
| |
|
|
AmeliaR Enthusiastic Coder
Joined: 31 May 2006 Posts: 142
|
twisted.plugin doent look like its a big help for me - all i want it load all sub-namesapces of a given namespace
Reply with quote
|
| |
|
|
Klimapol Enthusiastic Coder
Joined: 27 May 2006 Posts: 134
|
listen. what im telling you is that doing that in python doesnt make sense. you really dont want to do that, because you'd get things you didnt want to get. you dont know what modules all the other packages have. but twisted.plugin is a good solution. dont bring perl to python, because thats not what you do.
Reply with quote
|
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|