M
M
Mind20772021-11-29 12:15:34
Python
Mind2077, 2021-11-29 12:15:34

How to run python file in background?

I wrote a simple code to have a beautifully designed profile in Discord using pypresence. But it is extremely inconvenient when the console takes up space on the screen or in the taskbar. I want to run this in the background (OS - Windows 10). Hope someone can help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CaTcRuSh, 2022-03-02
@CaTcRuSh

In the file you want to run, you specify:

def <любое имя>():
    #тут твой код

In the file from which you want to run the script at the beginning you specify:
from <имя файла> import <то же, что и в "любое имя">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question