how does repl-it organize the files and folders - i am not able to run code in subfolder
hello dear all - new to repl-it. love it as it seems ot be a great approach to a online-ide.
one question though:
cannot run code that i have added to a folder.. .see the image
see here the account - and the folders that i have created
This file cannot be displayed: https://storage.googleapis.com/replit/images/1558601438148_1f74839a0bd9997b8d884844d43f2cf2.pn
question is: how to run the code that is in adress_book2
it does not work - i cannot run this code .
did i miss something.. plz lemme know and set me straight
thanks in advance
You need to add the .py extension for a file to be read as a Python file. Then, you can run it from main.py (or other) by doing
import adress_book2 (Don't include the .py when using import).
Also, you can import files from a folder by doing
Please mark my comment as the answer if it helped you. Thanks!
If your files are two differents programms, the best thing to do is to create two repls
If you want to keep these files in the same repl, you can use
right click on the editor > open command palette > open shell but you need some experience with a shell (basically how to move in the file system / how to run a python script from the shell)
There is an other way : https://repl.it/@timmy_i_chen/multi-files-demo
@abc3354 hello many many thanks for the quick reply - i will try out all your recommendations - great to hear from you.
BTW - the things with the shell - guess that i can do all that things - besides the ideas of running the chrome-exteinson for replit.
sure thing - iguess that the shell things are a different story
Again - i wil try out all the things you reccomend
have a great day