About 181,000 results
Open links in new tab
  1. How to use a python virtualenv with sudo? - Ask Ubuntu

    101 The issue is almost certainly that when you run sudo, the virtualenv environment variables, aliases, functions, etc aren't being carried over. The solution would be to explicitly run the …

  2. Running a startup program in terminal with sudo - Ask Ubuntu

    I need to run a python script in a terminal, myscript.py at startup (on Lubunt). This script requires root. I've set up a .desktop file that runs the following command: lxterminal --command="pyth...

  3. Open terminal window and execute Python script on startup

    I can run it by adding this to the startup applications: python3 /path/to/script.py That works, but it doesn't open a terminal window, so I can't see the program's output. How could I make it open …

  4. How do I create a desktop entry to launch a Python script?

    And that is a bad thing: your software should be able to run fine and find its data files regardless of current directory. (hint: use python's __file__) If your application is a GUI (ie, it has a …

  5. How to run a python program in the background even after …

    Dec 28, 2013 · 112 Use the shebang line in your python script. Make it executable using the command, chmod +x test.py Use no hangup to run the program in the background even if you …

  6. python - How do I sudo a command in a script without being …

    They could remove or rename the file, put another script in its place, and running that script via sudo -- without a password. Hence, it's far safer to put the script to a directory that only root …

  7. compiling - How to compile a python file? - Ask Ubuntu

    Jul 27, 2013 · Also be aware that you don't need to compile a .py file to run it. Python is an interpreted language, and you can run the scripts directly, either using: python hello.py Or …

  8. How to launch a script inside a VM from the host? - Ask Ubuntu

    The existing answer does not give enough details on how to launch a guest script. I see you had accepted it. It would therefore be great if you added your steps to launch the Python script …

  9. Run python script when a file has been added to a folder?

    Aug 3, 2015 · Build a script (Python and Bash are good options) that loops for folder size every 'n' seconds (or minutes, how often do you add files?). Whenever a new file is created, the size …

  10. upstart - How do I run a Python script in the background and …

    The usual approach from the old days was to write a file containing a time stamp or the process id to /tmp and then check if this process id was still running or respectivly if the time stamp was …