Can a WebGUI toolkit like Muntjac be installed?
I want to try and design a web based app and I like the UI set of Muntjac. It is a pure python implementation and it looks like its dependancies are as well. I think it would work if the directories can be set up and referenced as part of the path. I just really don't know how to go about getting it all extracted into its relevant directories and setting up the system path so that each part can see the modules they are dependent on. I tried using the pipsta script since install utilities don't work in Pythonista. But nothing ever installs:
This is what I get when trying to install with pipsta
Downloaded 32397 of 32397 bytes (100.00%)
Saved to: mox-0.5.3.tar.gz
setup.py found here: /private/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Documents/.tmp/unpack/mox-0.5.3
Compiling pure python modules ...
Looks successful but there are no modules installed and even the download file is missing. Browsed through the directory structure with shellista and still dont see anything anywhere.
Any help would be appreciated.
Frankly, it's a bit of a pain to gather all the dependencies, so I've done that on a Mac and made a little all-in-one package that is easier to get into Pythonista.
Here's the installer script:
...and here's the slightly modified "Hello World" example to show how you can use the webbrowser module to access a muntjac app:
I haven't tested this extensively, but it seems to work fine in Pythonista.
This is amazing that you were able to get that set up so quickly. I have actually been trying to get it all together for a couple days now. I would have never thought of building it on my Mac first. I am going to try that approach with a couple other things I'd like to try in the future..
I do get an error trying to run the hello world though.
On line 5 i get :
DistutilsPlatformError:Invalid Python Installation: unable to open /var/mobile/applications/lib/python2.7/config/makefile (no such file or directory)
I thought I read in another post that distutils was broken and there was something added to the pipista.py script that sort of patched it. Do I need to do something with that before running the hello world?
Oh and thank you for getting that put together like that. I would have been at it all weekend.
More on the error.. I did this in the console to see if there was more info...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "muntjac_pythonista/muntjac/api.py", line 17, in <module>
from muntjac.application import Application
File "muntjac_pythonista/muntjac/application.py", line 24, in <module>
from muntjac.util import EventObject, IEventListener, defaultLocale
File "muntjac_pythonista/muntjac/util.py", line 21, in <module>
File "muntjac_pythonista/paste/init.py", line 4, in <module>
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Documents/pkg_resources.py", line 698, in <module>
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Documents/pkg_resources.py", line 701, in Environment
def init(self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR):
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Documents/pkg_resources.py", line 96, in get_supported_platform
plat = get_build_platform(); m = macosVersionString.match(plat)
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Documents/pkg_resources.py", line 224, in get_build_platform
plat = get_platform()
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Pythonista.app/pylib/distutils/util.py", line 98, in get_platform
cfgvars = get_config_vars()
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Pythonista.app/pylib/distutils/sysconfig.py", line 508, in get_config_vars
File "/var/mobile/Applications/41061525-6601-4DED-9287-C1976C67C450/Pythonista.app/pylib/distutils/sysconfig.py", line 365, in _init_posix
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /var/mobile/Applications/lib/python2.7/config/Makefile (No such file or directory)
It looks like you have the pkg_resources module in your library (probably from pipista), try deleting that (or rename it).
It works! Wish I could rate pythonista again. This thing deserves way more than 5 stars.