Jump to content


Photo

python3 python-wifi module


  • Please log in to reply
15 replies to this topic

#1 Opvolger

  • Member
  • 9 posts

0
Neutral

Posted 3 January 2021 - 22:03

Hi all,

 

I saw that OpenPli still uses python2. I was looking at the source-code and saw that there was at least 1 module which is no longer maintained but is used in this project, namely python-wifi. So I thought why not even turn this one into python3. It is also a learning path for me, but it all seems to go smoothly so far. It's a start and it also works with python 2.7. All get functions seem to work, I have yet to do the setters.

 

Here a link: https://github.com/O...fi/pull/1/files



Re: python3 python-wifi module #2 WanWizard

  • PLi® Core member
  • 70,762 posts

+1,830
Excellent

Posted 3 January 2021 - 22:51

It is very difficult to switch to Python 3 because of the 1000's of plugins out there that are not or very poorly maintained, which will stop working when we switch.

 

We're indeed busy with the first step, making the Enigma code compatible with Python 3, without breaking 2.7 compatibility.


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: python3 python-wifi module #3 Opvolger

  • Member
  • 9 posts

0
Neutral

Posted 3 January 2021 - 23:15

Kodi now has the same problem, but now take the big step with version Matrix. Ultimately, everything has to be over, because you cannot miss the new functionality. For example, there will be newer SSL / TLS versions or something else that will no longer work in python2 (plugins). I hope converting python wifi is one step in your process. Python is not too difficult a language for me and a night rewriting a module I can do more than once if necessary. Not 1000+ plugins :)



Re: python3 python-wifi module #4 WanWizard

  • PLi® Core member
  • 70,762 posts

+1,830
Excellent

Posted 4 January 2021 - 00:00

I totally agree with you. But discussions about modernisation are always difficult, but really needed, given the level of crap that is the enigma codebase...


Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Ultimate (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)

Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.

Many answers to your question can be found in our new and improved wiki.


Re: python3 python-wifi module #5 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 4 January 2021 - 01:22

https://github.com/O...o-python3.patch

 

BTW py3 isn't for normal users yet.


Open Vision sources: https://github.com/OpenVisionE2


Re: python3 python-wifi module #6 littlesat

  • PLi® Core member
  • 57,381 posts

+708
Excellent

Posted 4 January 2021 - 07:55

For example, there will be newer SSL / TLS versions or something else that will no longer work in python2 (plugins).
->
Maybe they can still be back ported as long back porting is less work then transfer whole enigma2 with it’s plugins....

But when enigma2 is not really end of life some time it need to be adapted. Please note we already worked on it see our python3 branch but this branch is already behind and as far I remember does not really work yet.

Edited by littlesat, 4 January 2021 - 07:58.

WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: python3 python-wifi module #7 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 4 January 2021 - 08:02

No the branch don’t work. Was only a proof of concept. Eg OpenATV 6.5 uses python3, but still has issues.
Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: python3 python-wifi module #8 littlesat

  • PLi® Core member
  • 57,381 posts

+708
Excellent

Posted 4 January 2021 - 08:48

Sounds like a big huge project at this moment and indeed a lot of plugins (there are lots of them users are using where nobody has sources from) will die....


WaveFrontier 28.2E | 23.5E | 19.2E | 16E | 13E | 10/9E | 7E | 5E | 1W | 4/5W | 15W


Re: python3 python-wifi module #9 Opvolger

  • Member
  • 9 posts

0
Neutral

Posted 9 January 2021 - 17:40

I think you have to start somewhere. So check libraries that may already support python3 and update them. (still with python2, but update). Then you will automatically have the libraries that cannot be transferred to python3, so you have to look for alternatives or convert them yourself. Then you can worry about all the plugins



Re: python3 python-wifi module #10 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,503 posts

+118
Excellent

Posted 9 January 2021 - 21:10

'you' as in the developers from OpenPLi or external contributors to OpenSource as OpenPLi?


on the Glassfibre 1GB DVB-C...


Re: python3 python-wifi module #11 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 9 January 2021 - 21:14

I wouldn’t look too much into single python packages. Better first start with e2 itself. There is enough code which is not python3 compatible. For several things there are tools to fix it, but you still need manual work.

Edit: And helping hands are always welcome ;)

Edited by betacentauri, 9 January 2021 - 21:15.

Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: python3 python-wifi module #12 Erik Slagter

  • PLi® Core member
  • 46,969 posts

+542
Excellent

Posted 10 January 2021 - 11:50

Edit: And helping hands are always welcome ;)

:)


* Wavefrontier T90 with 28E/23E/19E/13E via SCR switches 2 x 2 x 6 user bands
I don't read PM -> if you have something to ask or to report, do it in the forum so others can benefit. I don't take freelance jobs.
Ik lees geen PM -> als je iets te vragen of te melden hebt, doe het op het forum, zodat anderen er ook wat aan hebben.


Re: python3 python-wifi module #13 Opvolger

  • Member
  • 9 posts

0
Neutral

Posted 30 January 2021 - 22:33

I wouldn’t look too much into single python packages. Better first start with e2 itself. There is enough code which is not python3 compatible. For several things there are tools to fix it, but you still need manual work.

Edit: And helping hands are always welcome ;)

 

can you easily start e2 (locally)? That will make debugging and modifying code a lot easier. That is the reason that I now took 1 module. I could run and test these locally.



Re: python3 python-wifi module #14 betacentauri

  • PLi® Core member
  • 7,185 posts

+323
Excellent

Posted 30 January 2021 - 22:43

You mean locally on your PC? No, that's not easily possible. There are some projects, which make it possible, but afaik their code differ from our.

And as e2 consists of c++ and python, compiling a python3 e2 version is also not very easy.

 

But just look at the e2 python code. E.g. exception handling. Is it compatible with python3? And handling division and so on.... So you rewrite much python code so that it is compatible with 2 and 3 on your box.


Xtrend ET-9200, ET-8000, ET-10000, OpenPliPC on Ubuntu 12.04

Re: python3 python-wifi module #15 1455

  • Senior Member
  • 409 posts

+12
Neutral

Posted 18 October 2022 - 21:35

Here a link: https://github.com/O...fi/pull/1/files

Needs to be remake for Python 3.10.6. '2to3' doesn't help. There is a 'tostring' which has been removed for a long time.
I can't separate bytes and strings.

 
 

 

 


GIT OpenPLi-PC_Python2

GIT OpenPLi-PC_Python3

 

 

 

 

 

 

 

 

 

 

 

 
 

 

 


Re: python3 python-wifi module #16 1455

  • Senior Member
  • 409 posts

+12
Neutral

Posted 20 October 2022 - 15:32

 

Here a link: https://github.com/O...fi/pull/1/files

Needs to be remake for Python 3.10.6. '2to3' doesn't help. There is a 'tostring' which has been removed for a long time.
I can't separate bytes and strings.

Sorry, I found a new working version in openpli-oe-core.
 


GIT OpenPLi-PC_Python2

GIT OpenPLi-PC_Python3

 

 

 

 

 

 

 

 

 

 

 

 
 

 

 



3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users