# PanTiltHat & Picamera in python

**URL:** <https://forums.pimoroni.com/t/pantilthat-picamera-in-python/4037>\
**Category:** Support\
**Created:** [February 20, 2017, 1:03pm UTC](https://forums.pimoroni.com/t/pantilthat-picamera-in-python/4037 "2017-02-20T13:03:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![calleblyh](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@calleblyh](https://forums.pimoroni.com/u/calleblyh)\
**Post date:** [February 20, 2017, 1:03pm UTC](https://forums.pimoroni.com/t/pantilthat-picamera-in-python/4037/1 "2017-02-20T13:03:32Z")

</div>

Hi, I am not a programmer basically. But having ideas on my specific applications: I have the pantilthat which I can control to certain positions. I have the Picamera as well, and I would like to take a snapshot once the pantilt has reached its new position. The problem: Where can I find “import PiCamera” in python code to take a snapshot or timelaps. And generally speaking in python code documentation revealing “import xxxx” where xxxx stands for time, RPi.GPIO as GPIO, PiCamera and so on where can I find it ?

Please guide me to approriate documentation.

Br  
Carl Blyh  
Helsinki Finland

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [February 20, 2017, 3:28pm UTC](https://forums.pimoroni.com/t/pantilthat-picamera-in-python/4037/2 "2017-02-20T15:28:55Z")

</div>

If I understand your question… for picamera specifically, you can source it as described here: [https://picamera.readthedocs.io/en/release-1.12/](https://picamera.readthedocs.io/en/release-1.12/)

any other library, it depends on whether packages exists in the apt repo for the distribution you are using. Typically you would use something like:

```
sudo apt-get install python-xxxx python3-xxxx

```

the alternative is to source it from pypi using:

```
sudo pip install xxxx

```

… unfortunately, naming on pypi is not standardised or enforced by very strict policies, so `xxxx` might have no match, or might not be what you want and `import xxxx` subsequently may fail.

your best bet is to try the apt method, then, if you are unsure what the pypi package might be, search [https://pypi.python.org](https://pypi.python.org) for `xxxx` and determine what in the returned list is the most adequate package.

---

<div class="post-metadata">

**Author:** ![RogueM](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/roguem/32/311_2.png) [@RogueM](https://forums.pimoroni.com/u/RogueM)\
**Post date:** [February 20, 2017, 3:55pm UTC](https://forums.pimoroni.com/t/pantilthat-picamera-in-python/4037/3 "2017-02-20T15:55:33Z")

</div>

incidentally, some module are built-in into python itself, such as `time` and there is nothing required to install them. It’s possible to consult (and familiarize yourself) with modules built-in the standard library by checking out something like:

[https://docs.python.org/3.4/py-modindex.html](https://docs.python.org/3.4/py-modindex.html)

(for Python 3.4 specifically in this case)

… one piece of advice I can give you is to install ipython:

```
sudo apt-get install ipython ipython3

```

then when you run `ipython` from the command line the enhanced interpreter that ipython provides will allow you to use autocompletion, so if you start typing say `import picam` the tab key should list all installed modules matching the pattern. This works for all built-in modules and installed 3rd party.
