Hi guys. How can I here import my sourcecode in Python? Via "from myfile import myclass"
This doesn't work here. Have anyone one idea?
4/2/2019 5:27:55 PM
Guys, this thread should be helpful for you!
with open("package.py", "wb") as f:
from urllib.request import urlopen
You mean the package is in your local storage and you wanna use them in here? If yes then sad but as SoloLearn doesn't read from your device's local storage, it's not possible in here.
Thomas you still can't link two different codes saved in here. So it's still not gonna work.
K, but thanks for your answer
Yes, I wrote a code as a package in this app and imported this code in my main code file here in this app too
Thankyou Flandre Scarlet
Why do I need the 'write' function for the url package and not the read function?
Oh, wait, i think i misunderstood your question
Yes, you can do like this:
but it would be quite different from importing the package
Thomas I don't think python can read an online module directly🤔
If it can, please tell me😂
Send us a message