0
ответов

Динамически импортировать метод в файл из строки

У меня есть строка, скажем: abc.def.ghi.jkl.myfile.mymethod. Как мне динамически импортировать mymethod? Вот как я это сделал: def get_method_from_file (full_path): if len (full_path) == 1: ...
вопрос задан: 9 January 2012 16:24
0
ответов

Dynamically importing Python module

I have a trusted remote server that stores many custom Python modules. I can fetch them via HTTP (e.g. using urllib2.urlopen) as text/plain, but I cannot save the fetched module code to the local hard ...
вопрос задан: 26 September 2010 19:57