Tag Archives: Python

PyDev of the Week: Veronica Hanus

This week we welcome Veronica Hanus (@veronica_hanus) as our PyDev of the Week! Veronica is a regular tech speaker at Python and other tech conferences and meetups. You can see some of her talks and her schedule on her website. She has been active in the Python community for the past few years. Let’s take a few moments to get to know her better!

Veronica Hanus

Can you tell us a little about yourself (hobbies, education, etc):

I enjoy writing and taking pictures. For me, the challenge is to help someone feel what I was feeling when I decided the moment was picture- or story-worthy, and both take a combination of skill-that-you-can-study and plain-old-caring that I find immensely rewarding. Photo-taking excursions are one of my favorite ways to spend time with friends, because they’re a nice combination of “quiet, contemplative side-by-side activity” and “let’s get out and do something”!

I once carved out time to take silly pictures with a new conference friend in a funny upside-down room at the conference venue. It amazed me how nice it felt to be fussed over after the stress of my first conference talk. As I started speaking more, I started offering to take pictures of conference attendees and many shared the same sentiment. Many people find conferences overwhelming and it’s nice to take a few minutes and relax, make a new friend, and maybe go home with new headshots.

My education often surprises people because it violates many people’s expectations: I don’t hold a CS degree, and I never attended a bootcamp. In college, I studied Geology with a combined geochemical and planetary science twist. Since shifting into software, I have heard countless times “Geology!? That must have been such a… change”. Even today, comments like that feel challenging and exclusionary and early in my career shift it felt terrible. We hear again and again that having folks from diverse backgrounds help teams innovate, but when meeting someone who doesn’t fit our expectations, most of us still do a double-take. If I get that as a white, degree-touting former-scientist, imagine the uncomfortable responses folks in groups with more bias encounter when we express our surprise!

It turns out that my winding path toward programming has allowed me to make some of my most useful contributions. We don’t talk about it enough, but many use programming skills even if they haven’t written a line of code. If you’re considering development but are wondering how you will fit in, I encourage you to take a peek at communities like Write the Docs (their Slack), #CodeNewbie (their Twitter), or send me a hello via my Twitter or email. Continue reading PyDev of the Week: Veronica Hanus

wxPython – Creating a PDF Merger / Splitter Utility

The Portable Document Format (PDF) is a well-known format popularized by Adobe. It purports to create a document that should render the same across platforms.

Python has several libraries that you can use to work with PDFs:

  • ReportLab – Creating PDFs
  • PyPDF2 – Manipulating preexisting PDFs
  • pdfrw – Also for manipulating preexisting PDFs, but also works with ReportLab
  • PDFMiner – Extracts text from PDFs

There are several more Python PDF-related packages, but those four are probably the most well known. One common task of working with PDFs is the need for merging or concatenating multiple PDFs into one PDF. Another common task is taking a PDF and splitting out one or more of its pages into a new PDF.

You will be creating a graphical user interface that does both of these tasks using PyPDF2. Continue reading wxPython – Creating a PDF Merger / Splitter Utility

PyDev of the Week: Aymeric Augustin

This week we welcome Aymeric Augustin (@aymericaugustin) as our PyDev of the Week. Aymeric is a core developer of Django, a Python web framework. He is also an entrepreneur and speaker at several Django related conferences. You can catch up with Aymeric over on his website or check out his FOSS contributions on Github. Let’s take a few moments to get to know him better!

Aymeric Augustin

Can you tell us a little about yourself (hobbies, education, etc):

Do you know how to spot a Frenchman? That’s always the first thing they mention! Now that’s out of the way…

These days my hobbies center around being the dad of three wonderful girls 🙂 We’re doing a lot of physical activity together: swimming, cycling, gardening, playing music, etc.

I’m managing a software engineering department of about 200 people at CANAL+, a French audiovisual media group that operates TV services in several countries.

I was trained as a generalist engineer, eventually specializing in Computer Science and Information Technology, but I learnt most of what I do on the job. Continue reading PyDev of the Week: Aymeric Augustin

Rotating Images in ReportLab

There are times when you want to rotate images or other objects in ReportLab while creating a PDF. For example, you might want to rotate an image by 45 degrees for watermarking purposes. Or you might need an image that runs vertically along one of the edges of the PDF.

You can rotate images by using ReportLab’s canvas methods or by using its higher level Flowables that you can find in the platypus. module. Let’s start by looking at how to do this with the canvas directly!


Rotating Images Using Canvas

Rotating images using the canvas is kind of confusing. The reason being that when you rotate the canvas, you may end up inadvertently rotating other elements on your canvas if you’re not careful.

Let’s take a look at the code: Continue reading Rotating Images in ReportLab

Lucid Programming Podcast – Writing Books About Python

I was recently interviewed on the Lucid Programming Podcast by Vincent Russo about writing books about Python.

You can listen to the audio here:

If you’d like to know more about how I write books, you might enjoy this article I wrote on the topic. I also wrote an article on the Pros and Cons of Indy Publishing.

Last week, I was honored to be on the Profitable Python podcast.


Related Podcasts

Other podcasts I have been on:

PyDev of the Week: Katherine Kampf

This week we welcome Katherine Kampf (@kvkampf) as our PyDev of the Week! Katherine is a Program Manager at Microsoft, specifically for Azure Notebooks, which is Microsoft’s version of Jupyter Notebook. She also recently gave a talk at EuroPython 2019. Let’s take a few moments getting to know Katherine better!

Can you tell us a little about yourself (hobbies, education, etc):

Sure! I am currently a Program Manager for Azure Notebooks at Microsoft. I joined the company in 2017 and started working on the Big Data team. After some time there, I decided to move closer towards notebooks and Python which led me to the Python Tools team which has been a blast.

Before starting at Microsoft, I graduated from the University in Michigan where I studied Computer Science. I also grew up Ohio so the Midwest was home for quite a while and will always have my heart. While at UofM, I was also lucky enough to TA our introductory computer science course which covered both C++ and Python. I loved helping folks learn new concepts, and I’m so glad I get to continue this in some form by speaking at conferences!

Nowadays, I’m based in Seattle and love living the stereotypical Pacific Northwest life. I tend to spend my weekends skiing in the winter and hiking in summer. In between those, I love to travel around and am working on visiting all the U.S. National Parks! I’m also a dog-enthusiast and am always working on being friends’ go-to dog sitter 😊 Continue reading PyDev of the Week: Katherine Kampf

Profitable Python Episode: Put Your Family First

I was a guest on the Profitable Python podcast this week. You can check it out here:

During the interview, I was asked how I would like to have Python runnable in the browser and I couldn’t recall the name of a product that makes this sort of thing possible. The product I was thinking of was Anvil, which while still not quite having Python in the browser, it’s close.

The other product I was thinking of was Microsoft’s Silverlight browser plugin that you can use IronPython in. Or at least you used to be able to. I haven’t looked into that in a while.

Here are some links to other things mentioned in this episode:

It was great to be on the show. I always enjoy talking about Python. Feel free to ask me any questions about anything mentioned in the Podcast or about the Podcast itself.

PyDev of the Week: Frank Wiles

This week we welcome Frank Wiles (@fwiles) as our PyDev of the Week! Frank is the President and Founder of Revolution Systems and President of the Django Software Foundation. If you’d like to know about Frank, you should take a moment to check out his website or his Github account. For now, let’s take some time to get to know him better!

Can you tell us a little about yourself (hobbies, education, etc):

I grew up in a small town in Kansas, about 10,000 people, so computers became a hobby early in life. Other than that I really enjoy cooking and when I have time some photography, but these days it’s mostly just taking photos of the kiddos.

I attended Kansas University for awhile as a CS major and then switched to Business before ultimately dropping out during the dotcom boom.

Frank Wiles Continue reading PyDev of the Week: Frank Wiles

PyDev of the Week: Paul Ganssle

This week we welcome Paul Ganssle (@pganssle) as our PyDev of the Week. Paul is the maintainer of the dateutil package and also a maintainer of the setuptools project. You can catch up with Paul on his website or check out some of his talks. Let’s take a few moments to get to know Paul better!

Can you tell us a little about yourself (hobbies, education, etc):

One thing that sometimes surprises people is that I started out my career as a chemist. I have a bachelor’s degree in Chemistry from the University of Massachusetts, Amherst and a Ph.D in Physical Chemistry from the University of California, Berkeley. After that I worked for two years building NMR (nuclear magnetic resonance) devices for use in oil wells. In 2015 I was looking for a career with a bit more flexibility in terms of location and I made the switch to software development; one thing that is nice about the software industry is that tech companies are not afraid to hire people with non-traditional backgrounds if they know how to code.

Paul Ganssle

I have the typical assortment of “hacker” and “autodidact” hobbies – learning languages, picking locks, electronics projects, etc. One of my favorite projects (which has unfortunately fallen a bit by the wayside) is my HapticapMag, a haptic compass that I built into a hat. I had it up and working for 2 or 3 weeks, but some parts broke and I never got around to fixing it. My tentative plan is to start up some new electronics projects in 4-5 years, when my son is old enough to be interested in that sort of thing. Continue reading PyDev of the Week: Paul Ganssle

An Intro to Flake8

Python has several linters that you can use to help you find errors in your code or warnings about style. For example, one of the most thorough linters is Pylint.

Flake8 is described as a tool for style guide enforcement. It is also a wrapper around PyFlakes, pycodestyle and Ned Batchelder’s McCabe script. You can use Flake8 as a way to lint your code and enforce PEP8 compliance.


Installation

Installing Flake8 is pretty easy when you use pip. If you’d like to install flake8 to your default Python location, you can do so with the following command:

python -m pip install flake8

Now that Flake8 is installed, let’s learn how to use it! Continue reading An Intro to Flake8