![]() |
NeutrinorRemote...python help plz
hi, I would like to make a python script to run http:// commands like
wget -q http://192.168.2.45/control/rcem?KEY_HOME but i don't know , how can i make it, i'm not fit in python, I would like to make buttons to click. like: 1 (command: wget -q http://192.168.2.45/control/rcem?KEY_1) 2 (command: wget -q http://192.168.2.45/control/rcem?KEY_2) .. 10 (command: wget -q http://192.168.2.45/control/rcem?KEY_10) Red (command: wget -q http://192.168.2.45/control/rcem?KEY_RED) Exit (command: wget -q http://192.168.2.45/control/rcem?KEY_HOME) etc. how can i make that?? a little help start , would be nice.. |
Re: python help plz
Look into python standard library subprocess
|
Re: python help plz
Code:
import os |
Re: python help plz
If you don't want to use a subprocess to start wget, you can use the urllib2 module ( http://docs.python.org/library/ ) :
Code:
import urllib2 |
Re: python help plz
Quote:
|
Re: python help plz
Check this out:
http://www.pygtk.org/pygtk2tutorial/.../helloworld.py Add the urrlib2 code into the the def hello(...) function. Once you get the one button working, then you can copy/paste the button creation code to create the multiple buttons, and place them into a gtk.VBox (a container for your buttons). |
Re: python help plz
why dont you just use the desktop execution widget in the repos
http://talk.maemo.org/showthread.php...ktop+execution |
Re: python help plz
after some reading, ive finish my python, not nice, but my first :D
http://i42.tinypic.com/63vwh3.jpg |
Re: python help plz
Hey! congrats mate!
|
Re: python help plz
any idea to replate all ip's with only one?
like: IP = 192.168.2.45 urllib2.urlopen('http://IP/control/rcem?KEY_HOME') |
Re: python help plz
Quote:
IP = '192.168.2.45' urllib2.urlopen('http://' + IP + '/control/rcem?KEY_HOME') |
Re: python help plz
or
Code:
IP = '192.168.2.45' |
Re: python help plz
Quote:
When it is ready I'll post a link! :) But mine is in contrast for the Dreambox Receivers. Is your software is for the tuxbox? German: GNU DBox2 Software Projekt |
Re: python help plz
First Learn python , i bet u wont ask such questions again !!
Basics of python is enugg .. and for GUI. use pygtk. |
Re: python help plz
Quote:
i can change the links ,then it works with enigma2 too :D sh4 duckbox git (e2,neutrino-HD and vdr) |
Re: python help plz
now i play with images:
normal: http://i40.tinypic.com/2hqa4nd.jpg pressed arrow button: http://i41.tinypic.com/9u6s7a.jpg pressed ok button: http://i39.tinypic.com/11qipoh.jpg follow: volume up,down buttons . play,stop,rec usw. |
Re: python help plz
Quote:
I worked the last weeks on a remote (only) for the Dreambox (I don't know much about other linux based home entertainment systems), I answerd this morning in your app request thread. (Sorry, haven't seen it before this morning. Otherwise I had answered before. :o) So it's not needed for me to change the links in your application. I finished mine already for my needs. :) But if you wan't we can work together to get it for your neutrino-HD box working. If you have more fun in learning and programming I wouldn't integrate the neutrino functionality in my application and let you enjoy what you're developing. :) Get a working result out of hard work is very important. I know that! ;) |
Re: python help plz
i think i'm done....looks cool for me.. ..
if someone wants to test http://rapidshare.com/files/38733251...rinoRemote.zip |
Re: python help plz
Quote:
|
Re: python help plz
Quote:
|
Re: python help plz
Quote:
Downloading via rapidshare... |
Re: python help plz
Quote:
|
Re: python help plz
@bonkel: Any reason you aren't using Designer? Nothing wrong with doing things by hand, but it may speed up development for you. Also, any reason you don't have an __init__() method for your class?
|
Re: python help plz
Are you still continuing this project to make a proper application out of it?
|
Re: python help plz
1 Attachment(s)
Quote:
So I guess the development of your small project is totally abadoned? I got several requests to integrate dbox2 support (Neutrino Image) into my DreamRemote. After a long time of waiting I integrated yesterday the support. I attached a screenshot and I will upload the new version next Weekend to extra devel. Only to inform all followers of this thread. |
All times are GMT. The time now is 11:59. |
vBulletin® Version 3.8.8