Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

main.py

DennisAnaniev
DennisAnaniev

Hi!
Who knows why python execute all only in main.py
I created folder chapter 1 and one file inside this called strings.py.
But after click Run it doesn't work
Screenshot 2020-07-15 at 18.53.18

2 years ago

Voters

Comments

TopNew
3
Coder100
Coder100

Hello. Repl.it runs main.py by default.
You can configure that:
create a .replit file:

run="python Chapter1/strings.py"

Alternatively, you can just import it:

import Chapter1.strings
2 years ago
1
RobertCodeGit
RobertCodeGit

@Coder100
same problem for me. If I understood correctly, I have to add an "import" line for every subfile I write, right?
Thanks

1 year ago
2
Bookie0
Bookie0

i think you have to import those files.
just do from file_name import * and replace the file name with the actual file name. the * means all.

happy coding and hope this helps! =)

2 years ago
Load more