Skip to content
Sign upLog in
← Back to Community
How do i run other scripts?
Profile icon
MesyetiIsTaken

How do I run another python file?

I'm trying to get the def function in pava.py working in main.py

Voters
Profile icon
MesyetiIsTaken
Comments
hotnewtop
Profile icon
[deleted]

Have a look at this: https://repl.it/@malvoliothegood/Pava-v01
Also, don't use reserved words like print as variable names as the Python interpreter will get confused.

Profile icon
MesyetiIsTaken

@malvoliothegood
ok thanks!

Profile icon
MesyetiIsTaken

Wow! Thanks! I have marked it as answer :)@malvoliothegood

Profile icon
MesyetiIsTaken

you're*

Profile icon
WaruchJiratanak

I think the problem is 'pava' is not a package
But I'm not completely sure

Profile icon
MesyetiIsTaken

The reason I used import is because I saw while googling it that you can treat it like a package and it will run

@WaruchJiratanak