Movatterモバイル変換


[0]ホーム

URL:


how to import from variable source

Steve Purcellstephen_purcell at yahoo.com
Sun Apr 15 04:11:55 EDT 2001


Rob Brown-Bayliss wrote:> module = 'mymod'> import module>> Only, as I found out I get an error stating that there is not module> called module.>> Is this possible in python?  Is there a better way perhapse?Use the __import__() builtin function:module = __import__('mymod')-Steve-- Steve Purcell, PythangelistGet testing athttp://pyunit.sourceforge.net/Any opinions expressed herein are my own and not necessarily those of Yahoo


More information about the Python-listmailing list

[8]ページ先頭

©2009-2025 Movatter.jp