mortrade.blogg.se

Python closes after running script
Python closes after running script













The second file path is the path to the Python script we want to run which in this case is buyer_behaviour_analysis.py.

python closes after running script

(In my case, it is Python 2.7 as I have different versions installed)

  • The first file path is the file path to the Python executable which want to use to run the Python script.
  • The echo will print out what is being executed, in this case our python script file being called and the results.
  • python closes after running script

    To create a batch file, simply open a new Notepad andĮcho C:\Users\adaba\Anaconda3\envs\gl-env\python.exe C:\TREES\customer_segmentation_maoting\buyer_behaviour_analysis.py %* PAUSE.This will ensure that your script runs without breaking due to any different Python version.For instance, if you want your script to run with Python 2.7, you shebang line will be #! python2.7 First of all, if you want your script to run with a particular Python version you can decide that by declaring shebang line.

    python closes after running script

    After writing your script, you might want to schedule it to run periodically, let’s say, Daily, Weekly or Any Time interval you will decideīefore you schedule that you want to simply create a batch file and schedule it run with a Windows Scheduler.















    Python closes after running script