0

I am writing a python package (svnplot). I want to copy a shell script or batch files in users home directory or current directory, so that user can conveniently execute the commands in the package.

Currently to execute svnplot command, user have to call something similar to

python /svnplot/svnplot.py

If I copy a shell script or batch file in users home directory, then user just have to call

svnplot.sh

However, I am not able to figure out how to copy the files to users home directory.

Nitin Bhide
  • 1,685
  • 14
  • 15
  • Do you mean you want an install script or something similar? Because otherwise its just a copy-and-paste in your file browser. More details please. – Blair Aug 12 '12 at 04:21
  • i already have a basic setup script which installs svnplot in python site-packages folder. However, after installation, if you to run the svnplot then you have to give the full path of svnplot.py file. Hence I want to create a shell script, batchfile or another python script file which will be executed from user's home directory. I am not sure what you mean by 'its just a copy-and-pate' in your file brower. – Nitin Bhide Aug 14 '12 at 16:51

1 Answers1

0

Look at distutils scripts option or entry_points/console_scripts in setuptools.

If there is a single main command then you could use PyInstaller, py2exe to pack your package into a single executable. In simple cases it might be enough just to zip the package and execute that.

Community
  • 1
  • 1
jfs
  • 399,953
  • 195
  • 994
  • 1,670