100 Days of code – 60% complete
So I realized that PyTone isn’t only built in Python 2, but it’s also built to work on Linux. Because it’s supposed to run on Linux, it’s designed to use the GCC compiler for the initial setup, and designed to use curses (which is Linux only) for the interface. During this project, I’ve had to:
- Install Microsoft Visual Studio with the Python development package (so I can compile C programs)
- Download and install several versions of pdcurses (public domain curses)
- Install Unicurses (to get pdcurses to work with Python)
- Figure out that 64 bit Python 3 doesn’t work with Unicurses
- Install Python 3 in 32 bit and confirm that Unicurses works on its own
- Modify the PyTone files to work with Unicurses, rather than curses
- Modify the PyTone files to run on Python 3, rather than Python 2
I’m still a long way from being done with this project, but I’m learning a lot about the differences between a Linux and Windows development environment, and the differences between Python 2 and Python 3. I think it’s going to take a lot of time to get this project complete.
My current workflow is to attempt to run PyTone with Python 3, see an error, and learn what that error means (usually a Python 2 vs. Python 3 issue). Once I understand the error, I’ll modify the program so that part works in Python 3. I’ll then start again and learn about another error.
It’s very slow going, and I’m sure there’s at least three easier ways to do this. I don’t really mind my slow progress though, because I’m learning a ton! I never really learned the differences between Python 2 and Python 3 (other than the print function) and this seems like a good way to learn. It seems like there’s a ton of Python 2 resources out there that haven’t been converted to Python 3 yet, so I’m sure I’ll run into something like this again.
Have a happy and safe New Year’s Eve celebration, and I’ll see you in 2019!