Skip to content
Advertisement

Trying to import a script from other code

I need help to import a script, i did 2 codes, the first is a test with some prints and in the second i try to import them:

Code 1

JavaScript

Code 2

JavaScript

But in code 2, when i did os.system(r"python C:UsersGabriPycharmProjectspythonProjectImagens.py") nothing happen. Someone can help me to import this code? ;-;

1° Code is in C:UsersGabriPycharmProjectspythonProject

2° in C:UsersGabriPycharmProjectspythonProjectPráticaVamove

Advertisement

Answer

If you want to keep the files where they are,
You should by able to do this:

JavaScript

And then run your commands like this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement