How to Distribute a wxPython Application

Let’s say you finished up a wonderful GUI application using wxPython. How do you share it with the world? This is always the dilemma when you finish an amazing program. Fortunately, there are several ways you can share your code. If you want to share your code with other developers, than Github or a similar website is definitely a good way to do. I won’t be covering using Git or Mercurial here. Instead what you will learn here is how to turn your application into an executable.

By turning your code into an executable, you can allow a user to just download the binary and run it without requiring them to download Python, your source code and your dependencies. All of those things will be bundled up into the executable instead.

There are many tools you can use to generate an executable:

You will be using PyInstaller in this tutorial. The main benefit to using PyInstaller is that it can generate executables for Windows, Mac and Linux. Note that it does not support cross-compiling. What that means is that you cannot run PyInstaller on Linux to create a Windows executable. Instead, PyInstaller will only create an executable for the OS that it is ran on. In other words, if you run PyInstaller on Windows, it will create a Windows executable only. Continue reading How to Distribute a wxPython Application

PyDev of the Week: Bruno Rocha

This week we welcome Bruno Rocha (@rochacbruno) as our PyDev of the Week! Bruno works for Red Hat and participates in the Python, Flask and Rust communities. You can see some of his projects over on Github or check out some of his writings on Medium. Let’s take a few moments to get to know Bruno better!

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

I’m Bruno Rocha, Software Engineer from São Paulo, Brazil.

I started playing with computers at a very young age when I was 12 when my mother gave me an old IBM XT 5160. After a few days playing DOOM and studying LOTUS 123 worksheets, I naturally became the computer boy in the family. I did a course of MS.DOS 6.22 (the novelty of that time) and learned to program some things with BASIC and dBase, a few years later the web appeared in Brazil and I started to make HTML sites with CGI in Perl and also to create programs with macros in MS Access 95.

I worked for some years as an instructor in basic computer courses, some jobs as a web designer, I also worked with network installation, PC building, and in 1998 I met Linux through Conectiva (A Brazilian Red Hat based distro). I got involved with Open Source and Linux and then I became sysadmin in hybrid networks with Linux and Windows NT.

Years later I joined the University of Information Systems and I graduated, during graduation I fell in love with programming and since then I have been working with software development, started some small business (in the days when we did not call it “startup”), I worked for Palm Inc. developed drivers and sales force systems for Palm OS with C, developed portals and CMS for several large companies in Brazil, taught online Python courses, worked in the Data Science team of the largest Job board in Brazil and since 2016 I have been dedicated to Quality Engineering and Test Automation at Red Hat.

Besides software and computers, I am vegetarian since I was born, and vegan for more than 15 years. I have been very active in animal rights activism movements and also in the rescue of abandoned animals (currently taking care of 32 rescued animals).

In my free time I love cooking vegan food but my favorite hobby is road cycling, I have participated in some vintage bike races with my Bianchi 1973 and my Caloi-10 1980, recently I became father of a boy, Erik is 3 months old and life has changed a little and since then my favorite hobby has been to sleep when I can. Continue reading PyDev of the Week: Bruno Rocha

PyDev of the Week: Maria Khalusova

This week we welcome Maria Khalusova ( @mariakhalusova) as our PyDev of the Week! Maria works for JetBrains and will be speaking at AnacondaCON this April. If you’d like to catch up with her, you can check out Maria’s blog. Let’s take a few moments to get to know Maria better!

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

Growing up I loved two things – math and books. I kid you not, I solved math problems for fun. Not surprisingly, I went on to study Applied Informatics at the Dept. of Mathematics and Mechanics of Saint Petersburg State University which I graduated from in 2007. This field is actually really close to modern Data Science, all the math parts of it were there, plus a good chunk of computer science program. I only wish I got to learn Python at my University and not Java 😀 Sadly, back then such fundamental packages like pandas and scikit-learn didn’t even exist yet.

Even before I graduated, I started working at JetBrains, first as a technical writer for IntelliJ IDEA. Fun fact: this June will be 13 years since I joined the company. I’ve changed projects, job roles, countries even, but not the company.

In recent years I’ve re-discovered my passion for math, data science, machine learning, and deep learning. I’ve brushed up on my rusty math knowledge and have been self-educating ever since. This is a never-ending process which I think is great. Continue reading PyDev of the Week: Maria Khalusova

Book Review: Serious Python

No Starch Press asked me to do a technical review of one of their upcoming books, “Serious Python: Black-Belt Advice on Deployment, Scalability, Testing, and More” by Julien Danjou last year. I had never worked with No Starch before, but decided to give them a try and see how they differed from Packt Publishing. I ended up liking their process and the book was fun to read as well. It should be noted that No Starch did not ask me to do a book review. They only wanted me to do a technical review for them before the book was published.

I am writing this review because I think this book should get a little bit more notice. Also I interviewed its author a few years ago, so you might want to check that out too.

Quick Review

  • Why I picked it up: Originally, the publisher asked me to do a technical review
  • Why I finished it: The book covers intermediate level material and has an engaging writing style
  • I’d give it to: Beginners that want to grow beyond just knowing Python’s syntax

Continue reading Book Review: Serious Python

PyDev of the Week: Mariusz Felisiak

This week we welcome Mariusz Felisiak (@MariuszFelisiak) as our PyDev of the Week! Mariusz is a core developer of the Django web framework and a maintainer of the django-request package. You can follow Mariusz over on Github to see what he’s been up to. Let’s spend some time getting to know Mariusz!

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

Few facts from my life. I’m a software developer with over 11 years of experience in designing and implementing web applications. I graduated in Computer Science in 2010. I defended my PhD thesis related with numerical algorithms in 2018. I’ve done this after few years of coping in the same time with open source activities, daily job and PhD studies. It was a really intense time.

I’m always eager to contribute to open source projects which takes a large part of my free time, or at least it took before my daughter was born 🙂 I have been in love with Python and Django for 10 years. From 2017 I’m a member of the Django Core Team and the Django Software Foundations. In the middle of March I’m starting as a Django Fellow so Django will become my daily work! The funniest thing is that I should have more “free-time” 🙂 I’m a huge fan of open source and communities that stand behind them, that’s why I’m trying to be as involved as possible.

Outside of the tech world I’m a speedway fan who spends free-time on traveling and winter mountaineering. Continue reading PyDev of the Week: Mariusz Felisiak

Pros and Cons of Indy Publishing

I personally really love self-publishing or Indy Publishing, so I am a little biased. In this article, I will go over what I think are the pros and cons of Indy Publishing versus going with a “real” publisher.


Here are my favorite parts about indy publishing:

  • I control the release date
  • I control the content
  • eBooks can be updated within minutes
  • Your royalty rate is 70-90%
  • Prices can be changed in seconds
  • Flash sales are easy
  • It looks good on a resume / cv

I’m going to expand a bit on some of these points. I have worked with two publishers as an author: Packt Publishing and Apress. Packt has very aggressive timelines for getting things done. Chapters have to be done according to the schedule. A publisher can throw you curveballs when you are getting close to the end as well. When you self-publish, you control all of that. Continue reading Pros and Cons of Indy Publishing

How I Write Books about Python

I get asked questions about my book writing process from time to time and I have been meaning to write about this topic for a while. The main reason I wrote my first book, Python 101, was because of the readers on my blog. They had been encouraging me to write a book on wxPython for a while and I decided that I should start by writing an introductory book so I wouldn’t need to include a bunch of introductory information in my intermediate level book if I ever got around to writing it.

When I was writing that book, I had to search for ways to generate PDF, mobi (Kindle) and epub formats. I skipped Microsoft Word because I hadn’t seen good ways to convert that document type to other file types and it didn’t work well cross-platform anyway. Continue reading How I Write Books about Python

PyDev of the Week: Lilly Ryan

This week we welcome Lilly Ryan (@attacus_au) as our PyDev of the Week! Lilly is a pen-tester. She is an organizer of PyCon AU 2018 and 2019 and an experienced speaker. In fact, Lilly will be giving a keynote at DjangoCon Europe later this year. You can learn more about Lilly by visiting her website. Let’s take a few moments to get to know Lilly better!

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

I’m a pen tester from Australia. When I’m not hacking, I spend my time researching for talks, cooking, knitting a variety of strange things, and looking after two very cuddly greyhounds.

I was previously a software developer, a QA, an English tutor, and a medieval historian. My formal education has all been in medieval history, where I specialised in fourteenth century inquisitorial manuals. I started to pick up more detailed tech knowledge after learning that Linux existed, becoming super curious, and spending a lot of my free time diving into learning how to install it on a laptop and debugging desktop installation quirks. Continue reading PyDev of the Week: Lilly Ryan

PyDev of the Week: Maria McKinley

This week we welcome Maria McKinley (@twiteness) as our PyDev of the Week. Maria is a Senior Software Engineer at the Walt Disney Company and will be a speaker at PyCascades 2019. She is also teaching the Python Certificate Program at the University of Washington Continuing Education. You can read more about her on her website as well. Let’s spend a few moments getting to know her better.

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

I have a BS in Physics from the University of Washington, and taught myself how to code while working in Neuroscience labs at the same University. I got to work on some amazing research projects, while discovering how much I enjoyed writing code. In October 2015 I started working at the Walt Disney Company as a Senior Software Engineer. I also teach Python, both at the University of Washington and within Disney. And I’m a mom. All of that keeps me pretty busy, but I also try to set aside time for reading, exercise, playing boardgames, and art. Continue reading PyDev of the Week: Maria McKinley

Creating a Calculator with wxPython

A lot of beginner tutorials start with “Hello World” examples. There are plenty of websites that use a calculator application as a kind of “Hello World” for GUI beginners. Calculators are a good way to learn because they have a set of widgets that you need to lay out in an orderly fashion. They also require a certain amount of logic to make them work correctly. For this calculator, let’s focus on being able to do the following:

  • Addition
  • Subtraction
  • Multiplication
  • Division

I think that supporting these four functions is a great starting place and also give you plenty of room for enhancing the application on your own. Continue reading Creating a Calculator with wxPython