Friday, January 31, 2014

So you're attending your first Python users group meeting / meetup

Full HouseCongratulations! You have decided to attend your local Python users group (PUG) meeting (or "meetup" in the Meetup parlance), putting yourself on a path for success in mastering Python, and programming in general. Here are a couple of tips to help you arrive prepared and ready to participate.

Attend

The most important thing to bring to a PUG meeting is yourself and your enthusiasm. If you're in a rush and don't have time to set up your laptop or anything else, don't worry, just attend! You will be welcome regardless of your technical and personal background. The global Python community expects an atmosphere of respect and welcoming at each event, especially for newcomers.

Bring a laptop

Each PUG will arrange its meetings differently. DCPython, for example, tended towards mostly presentations while I was a member. In contrast, OCPython has had less formal meetings where there's more interaction and audience participation. Be prepared. Bring a laptop just in case.

Prepare your laptop for Python

Everything in this section should be considered optional but very helpful. Try to get your laptop set up before the meeting. Don't fret if you can't or don't have time, though!. Wi-Fi access can't be guaranteed at a lot of venues, so it will be extremely helpful if you have all your software downloaded, and, if possible installed and configured, before the meeting.

If you get stuck with any of the tasks below, don't fret, and do attend anyway! You will find other attendees willing to troubleshoot and get you un-stuck, I promise. The Python community is among the friendliest and eager to help.

Know how to open your terminal emulator

Most Python programs are invoked via the command line (typically by issuing a command that looks like "python <some_file.py>"). Learn how to access the terminal emulator/command line for your laptop's respective operating system, such as PowerShell for Windows, Terminal for OS X, or GNOME Terminal for Linux.

Make it easy to get to the terminal emulator by putting a shortcut to it on your desktop, dock, or launcher. Oftentimes the presenter will assume you already have your terminal open and at the ready.

Configure your terminal emulator to your liking ahead of time. For example, I find the default font size in OS X's Terminal too small and the colors too pastel to the point of being illegible. Finding the right places to change these settings to suit your style (and eyesight) can take some time, so get them fixed ahead of time. You won't want to be fiddling with these settings while the presenter's nuggets of advice go flying by.

If you're unfamiliar with working on the command line, see Zed Shaw's Command Line Crash Course.

Have a working Python installation

If you have a Mac or a Linux laptop, the good news is you already have Python installed; proceed onward.

If you're a Windows user, you have a little work ahead of you. First, download a Python installer from the Python website. Just grab the latest version (Python 3.4 at time of publication), run the installer (double click the installer file), and go through the dialogs (you can trust the defaults).

The final step is to put Python on the PATH so that you can run Python from your command line. Here is a howto for Windows 7 users. (Note: instead of using "Python27" use a number matching your download, for example "Python34" if you downloaded and installed Python3.4)

You can verify you put Python on your path by opening PowerShell, typing in "python", and pressing the Enter key. If you see a prompt that looks like ">>>" you're good to go. If instead you get an error that "python" isn't found, try going back through the steps of setting your path. If you get stuck here, ask for assistance at your meeting, show your helper this blog post, and they should be able to get you back on track.

Have a text editor or IDE installed and configured

Python programs are plain text files with .py extensions. While you could use Microsoft Word (heaven forbid) to open and edit the files, you should use a specialized tool for editing code. If you're new to programming, you'll probably do fine starting with a good text editor that provides syntax highlighting and help with formatting your code correctly. If you're on Linux, you probably already have a decent editor like Gedit installed. If you're on Mac OS X try something like Sublime Text. If you're on Windows, try Notepad++.

If you have some experience in programming in other languages or have the interest in investing more time upfront, you can install and get started using an integrated development environment (IDE). If you don't yet have a favorite IDE for Python development, try PyCharm or Ninja IDE. IDEs provide not just a text editor but also a debugger, a test runner, an interactive console, and some form of project management, among other tools. Again, if your a newbie, just stick to getting a good text editor set up before attending the meeting.

Have pip installed

pip allows you to easily download and install other Python software libraries (called "Python packages") from the Internet. All you have to do is open your terminal, type in "pip install <PACKAGE_NAME>", and press Enter, and pip will fetch the package from the Internet and install it for you. pip can come in quite handy if you would like to try out any packages mentioned or shown in tutorials during the meeting.

If you installed Python 3.4 or newer, you already have pip installed. Proceed onward!

If you have Python 3.3 or older (including Python 2.7), you will not have pip installed by default (unless you used an alternative Python distribution like Anaconda). You can check whether or not you have pip installed by typing in "pip" on your command line and hitting the Enter key. If you get an error that the pip command cannot be found, you will need to install pip.

The pip documentation describes how to install pip. The easiest method uses the get-pip.py script. If this fails for you, you may need to try one of the alternative install options.

This may be a more difficult step for Windows users. First, make sure that Python is on your PATH (see "Have a working Python installation" above). Next, download the get-pip.py script by right-clicking the link, selecting "Save As", and designating a location to save it, such as your "Downloads" directory. Next, open PowerShell and use the cd command to move to your download directory (e.g., "cd $HOME\Downloads". Finally, in PowerShell, run python get-pip.py.

After the installation of pip completes, you should be able to access pip from the command line by typing in pip and hitting Enter. Again, if you get stuck, show this blog post to someone at the meeting and he or she should be able to help you.

Bring some extra equipment (optional)

In an ideal PUG event, organizers will have time and resources to set up the event area with ample access to power, Wi-Fi, and the like. If your local PUG is new or just getting started, though, the organizers may have a hard enough time just finding a location to meet, let alone have time to prep the area for lots of tech. Here's some equipment that you can bring along that could help everybody have a better experience.

  • A wireless hotspot device
  • Display dongles, adapters, and cables
  • Power strips
  • Business cards

Have a good time; let others have a good time

PUG meetings are social events, not formal meetings. Some may run on tight schedules because they pack a lot of content in, however, don't confuse that structure with formality. Everyone attends PUG meetings first and foremost to share in the joy of the Python programming language. Unless you're presenting (and usually even if you are), you don't need to dress up; just come in something comfortable and inoffensive.

Do conduct yourself appropriately at the meeting, and err on the side of professionalism. The PyCon Code of Conduct provides a good set of guidelines. If another attendee behaves inappropriately towards you or makes you feel uncomfortable or unwelcome, do feel free to confront the attendee on her or his behavior directly or otherwise raise the issue with the PUG's organizers immediately.

On behalf of your local PUG, we look forward to seeing you soon!