1
vote
3answers
72 views

Permanent autostart

I would like to make a Python 3.4 script that starts with my computer so that it's permanently checked to start up with the computer (edit: permanently checked means it can't be disabled via ...
0
votes
1answer
55 views

Run terminal command (python command) at start up [duplicate]

New to Ubuntu, but have looked everywhere to get this question answered. Found no solution so far. Basically I need to run two terminal commands on startup, which follow each other directly. This will ...
0
votes
1answer
109 views

access to column in python like awk [closed]

This is my data file: Iam python newbie If I use awk to access columns element, that is easy just by $1. how can I access this columns element on python?
0
votes
0answers
35 views

getting error in opening py file [duplicate]

I'm installing a software in Ubuntu 12.04 and got the following error: http://paste.ubuntu.com/7638369/ server@ubuntu:~/Desktop/revkit-1.3$ ./tools/gui/gui.py Traceback (most recent call last): ...
1
vote
3answers
278 views

Python command in bash does not find -c flag

I have two python lines in my bash script, both should run with -c flag, but once I run the Bash script it tells me that it could not find -c flag that is needed for python to run the command in Bash. ...
0
votes
0answers
39 views

Bash if password filled save it

I am trying to save a password to gnome keyring via python script. The python script will be runned from bash script if password is filled in zenity GUI. Example: User inserts hes/hers password to ...
1
vote
2answers
150 views

How to install RevKit

I’m trying to install a software called RevKit on Ubuntu 12.10 and the following instructions1 need to be followed: RevKit can be downloaded from the www.revkit.org website. Opening a Bash ...
0
votes
2answers
106 views

How to make a python script a command?

I'm trying to make a python script into a command, eg: google's ipaddr.py (http://code.google.com/p/ipaddr-py/). I want to be able to type ipaddr and it puts out what I want. Is this possible? I've ...
1
vote
2answers
116 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
3
votes
1answer
338 views

pkill not killing

I have a Script named PirateRadio.py That I am writing a script for. I need to kill and reload the script. Possibly with the same PID. I thought SIGHUP was a sure thing. when i run #pkill -1 ...
0
votes
1answer
168 views

.bachrc $PATH doesn't find my python scripts

I've tried adding a path to my .bashrc file as follows export PATH=/beda/users/home/user252083/bin:$PATH and yes, I can then run the binary "bader", which is in the bin folder from anywhere. I also ...
5
votes
1answer
202 views

How to set my Bluetooth python script on higher priority than Ubuntu's request?

I have got a Bluetooth Python Server Script on Ubuntu to connect with an incoming request from a Smartphone device. However Ubuntu's Bluetooth is getting the request before my script can react on it. ...
1
vote
0answers
69 views

nproc returning two values on python [closed]

I'm trying to write a script to do something that I repetitively do everyday, and that for it to be useful I need the value given by the command nproc. The problem is that nproc on bash returns my ...
1
vote
1answer
135 views

How can I create Unity dash integration for my Python script?

I have written an awesome script in Python and I seriously think it should help many rookie Ubuntu users out there -- especially for a quick solution/tip. My script searches through AskUbuntu.com and ...
2
votes
1answer
46 views

How to write a 'hotcorners' script in Python?

I'm using Lubuntu 13.04, and a feature that I miss from Compiz is the hot-corners: it simply runs some command when the mouse cursor reaches a corner of the screen. So, I was thinking about writing a ...
3
votes
2answers
2k views

what could cause a script to fail to find python when it has `#!/usr/bin/env python` in the first line?

Trying to get casperjs running on Ubuntu 12.04. After installing it when I run I get: 09:20 $ ll /usr/local/bin/casperjs lrwxrwxrwx 1 root root 26 Nov 6 16:49 /usr/local/bin/casperjs -> ...
0
votes
2answers
88 views

Setting the icon_theme_path in python script

I've made a python script to add a new indicator in the systray on Ubuntu Unity. When i set a specific folder for the icon, the icon appears in the systray. Exemple : ...
1
vote
1answer
178 views

Python script liking to GUI using IDE

I am studying python. Now I can write python scripts (codes) to some extent. I used IDLE for this. I am interested in making GUI to those written programs. I like to do it using an IDE rather than ...
0
votes
0answers
14 views

retrieve statistics on Ubuntu packages

how can I retrieve a list of all packages or better specific packages offered by Ubuntu? Preferable, I would like to create a list of certain packages shipped by Ubuntu but on a computer in the cloud ...
0
votes
1answer
77 views

Use grabc in python script

I want to work with the return value of grabc. If it returns #000000 then I want to take it to a=#000000. But this outputs the value in terminal. So How can I do this? [N.B: grabc is a tool for ...
0
votes
1answer
95 views

Is there an easy guide on how to prepare my python3 script for upload to my ppa?

I have a python3 script (4000 loc) written in PyQt4 with four, five dependencies. In the same folder where that script is placed there are some subfolders where all additional files (icons, saves, ...
1
vote
1answer
184 views

Executing script from shell problem

Lubuntu Raring Ringtail. I want to be able to execute my scripts with ./ I start my python script with #!/usr/bin/python and it says bash : ./myscript.py: /usr/bin/python^M: bad interpreter: No such ...
0
votes
1answer
142 views

Is there a standard installation location for scripts?

I'm deploying a bunch of python scripts to my build, test and soon production server. It can be nodejs or any other thing I want to run under nginx so the location should be generic rather than ...
0
votes
1answer
1k views

Run a Python Script on Login with Sudo

I am setting up a machine that's sole purpose is to run a specific python application that uses a curses ui. That being said, there are some aspects of the application that require it to be run as su. ...
2
votes
1answer
453 views

How to find out which python script is using resources?

Can someone tell me how to find out which python script is using lots of system resources? I can see with the 'top' command that a process called "python" is always near the top of the list. 2603 ...
4
votes
2answers
996 views

Can I run command-line commands within a python script?

Sorry I'm kind of a noob at this: Basically I've downloaded this package that deals with text files that is run from the terminal, but the command I need takes in two arguments. I also need to do ...
3
votes
2answers
1k views

How can I run a python script with out the prompt “Run in terminal, Display, cancel, Run”

I added #!/usr/bin/env python to the script and chmod +x in terminal, but on double clicking it still asks for these 4 options. I want it to automatically open in terminal. Is it possible? I'm using ...
0
votes
1answer
1k views

How to run a shell script without terminal

I have a shell command that executes a command and sends it through pipe to a python file. The python file does various checks on it and then starts processes with parameters using subprocess.Popen. ...
2
votes
1answer
2k views

How do I run a python script with Wine?

I'm using Calibre to manage my ebooks and I'm trying to install a plugin that will allow me to manage library books that I get through Adobe Digital Editions via Wine. I've got everything installed, ...
1
vote
1answer
235 views

Can I write a python script that will automatically load a terminal as sudo?

I use sudo a lot and I am constantly having to restart my terminal (development of programs that froze usually) and it's a pain in the butt to constantly put in the sudo command and then my password. ...
1
vote
1answer
391 views

How to keep X-Server running via 'ssh -Y' after closing shell?

my name is Chris and i have trouble to run a Python-Script on a Server. I try to run a Python Script, that makes use of the Python module wx, on a Server. Therefor i open a shell connect to the ...
1
vote
1answer
619 views

Run python script on reboot (boot)

I am trying to run a script once the server reboots. So, how can I change it. My script needs only one file to open and it opens in terminal. I read something about changing configurations or ...
46
votes
3answers
3k views

Is #!/bin/sh read by the interpreter?

In bash or sh, I guess anything which starts with # is a comment. But in bash scripts we write: #!/bin/bash And in Python scripts, there is: #!/bin/python Does this mean that # by itself is a ...
0
votes
1answer
193 views

How to programatically fetch the download status of Google Chrome?

How would I go about determining if Google Chrome is downloading something, and getting the "percent-done" value of that download, from the terminal using a Python, Perl, or Bash script?
6
votes
2answers
3k views

How do I run a script when a Bluetooth device connects?

I'd like to start my music player (Clementine) when my bluetooth headset connects to my computer. How do I detect the bluetooth device connecting so I can run a script to start the player?
1
vote
1answer
121 views

Fix Nautilus URIs in a Python script

I have a very basic Python script I wrote mostly for learning purposes. It opens a terminal in the current folder. However, I can't get it to work in folders with accented characters in the URI ...
3
votes
2answers
3k views

Python Compared to BASH

I've been studying bash for the past three weeks or so, and it is very easy to learn since it is basically just command line inputs. I've decided to now move onto python but I've been lost the whole ...
2
votes
2answers
607 views

How to run interactive python script after boot as user USER

I want to run my system configuration script (written in python) after boot. System should ask for password for user USER and run my script. After that system should reboot, eventually run gui. I ...
38
votes
5answers
8k views

How do I create a deb package for a single python script?

I have a single python script that I want to distribute as a deb package. It is a indicator which shows local date in Unity panel. I did follow create a .deb Package from scripts or binaries but I ...
5
votes
2answers
4k views

Python script won't write data when ran from cron

When I run a python script in a terminal it runs as expected; downloads file and saves it in the desired spot. sudo python script.py I've added the python script to the root crontab, but then ...
0
votes
1answer
709 views

Create a batch rename srcipt in python?

Firstly, this question was made as a follow up of my previous question: How to batch rename files with "variables"?. I'm just restating it considering Sergey's recommendations. I use xmbc ...
0
votes
1answer
845 views

Change/set working directory of scripts executed from file manager window

Whenever I execute a script by clicking on it in a file manager window it gets run with my home directory as it's working directory, not directory that has the script within it where I'm clicking. ...
0
votes
1answer
431 views

Lua or Ruby (or something else?) for scripting?

I'm making a program in Java and I'm choosing a language for scripting. I'm aiming for speed and for being easy to learn/code for a java program. (So what I mean by Ruby and Lua is JRuby or LuaJ or ...
1
vote
1answer
226 views

Scripts used by `jockey-common`

Is it possible to make a script that basically does the same thing as jockey-common? i.e. An script to find any hardware that requires proprietary drivers and install them. EDIT As Oli mentioned, the ...
11
votes
1answer
6k views

What language(s) can I use in LibreOffice for macro scripting?

Not finding any info online; I hope somebody here knows. It was Python in OpenOffice; is it still Python? Or are they moving to gasp VBA?
1
vote
1answer
2k views

Pipe error with bash script called from python

I'm trying to run a shell script inside some python code, but I keep getting an error message. Python script (test.py): import os f = os.popen('/home/test/Downloads/record.sh') f.close() ...
14
votes
2answers
2k views

How can I write Nautilus scripts in Python?

I want to write a Nautilus script in Python. Is that possible? If it is possible, how can I do that?
6
votes
2answers
4k views

What is the default character encoding?

I don't myself know how deep this question actually goes (for example, for all I know there could be several, depending on my task). Particularly, I am interested in what kinds of strings are used to ...