Active Topics

 


Reply
Thread Tools
Dave999's Avatar
Posts: 7,074 | Thanked: 9,069 times | Joined on Oct 2009 @ Moon! It's not the East or the West side... it's the Dark Side
#41
Thank you for this thread. I love python but I feel it's hard to create application UIs for Sailfish. Do I really have to use Cute/QML?

Last edited by Dave999; 2013-11-18 at 17:01.
 
thp's Avatar
Posts: 1,391 | Thanked: 4,272 times | Joined on Sep 2007 @ Vienna, Austria
#42
Originally Posted by NokiaN9KickYourAss View Post
Thank you for this thread. I love python but I feel it's hard to create application UIs for Sailfish. Do I really have to use Cute/QML?
Yes, to be able to use the native Sailfish Silica UI elements, you have to use Qt and QML. However, if you don't care that much about native integration, using something like OpenGL ES directly or PySDL2 or something would probably also work - but you'd be on your own there atm
 

The Following 2 Users Say Thank You to thp For This Useful Post:
Posts: 3,464 | Thanked: 5,107 times | Joined on Feb 2010 @ Gothenburg in Sweden
#43
Originally Posted by rcolistete View Post
Any experience here to be shared about submitting Python software to Jolla Harbour ?
Python is in the emulator However it only python2 so there is no pyotherside and so on :/

But I really Hope jolla adds pyhon3 and pyotherside as "public" in some update.
__________________
Keep safe and healthy
 

The Following 2 Users Say Thank You to mikecomputing For This Useful Post:
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#44
Originally Posted by EmaNymton View Post
I'm facing the same problem here, I need lxml for python 3. I'm not that expirienced in installing packages without using the repository. Is there any repo in the meantime, which I can use and if not, could you please describe a little more detailed what to do, so I can start coding? Thanks in advance!
To answer my own question, if anybody got the same problem.
Install python3-devel via zypper,
Code:
zypper in python3-devel
download lxml-versionX.tar.gz, extract it via
Code:
tar xfz lxml-versionX.tar.gz
change into that directory and build with
Code:
python3.3 setup.py build
If everthings went well, install it
Code:
python3.3 setup.py install
Code:
[root@SailfishEmul nemo]# python3                   
Python 3.3.2 (default, Aug 11 2013, 23:05:29) 
[GCC 4.6.4 20130412 (Mer 4.6.4-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> lxml
<module 'lxml' from '/usr/lib/python3.3/site-packages/lxml/__init__.py'>
>>>
But the question remains: Will there be a python3, pyotherside, python3-lxml package in the standard repos or will it be necessary to ship it separately?
 

The Following 3 Users Say Thank You to EmaNymton For This Useful Post:
Posts: 120 | Thanked: 279 times | Joined on Sep 2009 @ Perth, Australia
#45
Originally Posted by EmaNymton View Post
I'm facing the same problem here, I need lxml for python 3. I'm not that expirienced in installing packages without using the repository. Is there any repo in the meantime, which I can use and if not, could you please describe a little more detailed what to do, so I can start coding? Thanks in advance!
Sorry for the late reply. I see you managed to install lxml anyway

The way I was installing lxml was using 'virtualenv'. Once installed, a virtualenv for python3 can be created using 'virtualenv --python=python3'. Once activated, packages can be installed inside the virtualenv using pip (e.g. pip install lxml). More info at: http://www.virtualenv.org/en/latest/
 

The Following User Says Thank You to mattaustin For This Useful Post:
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#46
Thank you anyway, I tried that before, but got an ImportError when using
Code:
./pip install lxml
Code:
ImportError: No module named 'ssl_match_hostname'
After searching a little bit without finding a solution I build lxml from source.
 
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#47
About Python softwares running on Sailfish OS (with PyOtherSide or PyQt), the Jolla Harbour policy doesn't accept them for the moment :
https://harbour.jolla.com/faq
Can I submit Python applications?
Currently not, there are some enablers missing for that. But we are working on it, to make that happen. You can support us with that effort, please ask in Nemo project how to help with Python.
I think thp's PyOtherSide will be promoted to a default Mer/Nemo/Sailfish repository so it will be available for any Python software.

I also support PyQt 5 to be available in Mer/Nemo/Sailfish repository, as well as many Python tools (IPython, including notebook) and modules (NumPy, SymPy, etc). I will try to contact the Mer/Nemo community about this issue in the weekend.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.
 

The Following 4 Users Say Thank You to rcolistete For This Useful Post:
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#48
Any tests on real Jolla smartphone with Python ???
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.
 
xerxes2's Avatar
Posts: 513 | Thanked: 651 times | Joined on Feb 2011 @ Sweden
#49
I made pyqt available for sailfish so anyone with a jphone can try it now with panucci:
http://talk.maemo.org/showpost.php?p...&postcount=563

Pyqt is very easy to build and the only dep it needs that is not available in sailfish already is sip so it wouldn't be much work to put it in a semi-official repo. Just poke me if you need working spec files for sip and pyqt.
__________________
But the WM7 "horse" has a blood lineage tracing back to donkeys such as WM6.5, 6.1, 6.0, 5.1 that was fully neglected for too many years and Microsoft did sweet F all to maintain it (still running on Pocket IE4/6!!).
 

The Following 8 Users Say Thank You to xerxes2 For This Useful Post:
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#50
Originally Posted by rcolistete View Post
Any tests on real Jolla smartphone with Python ???
Tested on Sailfish @ Nokia N9 :

1) Python is not installed by default, but it is simple to install v2.7.5 using Terminal :
$ pkcon install python

2) mer-tools repository is not enabled by default, but can be :
Code:
$ devel-su
# ssu ar mer-tools
# ssu ur
$ pkcon refresh
mer-tools has many tools, including more Python modules, see here and there.

3) adding repositories is done with "zypper ar -G", because without the option "-G" (--no-gpgcheck, Disable GPG verification for this repository) the Jolla Store stops working (it can't install any software).
For example, mer-python3 (with Python 3.3 and PyOtherSide) :
PHP Code:
# zypper ar -G http://repo.merproject.org/obs/mer-python3/latest_armv7hl/mer-python3.repo
# zypper ref
# zypper in python3-base pyotherside-qml-plugin-python3-qt5 
Or my rcolistete repository with Python tools and modules (IPython, SymPy, NumPy, Uncertainties) :
PHP Code:
# zypper ar -G http://repo.merproject.org/obs/home:/rcolistete/latest_armv7hl/ rcolistete
# zypper ref
# zypper in ipython python-sympy python-numpy 
IPython shows a warning saying PySide is not available (needed for IPython Qt console), you can force installation by choosing "2", so "ipython" (terminal console) and "ipython notebook" will work (the Sailfish web browser works very well with IPython Notebook).
SymPy and NumPy also work well on Sailfish.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2013-12-16 at 05:42.
 

The Following 4 Users Say Thank You to rcolistete For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:30.