File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # -*- coding: utf-8 -*-
21from __future__ import print_function
32from inspect import getfullargspec
43
87from time import sleep
98import logging
109import argparse
11- from .scan import LGTVScan
12- from .remote import LGTVRemote
13- from .auth import LGTVAuth
14- from .cursor import LGTVCursor
10+
11+ PACKAGE_PATH = os .path .abspath (os .path .dirname (__file__ ))
12+ if PACKAGE_PATH not in sys .path :
13+ sys .path .append (PACKAGE_PATH )
14+
15+ from scan import LGTVScan
16+ from remote import LGTVRemote
17+ from auth import LGTVAuth
18+ from cursor import LGTVCursor
1519
1620
1721config_paths = [
2125 "/opt/venvs/lgtv/config/config.json"
2226]
2327
28+
2429def get_commands ():
2530 text = 'commands\n '
2631 commands = LGTVRemote .getCommands ()
@@ -192,3 +197,5 @@ def main():
192197
193198if __name__ == '__main__' :
194199 main ()
200+
201+
Original file line number Diff line number Diff line change 1+ from __init__ import main
2+ if __name__ == "__main__" :
3+ main ()
4+
Original file line number Diff line number Diff line change 55import re
66import json
77
8- from . payload import hello_data
8+ from payload import hello_data
99
1010
1111class LGTVAuth (WebSocketClient ):
Original file line number Diff line number Diff line change 33import inspect
44from time import sleep
55
6- from . remote import LGTVRemote
6+ from remote import LGTVRemote
77from ws4py .client .threadedclient import WebSocketClient
88
99
Original file line number Diff line number Diff line change 99import os
1010import logging
1111
12- from . payload import hello_data
12+ from payload import hello_data
1313
1414
1515class LGTVRemote (WebSocketClient ):
Original file line number Diff line number Diff line change 1+ rem builds console and gui executables stored in the ./dist directory
2+ rem run "python -m pip install pyinstaller" to get pyinstaller
3+
4+ pyinstaller --clean --onefile --noconfirm --paths=.\LGTV --noconsole --name lgtv_gui lgtv.py
5+ pyinstaller --clean --onefile --noconfirm --paths=.\LGTV lgtv.py
Original file line number Diff line number Diff line change 1+ from LGTV import main
2+ if __name__ == "__main__" :
3+ main ()
4+
You can’t perform that action at this time.
0 commit comments