Tag Archives: Python

PyDev of the Week: Hillel Wayne

This week we welcome Hillel Wayne (@Hillelogram) as our PyDev of the Week! Hillel is the author of “Learn TLA+” and is currently writing “Practical TLA+” with Apress. You should check out his website / blog as it is a good place to learn more about him. Hillel also recently spoke at PyCon US on testing. Let’s take a few moments to chat with Hillel!

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

I was planning on being a physicist for the longest time until my fourth year of college, when I suddenly switched to wanting to be a programmer. I spent a while as a fullstack in the Bay Area and a backend dev in Chicago, where I discovered a deep love of formal methods, or the practice of “mathematically” designing and building software. If you’ve read The Coming Software Apocalypse, that’s a really good introduction to the why and the what. I now do consulting and workshops, helping people with the how; these tools are way too powerful and useful to stay niche.

Beyond formal methods, my interests in tech are as follows:

  • Software Safety: where do bugs actually come from, and how we do make them less likely?
  • Empirical Software Engineering: what do we actually know is true in software engineering, and what do we just think is true?
  • Software History: how did we get where we are, and what can we learn from the past?
  • Weird and interesting niche ideas, languages, techniques, etc.

Outside of tech, I do a lot of juggling and cooking. I’m a super avid confectioner and chocolatier. There’s a place in Chicago that sells 10-pound bars of chocolate for 50 bucks and I usually go through about four bars a year. Continue reading PyDev of the Week: Hillel Wayne

Jupyter Notebook 101: Writing Update

I don’t usually write about my book writing while the book is in progress on my blog, but I know some readers probably wonder why there are times where I am not writing blog posts as regularly as I usually do. The reason is usually because I am deep into writing chapters for a book and if the book’s chapters don’t translate into good blog articles, then the blog itself doesn’t get a lot of new content.

Anyway, as you may know, I am currently working on a book called Jupyter Notebook 101 which I am currently planning to release in November. I have 7 of the planned 11 chapters finished, although I plan to go over the entire book and check it for errors once it’s done. I am hoping to get the other chapters done early so I can write a few bonus chapters too, but we will see how the writing goes. On the plus side, these latter chapters will make good blog fodder, so you can expect to see some interesting articles on the Jupyter Notebook appearing on this blog in the near future.

If you’re interested in checking out the book, you can download a sample from Leanpub.

PyDev of the Week: Younggun Kim

This week we welcome Younggun Kim (@scari_net) as our PyDev of the Week! Younggun has been on the board of directors for the Python Software Foundation and is the founder of PyCon Korea. He has translated several programming books into Korean. You can get the full list on his website. You can also check his Github to see some of the projects he has worked on. Now let’s take a few moments to get to know him better!

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

I’m a Pythonista based in Seoul, Korea and leading engineering department in a video streaming company. I’m also actively involved in our community, especially in the East Asia region. I have served as a board director of the PSF for the 2016/17 term with nomination by Carol Willing. I started PyCon Korea for the first time in 2014 with several local community members here. I travel for 5 or 6 PyCons in a year with a nice PSF conference kit. I’m serving on the PSF Grants working group now. Continue reading PyDev of the Week: Younggun Kim

wxPython 101: Creating a Splash Screen

A common UI element that you used to see a lot of was the Splash Screen. A splash screen is just a dialog with a logo or art on it that sometimes includes a message about how far along the application has loaded. Some developers use splash screens as a way to tell the user that the application is loading so they don’t try to open it multiple times.

wxPython has support for creating splash screens. In versions of wxPython prior to version 4, you could find the splash screen widget in wx.SplashScreen. However in wxPython’s latest version, it has been moved to wx.adv.SplashScreen.

Let’s look at a simple example of the Splash Screen:

import wx
import wx.adv
 
class MyFrame(wx.Frame):
 
    def __init__(self):
        wx.Frame.__init__(self, None, wx.ID_ANY, "Tutorial", size=(500,500))
 
        bitmap = wx.Bitmap('py_logo.png')
        splash = wx.adv.SplashScreen(
                     bitmap, 
                     wx.adv.SPLASH_CENTER_ON_SCREEN|wx.adv.SPLASH_TIMEOUT, 
                     5000, self)
        splash.Show()
 
        self.Show()
 
 
# Run the program
if __name__ == "__main__":
    app = wx.App(False)
    frame = MyFrame()
    app.MainLoop()

Here we create a subclass of wx.Frame and we load up an image using wx.Bitmap. You will note that wx.Bitmap does not actually require you to only load bitmaps as I am using a PNG here. Anyway, the next line instantiates our splash screen instance. Here we pass it the bitmap we want to show, a flag to tell it how to position itself, a timeout in milliseconds for how long the splash screen should show itself and what its parent should be. These are all required arguments.

There are also three additional arguments that the splash screen widget can accept: pos, size and style. You will note that in this example we tell the splash screen to center itself onscreen. We could also tell it to center on its parent via SPLASH_CENTRE_ON_PARENT.

You will, of course, need to modify this example to use an image of your own.


Wrapping Up

The splash screen is actually pretty useful if you have an application that takes a long time to load. You can easily use it to distract the user and give the illusion that your application is still responsive even when it hasn’t fully loaded yet. Give it a try and see what you think.


Related Reading

PyDev of the Week: Oliver Bestwalter

This week we welcome Oliver Bestwalter (@obestwalter) as our PyDev of the Week! He is one of the core developers of the tox automation project and the pytest package. He is also a speaker at several Python related conferences. You can learn more about Oliver on his website or on Github. Let’s take a few moment to learn more about Oliver!

Can you tell us a little about yourself?

I was born in West Germany on Star Wars day the year the last man set foot on the moon.

I took on my first job as a Software Developer when I was 39, right after earning my B.Sc. in Computer Engineering (in German: Technische Informatik).

Although I fell in love with computering in my early teens and with the idea of free software in my early twenties, back then I was more into music, literature and sports. In school I was led to believe that I was “not good at maths”, so studying Computer Science or anything technical was not an option. Composing and playing music dominated my teens and twenties. I played several instruments (bass, guitar and keyboards – mainly self-taught) alone, and in different bands. A few recordings from that time are online on Soundcloud.

When I was 28 I had a nasty skateboarding accident and broke my hand and elbow. This rendered me incapable of playing any instrument for over a year. I didn’t cope with that very well and descended into a deep crisis that led me to drop music and my whole social life which had revolved around it. At that point I was pretty isolated without any kind of formal education and honestly didn’t know what to do with my life. I took on a soul-crushingly boring job in the backend (read: loud and dirty part) of a semiconductor fabrication plant. Life wasn’t that great, but in my spare time I picked up my other passion again (computering) and used it to co-found and nurture a web based, not-for-profit support board. My co-founder happened to be a wonderful woman who later became my wife. So you never know what something is good for, I guess.

I tend to turn my hobbies into my job as I did with music back then and with computering now. Good food & drink has occasionally passed my lips, which might be called a hobby, when it is not purely imbibed for sustenance. Enjoying modern art, mostly in the form of films, books, and (very seldom nowadays) computer games are also part of my recreational activities. I am more an indoor enthusiast, but I also might go for a walk now and then. Being more on the introvert spectrum, I need a lot of alone time to recharge, but I also like to hang out with my family and my cat (it might be more appropriate to say that the cat sometimes likes to hang out with us, because she adopted us and definitely is the one calling the shots). Continue reading PyDev of the Week: Oliver Bestwalter

PyDev of the Week: Aisha Bello

This week we welcome Aisha Bello (@AishaXBello) as our PyDev of the Week! Aisha is the founder of PyLadies Nigeria and is passionate about STEM in developing countries. She is also an organizer for DjangoGirls in Africa. Aisha has gone around the world speaking talking about Python at EuroPython, DjangoCon, Python Brasil and the PyData conferences. Let’s take a few moments to get to know her better!

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

Currently I work as a Virtual Systems Engineer in the Data Center and Virtualisation practice for Cisco, Nigeria. I completed a Masters in Information Technology from Cardiff Metropolitan, where I worked on a Data Science project for the hospitality industry. I am very passionate about women empowerment and tech education in developing countries.

When I am not working you would catch me watching a movie, going for a gym class or exploring new places. Continue reading PyDev of the Week: Aisha Bello