I wanted to describe and show here some mockups of applications, but… I won’t 😛 I’ve started to setting up the environment, then creating a release for old application, then checking if everything is properly set up, then… just write some code. And continue reading Python 101 book. It’s very basic, but it has already give me some ideas, so it’s worth reading.
I’ve set up the environment using Python 3.5.3 and PyQt 5.8.0 and wrote some code for displaying image from selected directory.
I’m using Python in version 3.5.3 and PyQt5 in version 5.8.0. Because I’m using OS X I had to install some packages to actually make it working. I’ve used Homebrew to install
pyenv is used for managing Python versions and
pyenv-virtualenv is used for creating a separate environment for Photochooser.
I had to do that because on OS X there is preinstalled Python but in version 2.7. On the other hand in Homebrew the newest version of python is 3.4.4. Why not using them? 2.7 is old and not recommended for new applications. 3.4.4 will be ok, but I can install PyQt5 using
pip only using Python >=3.5. I could install it from binaries or something, but I wanted to specify required version in
To use chosen Python version all I have to do is create and activate virtualenv. In my case steps are as follow:
1. install Python 3.5.3:
pyenv install 3.5.3
1a. at first it doesn’t work (with any version) but I’ve found the solution
2. create virtualenv:
pyenv virtualenv 3.5.3 photochooser – it’s created under ~/.pyenv/versions directory
3. activate virtualenv:
For developing I’m using PyCharm CE, a free version of the great tool from JetBrains.
I don’t want to loose my old version of Photochooser regardless of its quality. So I created release on GitHub to save the current code, it’s nobrainer and requires only a few clicks 🙂
If you’re curious how the old application looks like – here it is!
Old Photochooser was written using Python 3.4 and PyQt4, so it’s pretty useless, so I wiped out the whole code and start from scratch.
I focused on creating anything that works. So the MVP (minimal viable product) for now was an applications that allows user to choose directory with images and displays one of them in fullscreen. I’ve used my old code as well as great website with Python/PyQt tutorials – zetcode. In literally less than half an hour I’ve created very simple, yet functional, app.
Here is how it works:
If you want to dig into code you can find it on GitHub. I’m trying to keep it as simple as possible, there will be time to refactor later.
I wish the next post contains mockups of the application, but I’m not really good in creating ones. But if you know any tools helping with application desing – please, let me know!
If not mockups then I’ll continue writing the application and implement changing displayed images. And maybe write some unit tests, even the simplest ones – I don’t know how to do it in Python, so anything will be better than nothing 😉
Want more #GetNoticed2017 posts?
- Keep your logs short with logrotate
- Photochooser – version 0.2.1 released!
- About getting out of the comfort zone
- First tests in Python! #GetNoticed2017
- Photochooser – mockups! #GetNoticed2017
- Photochooser – one step back #GetNoticed2017
- Photochooser – the starting point #GetNoticed2017
- Daj Się Poznać 2017 (Get Noticed 2017)