| View previous topic :: View next topic |
| Author |
Message |
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| Anyone knows a module does for python what Module::Find does for Perl ? |
| |
|
|
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| Whats it do? |
| |
|
|
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| searching (and loading) of modules it searchs by a given namespace |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| How does that make sense for python modules? |
| |
|
|
AmeliaR
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 |
| |
|
|
Klimapol
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. |
| |
|
|
AmeliaR
Joined: 31 May 2006 Posts: 142
|
| Klimapol, it loads sub-namespaces |
| |
|
|
Klimapol
Joined: 27 May 2006 Posts: 134
|
| still it doesnt translate to python, but twisted.plugin will help you. |
| |
|
|
AmeliaR
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 |
| |
|
|
Klimapol
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. |
| |
|
|
| Page 1 of 2 |
Goto page 1, 2 Next |
|