Python Script via User Scripts ausführen?


pille
Go to solution Solved by Archonw,

Recommended Posts

Hallo,

 

ich habe 1-2 Python Skripte, welche ich via User Scrips regelmäßig laufen lassen will. Wie muss ich da genau das Skript anpassen?

Python ist über die NerdTools installiert.

Oder gibt es hier eine bessere/einfachere Lösug?

 

#!/usr/bin/env python
# -*- coding: utf-8 -*-

So startet das Script.

 

und das ist die Fehlermeldung:

 

/usr/bin/env: ‘python’: No such file or directory

 

 

Liebe Grüße

Edited by pille
Link to comment
7 minutes ago, Archonw said:

Wenn du im Unraid Terminal 

 

which python

 eingibst, was bekommst du als Ausgabe? 

 

 

hmm.

root@unRaid:~# which python
which: no python in (/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin)

 

grafik.thumb.png.e09da829d62ce63335ed5e33ab822903.png

 

which python3 findet /usr/bin/python3

das Skript dahingehend dann einfach anpassen?

Edited by pille
Link to comment
1 hour ago, pille said:

ich habe 1-2 Python Skripte, welche ich via User Scrips regelmäßig laufen lassen will.

 

Darf ich noch etwas hinzufügen?

 

Wenn es etwas umfangreichere Skripte mit zusätzlichen eigenen Modulen werden dann kannst Du natürlich auch Folgendes machen:

 

#!/usr/bin/bash
#arrayStarted=true
#backgroundOnly=true
#clearLog=true
#noParity=true

python3 /mnt/disk1/Projekte/Projekt1/Source/BlaBla.py

 

Vorteil: Auch für komplexe Skripte geeignet. Programmierung nicht auf Flash. Nachteil: Die Platte fährt ggfs. hoch.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.