A
A
Alexey2020-11-30 22:12:42
Bots
Alexey, 2020-11-30 22:12:42

Will the script be able to create files/documents when I upload it to the server?

I am writing a telegram bot, according to my idea, the bot should create a text document in the directory with the script itself
, that is, a separate text document will be created for each user of the bot, in fact, each person will eventually fill out his document through the bot by running the script in the console on his PC this is how it works, files are created, everything is filled, BUT for some reason I have the feeling that if I place the bot on the server, then the files will not be created on the server.
So is it or not?

By the way, I check through the "os" library, os.path.existsif the file does not exist, I create it through perhaps this is important open ("путь",'w')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wiskey666, 2020-11-30
@resolut1123

Yes, they will be created, since for the bot the server is the computer on which it is running.
Validation is also important, because if you do not check, the file will be overwritten.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question