On 9/2/19 3:32 AM, Spencer Du wrote:
Hi

How do i import files inside a txt file if they exist in the current
directory?


Once you've read the module names you can use:

  new_module = __import__(modulename)

So you'd read the name from your file into
modulename and import the name contained in
that variable in this way.




--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to