Quick Start Guide»Installing Python and FogBugzP…
  • RSS Feed

Last modified on 9/16/2015 10:05 AM by User.

Tags:

Installing Python and FogBugzPy

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.

Windows

Install Python

Download and install Python 2.7.10. We recommend grabbing the windows MSI Installer available here: https://www.python.org/downloads/release/python-2710/.

Add C:\Python27 to your system path. (Windows XPWindows 7)

You should now be able to run python from the command prompt to bring up the interpreter:

Install FogBugzPy .exe

Read more below, but if you are developing on Windows, all you need to do is run this installer: fogbugz-0.9.5.win32.exe

FogBugzPy

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).

PIP

FogBugzPy is now available on PyPi. If you have Pip installed, you can install it from the command line via pip install fogbugz.

Install Mercurial

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.

Clone FogBugzPy

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