Reputation: 839
Given
import a_long_module_name as short_name
Is there a way of obtaining the name of the module from the alias, so I can
x=something(short_name)
print(x)
>> a_long_module_name
Thanks!
Upvotes: 0
Views: 210
Reputation: 1531
An example with numpy
import numpy as np
print (np.__name__)
It prints "numpy"
Upvotes: 4