If you already have Python and Mercurial installed, all you need to do is clone https://developers.kilnhg.com/Repo/FogBugz/Group/FogBugzPy to your local machine and run python setup.py install from the FogBugzPy directory.
Download and install Python. FogBugzPy works with either Python 2 or Python 3 and has been tested with Python 2.7.10 and Python 3.5.2. We recommend grabbing the windows MSI Installer available here:
Python 2: https://www.python.org/downloads/release/python-2710/
- Add C:\Python27 to your system path. (Windows XP, Windows 7)
Python 3: https://www.python.org/downloads/release/python-352/
- Check the box in the installer to add Python to your system path.
You should now be able to run python from the command prompt to bring up the interpreter:
FogBugzPy is a library we wrote for interacting with the FogBugz XML API via Python. You can get it either by cloning the FogBugzPy Kiln repository using Mercurial or by using the Python Package Index (PyPi).
FogBugzPy is now available on PyPi. If you have Pip installed, you can install it from the command line via
pip install fogbugz
This is the easiest way to install FogBugzPy. The latest distributions of Python all come with pip. If you don't have pip already installed, you can follow the instructions in http://stackoverflow.com/a/12476379/864027 to install it.
If you run into difficulties when installing FogBugzPy with pip, see Problems installing FogBugzPy with pip
If you use pip to install FogBugzPy, you're all set. If you want an alternative method, read on:
If you already have Mercurial installed, skip this step. There are two ways to install Mercurial:
Install Kiln Client and Tools (preferred)
If you're a Kiln user, install the Kiln Client and Tools. This is the best way to get Mercurial for your Windows machine, especially if you are working with Kiln. From within Kiln, Resources > Kiln Client and Tools. Download and install the tools per the instructions on the page. This will automatically install Mercurial.
Install Mercurial by itself
If you're not using Kiln, you can get Mercurial directly from the website at http://mercurial.selenic.com/downloads/. As of this writing, the current version of Mercurial is 1.9.2 and we recommend using the Inno Setup Installer. At the end of the installer, be sure to leave the box checked that adds Mercurial to your path.
Now that you have Mercurial installed, you can clone FogBugzPy to your local machine. In this example, we'll clone FogBugzPy to C:\code\FogBugzPy on your machine, so if you want to follow along, you will need to create a C:\code directory if it doesn't already. Run the following from the command line:
> hg clone https://developers.kilnhg.com/Repo/FogBugz/Group/FogBugzPy C:\code\FogBugzPy
Install FogBugz Python module
Install the FogBugzPy module by running the following from the FogBugzPy directory:
C:\code\FogBugzPy>python setup.py install
By installing the FogBugz python module, you don't need to tell Python where the library is every time you want to write a Python script that uses FogBugzPy. All you will need to do is add the following to the top of your Python script file:
from fogbugz import FogBugz