I have a web application that I would like to have a version of it on the desktop. It would be totally awesome if i can just compile it rather than rewrite it. (I can't give the customer the code unfortunately)
I did some research and found some solutions to compile python in general. These solutions are:
That desktop application will run mainly on Windows, but if I can find a solution that would make it run on Linux and Mac too it would be great.
Did anyone manage to do this properly ? If so, can you please point me to the right direction?
Thanks.
Not only JS folks can reuse web tehnologies for desktop applications we can do it too. If you want to create a nice gui and you want to reuse your web tech knowledge try flaskwebgui.
We have to be able to use the project with apache so it cannot be compiled into a standalone binary. The way I think of it is that it will be compiled into libs and these libs will be exposed to the interpreter so it should behave like the current state of the project with python.
Yes, I am doing this on OSX. It's not simple and, as far as I can tell, I may be the first person to successfully do it on OSX, so YMMV.
Pyinstaller, as of March, wasn't quite ready for Django support. I've filed a few tickets from when I tried to use it to package my application and I have admittedly not fixed those issues yet.
I went with py2app, ultimately, because I had prior experience with it for other applications. I made a sample project with py2app and Django and put it on Github. You may find it useful. I also linked a few of the pages that I found useful in the process, which I've included below:
https://groups.google.com/forum/?fromgroups=#!topic/django-users/-VGqvHew35g
http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/
https://bitbucket.org/Lawouach/cherrypy-recipes/src/9c35b4b62ef1/frameworks/django_?at=default
If I had to do it again, I would probably use SQLAlchemy and wxPython or PySide. I'd recommend thinking carefully about what you'd like to achieve using Django as a packaged application because it introduces a lot of complexity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With