DEV Community

Pattamatta CH N Kishore
Pattamatta CH N Kishore

Posted on

Calling a python variable from other file

I have a file openalm.py in that I declared a variable url.
Now I imported openalm in myfile and want to print url value
I can call this simply by print(openalm.url) as I imported openalm. But I want to pass "openalm.url" using a variable.
I tried this but it's not working
cmd="openalm.url"
print(cmd)
It print's openalm.url but doesn't print the value of openalm.url

Top comments (0)