Re: Is there a way importing a string object?

2016-01-05 Thread Robin Koch
Am 05.01.2016 um 03:24 schrieb jf...@ms4.hinet.net: (Please make the body of your message complete. The "Subject" field should be a summary of your message's subject, and may not be read as the first line of your message.) Yes, The "Subject" seems a little strange, read likes a part of the

Is there a way importing a string object?

2016-01-04 Thread jfong
For example, name = "test" # test.py is a module's file import name Regards, Jach -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way importing a string object?

2016-01-04 Thread jfong
jf...@ms4.hinet.net at 2016/1/5 UTC+8 8:49:56AM wrote: Thanks, Ian and Ben. This forum is really a good place for learning Python. I am glad I had join in. To Ben, > (Please make the body of your message complete. The "Subject" field > should be a summary of your message's subject, and may not

Re: Is there a way importing a string object?

2016-01-04 Thread Ben Finney
jf...@ms4.hinet.net writes: > For example, (Please make the body of your message complete. The “Subject” field should be a summary of your message's subject, and may not be read as the first line of your message.) > name = "test" # test.py is a module's file > import name The standard library

Re: Is there a way importing a string object?

2016-01-04 Thread Ian Kelly
On Mon, Jan 4, 2016 at 5:49 PM, wrote: > For example, > > name = "test" # test.py is a module's file > import name Yes, use the importlib.import_module function. -- https://mail.python.org/mailman/listinfo/python-list