简体   繁体   English

你如何在OpenElec中运行python脚本

[英]How do you run a python script in OpenElec

I've looked all over but can't find a straight answer. 我看了一遍,但找不到直接的答案。 I've got OpenElec installed on my raspberry pi B+ and I want to start playing around with some script. 我已经在我的覆盆子pi B +上安装了OpenElec,我想开始玩一些脚本。

Which Directory do you put the files in and where do I go in OpenElec to run the python scipt? 你把文件放在哪个目录中以及我在OpenElec中去哪里运行python scipt?

cheers!! 干杯!!

1. Connect to your Raspberry Pi with SSH:
$ ssh root@192.168.1.1xx(IP)
password: openelec

2. Check
# python
Python 2.7.3 (default, Mar 31 2015, 22:10:50) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

3. Write
# nano myScript.py

Or edit your script with your beloved IDE on your PC directly via net protocole (ftp, samba,..) like I'm doing with my Banana Pi. 或者直接通过你的PC上的心爱的IDE编辑你的脚本,通过net protocole(ftp,samba,...)就像我正在使用我的Banana Pi一样。

Bear in mind for some external python modules you should include them before compiling OpenElec from source, or crosscompile if they're binaries, see . 请记住一些外部python模块,你应该在从源代码编译OpenElec之前包含它们,或者如果它们是二进制文件则交叉编译, 请参阅

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将python脚本作为shell脚本运行? - how do you run a python script as a shell script? 如何在较新的Python解释器中运行Python脚本? - How do you run a Python script in a newer Python interpreter? 你如何使用 html 按钮(flask)运行 python 脚本 - How do you run a python script using html button (flask) 你如何从 C++ 程序运行 python 脚本? - How do you run a python script from a C++ program? 如何在 Windows 中将 Python 脚本作为服务运行? - How do you run a Python script as a service in Windows? 如何在 django 中上传的文件上运行 python 脚本 (.py) - How do you run a python script (.py) on an uploaded file in django 如何在python程序中运行复杂的sql脚本? - How do you run a complex sql script within a python program? 你如何在 Windows 中运行这个用于 Linux 的 python 脚本? - How do you run , in Windows , this python script meant for Linux? 在 Kubernetes yaml 文件中,如何先运行 python 脚本然后运行指定的容器? - In a Kubernetes yaml file, how do you run a python script first then run the specified container? 在 Spyder 中,如何从另一个脚本的项目文件夹中运行 python 脚本 - In Spyder how do you run a python script in the projects folder from another script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM