Python -- GUI / Compiled Apps

Kiopa_Matt

Banned
May 13, 2011
5,216
52
0
Brilliant me went and lost a couple weeks of work again, so looks like I'm starting over on my desktop app. Basically, it's just a simple GUI app that will allow offline signing of bitcoin transactions. So target machines for this GUI app will be offline, and will not have access to the internet. I went with Qt at first, because it's cross-platform and will compile all necessary libraries in for me, so it's just a simple executable for each OS that *should* work on all machines.

I'm curious, is the same possible with Python? From what I've read it seems so, but just want to make sure before I waste time on it. Would be nice, because as mattseh proved, Python makes big integer math easy, and I already know ECC is really easy in Python as well.

Again, target machines are offline, and non-tech users, so it has to be easy. I can't have, "just install OpenSSL, Python v2.7.1+, these 6 Python libraries, plus this extra non-standard library for the secp256k1 curve, change this and that configuration, and it should work fine". Has to be compiled into a simple executable, they copy it onto the offline computer, open it, and it works right out of the box.

From what I've read, I want to use TkInter for development, then Py2Exe for Windows executable, Freeze for the LINUX executable, and Py2App for Mac.

Is that right? Or any insight? I'm new to this Python stuff. :) And if I go this route, is everything going to be compiled in for them? Or am I going to get constant messages from people saying they can't run the app because XYZ library isn't installed? Would it maybe be safer just to stick with Qt and C++, which I know will work fine?

Thanks!
 


I use PyQt4 with py2exe for making apps I have sold here, like wikismasher. It'll produce an exe, with a few DLLs in a folder, which you can distribute. Linux / mac usually come with python, so you could distribute the requirements vendorized in, or go with the freeze / py2app options.

Pm me your skype if you want to chat :)

(this is how we convert the PHP users, folks ;))
 
Ooooo... thanks, this is quite nice. I think I might like this.

Bit finnicky on the white space though, no? "you have a tab instead of 4 spaces, so fuck you, I'm not running". I can already see that being a headache.
 
Try pycharm, I enjoy it.
And just choose tabs or spaces, then stick to it.

And enjoy rewriting a lot of code in a few months, when how to write properly pythonic code has "clicked" :)
 
And enjoy rewriting a lot of code in a few months, when how to write properly pythonic code has "clicked" :)

Months??? What do I look like? Someone who's going to visit Lynda and take an "Introduction to Python" course, or something? Give me at least a little credit here... 2 weeks, tops. ;)
 
Write a python script which processes a csv, which has the first row as headers, then the rest of the rows as data. It makes a data structure, which has the unique data from each column, under the key of the header name.

Eg, csv of states and cities, so you'd have the unqiue states, and unique cities, but of course it should support any number of columns.

Then try again in 2 weeks or whatever, and you'll see what I mean.