Skip to main content

Create a .bat file on your desktop to run your script

Project description

A little function to create a batch file on your desktop to run your script.

from CreateBat import create_batch_file_on_desktop

create_batch_file_on_desktop()

#After calling the function, filedialog.askopenfilename will ask for the .py file



output:





Do you want to add parameters? (e.g: --path=C:\Users )>? --check

If you want to keep the console open after executing the script, press: "y" ?>? y



Batchfile written to:

C:\Users\Gamer\Desktop\_bs4dfscraping.bat

_____________________

    @echo off

    C:

    cd "C:\Users\Gamer\anaconda3\envs\dfdir"

    echo Activating dfdir

    CALL activate dfdir

    echo Starting Python C:\Users\Gamer\anaconda3\envs\dfdir\bs4dfscraping.py

    CALL "C:\Users\Gamer\anaconda3\envs\dfdir\python.exe" -i "C:\Users\Gamer\anaconda3\envs\dfdir\bs4dfscraping.py" --check

    

Out[3]: 'C:\\Users\\Gamer\\Desktop\\_bs4dfscraping.bat'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CreateBat-0.21.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

CreateBat-0.21-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page