Ask coding questions

← Back to all posts
Sharing file with output text
TylerBeck2

My son has written a Python script that takes prompts and writes the data to output.txt. When I share the project, it doesn't seem to save the data to the file. Is there a setting so that the file will get saved when I share the link/project to other people?

Thanks!
Stephen

Voters
Vandesm14
Haaruun
TylerBeck2
Comments
hotnewtop
[deleted]

Hello, my comment is offtopic, but here is some information that could clean up your code:
1. no need to import time so many times.
2. no need to redefine cls()
3. sending 100 newlines isn't a proper clearscreen, a slightly more proper version is to import os, os.system("cls" or "clear");

[deleted]

I'm think when you run the project, it clears what is in the file but I'm not exactly sure. I'll upvote it so you can get some answers! Meanwhile, try and search it on the internet (I would recommend Stackoverflow) if you haven't already!

UzayAnil

this doesn't work for me, it keeps saying:
Traceback (most recent call last):
File "main.py", line 1, in <module>
from colorama import init
ModuleNotFoundError: No module named "colorama"

Vandesm14

Writing to files on repl.it does not work. It's really buggy, so don't get confident that it'll work all the time if it works once. They're working on this, just (as it seems) really slowly.