PyDev of the Week: Lisa Roach

This week we welcome Lisa Roach as our PyDev of the Week! Lisa is one of the authors of PEP 526 – Syntax for Variable Annotations which is a part of Python 3.6. You can check out which FOSS projects Lisa is interested in over on Github. Let’s take a few moments to get you know Lisa better!

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

I’m originally from Cleveland, Ohio, and I went to Ohio University. After graduation in 2014 I moved to Silicon Valley and took a job with Cisco, where I do some interesting work with networking devices and Python. Right now I focus on developing Python applications that can run on containers on top of our routers and switches. The applications usually do some form of automation for the device, although my last project I did custom RIB table injections. For fun, I enjoy hiking and cycling on weekends, and I like to relax after work with some video games. My go to right now is Fallout 4.

Continue reading PyDev of the Week: Lisa Roach

Python 101 Now FREE on Leanpub Permanently

After the amazing response I had when I made Python 101 free for a few days a couple of months ago (see here, I have decided to make it free (or Pay What You Want) permanently on Leanpub (PDF, mobi and epub):

Note: I am still selling it on Amazon, Gumroad and Lulu

Now you can check it for free any time you like. If you happen to like the book, I would appreciate it if you could drop a review of it over on Amazon or contact me about doing a Reader Testimonial on Leanpub since they don’t have an automatic way to leave one of those.

When I originally wrote the book, I noticed that there were few or no books available that described how to create executables of your code or distribute your code via Python’s Package Index (PyPI). Python 101 covers these topics as well as introducing the reader to Python’s standard library, how to install 3rd party packages and an introduction to some of the most popular 3rd party packages for Python, such as SQLAlchemy, requests and virtualenv.

Python 101 has 5 sections, 44 chapters and 295 pages.

Here’s some coupons for my other books in case anyone is interested:

PyDev of the Week: Mark Haase

This week we welcome Mark Haase as our PyDev of the Week. Mark is the author of PEP 505 – None-aware operators. You can check out what projects Mark is interested in over on Github. He also has a programming blog that covers various programming topics. Let’s take some time getting to know Mark better!

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

As a child, I always loved building things, like Legos. I sketched designs for other projects that I daydreamed about building — a hang glider! — but as a kid I was obviously limited in terms of skills, tools, and resources. Nobody was going to hand me an arc-welder, after all.

I started programming when I was about 12 or 13. I learned BASIC first, then Java a couple years later. Programming didn’t have the same limitations as physical things. I didn’t need a whole workshop with tools and materials, just a computer and a compiler. I minored in Comp Sci in college (a mistake, in retrospect, I should have majored in it!) and managed to find a job as a programmer when I graduated it. It’s been my career for 10 years now.

Continue reading PyDev of the Week: Mark Haase

Python 101 is now a Course on Educative

My first book, Python 101, has been made into an online course on the educative website. Educative is kind of like Code Academy in that you can run the code snippets from the book to see what kind of output they produce. You can edit the examples that are executable, but you cannot save your edits currently. You can get 50% off of the course by using the following coupon code: au-pythonlibrary50 (note: This coupon is only good for one week)

Python 101 is for primarily aimed at people who have an understanding of programming concepts or who have programmed with another language already. I do have a lot of readers that are completely new to programming who have enjoyed the book too though. The book itself is split into 5 distinct parts:

Part one covers the basics of Python. Part two moves into learning a little of Python’s standard library. In this section, I cover the libraries that I find myself using the most on a day-to-day basis. Part three moves into intermediate level territory and covers various topics such as decorators, debugging, code profiling and testing your code. Part four introduces the reader to installing 3rd party libraries and briefly demonstrates some of the popular ones, such as lxml, requests, SQLAlchemy and virtualenv. The last section is all about distributing your code. Here you will learn how to add your code to Python Package Index as well as create Windows executables.

For a full table of contents, you can visit the book’s web page here. Educative also has a really good contents page for the online course too.

PyDev of the Week: Cameron Simpson

This week we welcome Cameron Simpson as our PyDev of the Week. Cameron is the co-author of PEP 418 – Add monotonic time, performance counter, and process time functions and the author of PEP 499 – python -m foo should bind sys.modules[‘foo’] in addition to sys.modules[‘__main__’]. He is also a core Python developer and enthusiast. You can check out some of his projects on bitbucket. Let’s take a few moments to get to know him better!

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

I’ve been a programming nerd since I was about 15, and I’ve got a BSc in Computer Science. I’m a somewhat lapsed climber and biker; I still have a motorcycle and try to use it but circumstances interfere; I’m trying to resume some indoor climbing too. I’m spending a fair amount of time on a small farm, and teleworking from there part of the time; I’ve been fortunate to find work where that is possible.

Continue reading PyDev of the Week: Cameron Simpson

New in Python: Syntax for variable annotations

Python 3.6 added another interesting new feature that is known as Syntax for variable annotations. This new feature is outlined in PEP 526. The basic premise of this PEP is take the idea of Type Hinting (PEP 484) to its next logical step, which is basically adding option type definitions to Python variables, including class variables and instance variables. Please note that adding these annotations or definitions does not suddenly make Python a statically typed language. The interpreter still doesn’t care what type the variable is. However, a Python IDE or other utility like pylint could have an annotation checker added to them that could highlight when you use a variable that you have annotated as one type and then used incorrectly by changing its type mid-function.

Let’s look at a simple example so we can see how this works:

name: str = 'Mike'

Continue reading New in Python: Syntax for variable annotations

New in Python: Underscores in Numeric Literals

Python 3.6 added some interesting new features. The one that we will be looking at in this article comes from PEP 515: Underscores in Numeric Literals. As the name of the PEP implies, this basically gives you the ability to write long numbers with underscores where the comma normally would be. In other words, 1000000 can now be written as 1_000_000. Let’s take a look at some simple examples:

>>> 1_234_567
>>> '{:_}'.format(1234567)

The first example just shows how Python interprets a large number with underscores in it. The second example demonstrates that we can now give Python a string formatter, the “_” (underscore), in place of a comma. The results speak for themselves.

The numeric literals that include underscores behave the same way as normal numeric literals when doing calculations:

>>> 120_000 + 30_000
>>> 120_000 - 30_000

The Python documentation and the PEP also mention that you can use the underscores after any base specifier. Here are a couple of examples taken from the PEP and the documentation:

>>> flags = 0b_0011_1111_0100_1110
>>> flags
>>> 0x_FF_FF_FF_FF
>>> flags = int('0b_1111_0000', 2)
>>> flags

There are some notes about the underscore that need to be mentioned:

  • You can only use one consecutive underscore and it has to be between digits and after any base specifier
  • Leading and trailing underscores are not allowed

This is kind of a fun new feature in Python. While I personally don’t have any use cases for this in my current job, hopefully you will have one at yours.

PyDev of the Week: Oleg Broytman

This week we welcome Oleg Broytman (@phd_ru) as our PyDev of the Week. Oleg is the maintainer of the SQLObject project. According to their website “SQLObject is a popular Object Relational Manager for providing an object interface to your database, with tables as classes, rows as instances, and columns as attributes.“. You can also see what else Oleg is a part of via Github and his website. Let’s take a few moments to get to know Oleg better!

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

I was born in Central Asian part of Soviet Union. I relocated to Moscow, Russia to study computer science at CS department of Moscow State University. I started to program before IBM PC era, my first computers were Soviet clones of PDP-11 and IBM/360.

Outside of my professional job I spend a lot of time with computers taking parts in Free Software projects.

Other than that I live usual life spending time with my family, reading books, listening music, watching videos.

Continue reading PyDev of the Week: Oleg Broytman

wxPython Cookbook Artist Interview: Liza Tretyakova

I always put a lot of thought into the covers of my book. For my first book on wxPython, I thought it would be fun to do a cookbook because I already had a lot of recipes on my blog. So I went with the idea of doing a cookbook. For the cover, my first thought was to have some kind of kitchen scene with mice cooks. Then I decided that was too obvious and decided to go with the idea of an Old West cover with cowboy (or cow mice) cooking at a fire.

I asked Liza Tretyakova, my cover artist for wxPython Cookbook, to do a quick interview about herself. Here is what she had to say:

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

My name is Liza Tretyakova, I’m a free-lance illustrator currently working in Moscow.


  • Moscow State University, Faculty of History of Arts
  • BA(Hons) Illustration, University of Plymouth

I work as an illustrator for about 10 years. I love horses and I used to have a horse. Also I’m interested in archery. I like reading and spending a lot of time with my daughter Yara, who is 7 years old.

What motivated you to be an illustrator versus some other profession?

Since I was a child I have been drawing all the time and it just happened that I started to work as an illustrator, it turned into a profession.

What process do you go through when you are creating a new piece of art?

It is different every time, there is no specific “recipe” 🙂

Do you have any advice for someone who wants to be an illustrator?

You should try to draw every day, the more the better.

Do you have anything else you would like to say?

It was a pleasure working with you!

Thanks so much for doing the interview and for agreeing to be my illustrator for my wxPython Cookbook.

You can see more of Liza’s work on Behance.

PyDev of the Week: Ivan Levkivskyi

This week we welcome Ivan Levkivskyi (@ILevkivskyi) as our PyDev of the Week! Ivan is the author or coauthor of several Python Enhancement Proposals, specifically 483, 484 and 526. In other words, Ivan is one of the lead developers behind adding type hints to Python via the typing module. Ivan is a scientist and as such, he has written a lot of interesting research papers, which I will readily admit that they are over my head. You might also find his Github page interesting as he is involved in a lot of projects. Let’s take some time to get to know our fellow Pythonista better!

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

I work as a researcher in theoretical physics. I was more interested in mathematical physics in high school, but now I mostly interested in mesoscopic physics — area that investigates the boundaries between our macroscopic world and the quantum microscopic world. I have been learning physics for about 20 years and never had any CS education. Although, I should note that my rough familiarity with category theory helps me in the programming world.

Most of the time, programming was rather my hobby, only the last 5 years I have been programming for work. My first acquaintance with programming was learning x86 assembly at an age of 10. Then I played with other languages from time to time. And now I use Python a lot in my work, mostly for prototyping and number-crunching.

I am from Ukraine originally, but now live in Switzerland. Apart from physics and programming, I like mountain sports: hiking, rock climbing, ski touring, etc. Also I like listening to music a lot and I used to play accordion and bass.

Continue reading PyDev of the Week: Ivan Levkivskyi