Tag Info

Hot answers tagged

3

You're right that the order of the mount options is important here. From the man page: users Allow every user to mount and unmount the filesystem. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid). The exec ...


3

Strangely the code works when I run it from an interactive Python prompt. At any rate, this bug report points to a solution(?)1: Add a call to apt_pkg.init_system() as documented here (or do import apt as well): #!/usr/bin/env python import sys, apt_pkg apt_pkg.init_system() res = apt_pkg.version_compare(sys.argv[1], sys.argv[2]) if res < 0: ...


3

That thread and its accepted answer in particular are about using Python for shell scripting, not as an interactive shell. To write scripts in a different language, put e.g. #!/usr/bin/env python instead of #!/bin/bash at the top of your script. If you want to try out a different interactive shell, just run it, e.g. type ipython at your existing shell ...


1

You need make your file executable. chmod +x /mnt/local/ext001/MEDIA/NZBGet/scripts/videosort/VideoSort.py or chmod 555 /mnt/local/ext001/MEDIA/NZBGet/scripts/videosort/VideoSort.py then, you can run that: ./mnt/local/ext001/MEDIA/NZBGet/scripts/videosort/VideoSort.py.


1

If python is executable and you don't want to remount partition (or can't), you can just run: python /mnt/local/ext001/MEDIA/NZBGet/scripts/videosort/VideoSort.py If you want to run a elf(linux binary executable file) file without the execute permission, you can: /lib/ld-linux.so.* /path/to/elf/file


1

If polling is okay you could look at the time on mtab: import time, os last = None current = None for x in range(0,60): if last == current: current = os.stat('/etc/mtab').st_mtime print('Current Updated: ', current) print('No Changes...') else: last = current print('Last Updated: ',last) ...


1

Have you, by any chance, installed another version of iPython (for example, through Pip)? What is the result of type ipython on your system. If that's something else than ipython is /usr/bin/ipython (or an equivalent in your locale, of course), try to run /usr/bin/ipython notebook.



Only top voted, non community-wiki answers of a minimum length are eligible