how to use repl
PatriciaMedina (11)

I have created one file in repl using python and it worked. Now I am trying a second file and it is not working. The key words are not even hot. What do I do to create multiple documents??

You are viewing a single comment. View All
timmy_i_chen (1077)

Do you have a link to the repl? And did you remember to include the .py extension for the new file? ;)

PatriciaMedina (11)

@timmy_i_chen ok, did not realize I had to add .py. I am used to my IDE doing it. still will only run the previous file.

PatriciaMedina (11)

@timmy_i_chen is this the link you were referring to?
neither file has anything to do with each other. Just trying to find a work around.

timmy_i_chen (1077)

@PatriciaMedina Oh for your use case you probably want to create a function in the other file and import it into the main file. At least, I think that's what you would want to do?

masfrost (107)

@PatriciaMedina For folders (subpackages), you should add an file, for simple cases you can just leave it empty.

Also avoid spaces in your package names, otherwise you have to jump through some hoops. Here's the convention for file names in python.

Here's a simple example

Edit: you don't actually need, but it makes life easier. See here

Honestly, I'd just leave folders and packages alone if I'm just starting out, and just flatly add .py files on the root directory.