0
votes
1answer
29 views

How to check the status of bash shell script while executing from Python script?

I have a simple Python script which will execute a shell script using subprocess module in Python. Below is my Python shell script which is calling testing.sh shell script and it works fine. import ...
0
votes
0answers
14 views

tkinter overrideredirect function

I would like to create a window without title bar but I don't want the user to be able to move or 'iconify' the window. This window has to be a normal window, not "ontop" window. The code bellow works ...
0
votes
1answer
19 views

How to make a editable widget that updates in live time in PyQT

I'm trying to make a GUI that updates my system in PyQT4. I would to make it so that it ran all the commands in live time in the GUI, so that you could watch it update. I'm unsure what type of widget ...
1
vote
2answers
57 views

Python does not run shell command properly

I have following python sript - import os command = "echo '12345 Tomcat' | sed -n 's/.*\(^.[0-9]*\).*/\1/p'" os.system(command) It prints ascii zero character - Try running this command in a ...
0
votes
1answer
37 views

Python: Text editing [on hold]

I recently tried coding a little text editor... but the thing that it does is once you press enter to get to the next line, you can't get back (Python console). How would I make one kind of like ...
0
votes
1answer
23 views

virtual env and python client server in linux

I have a simple django python server process which needs to be executed in linux environment (in a virtualenv python environment) Currently one of my colleague manually logs into ssh console and ...
1
vote
2answers
50 views

need to pass python vars to bash avconv command

bash hacker here getting my feet wet with python. I have almost ported one of my bash scripts to python, but I cannot seem to figure out how to pass python vars to the bash command avconv to convert ...
-1
votes
1answer
69 views

Pycharm professtional can't create django project in linux mint 16

The output is Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/bin/django-admin.py", line 5, in <module> management.execute_from_command_line() File ...
0
votes
1answer
39 views

Call a Python Script from paralel shell scripts at the same time

I have a question about Python Interpreter. How it is treating the same script to run 100 times for example with different sys.argv entries ? Does it create a different memory space for each script or ...
0
votes
1answer
42 views

Editing words in a file using python

I'm not getting the logic to edit a file in python which has following content session1: Part1 host1: #All the four host here should be user input host2: host3: host4: ...
0
votes
1answer
61 views

Python Requests take longer to return in Linux than Windows

I am writing a piece of code that uses the Box.com Python SDK. The SDK uses the requests module to communicate with Box.com as per the API documentation. For my purposes, I need to make several GET ...
0
votes
0answers
17 views

PyGTK+3 (PyGObject) to create screenshot?

I've spend past 3 days searching in google, how can I create a screenshot with PyGTK+3 ? There are gallizion tutorials about pyqt,pygtk+2,wx and PIL. By the way, I don't need external programs like ...
1
vote
1answer
20 views

Why do I get sporadic kinit failures when run from a python script? [on hold]

I've set up my Active Directory server, Linux client, and /etc/krb5.conf file successfully to the point that I can run kinit ad_user and klist shows the ticket I received. I can kdestroy / kinit ...
0
votes
0answers
22 views

Interfacing Gtk with Mono on Linux

I've got a Raspberry Pi-like device running Linux, connected to a custom printer. There is also an LCD touch screen that the user utilizes to interact with the printer (select files, configure the ...
0
votes
1answer
24 views

Updating the package in puppet?

I am trying to update the already installed package through puppet using ubuntu server . but is not updating is not happening. In puppet manifest file we have included collector package as shown ...
0
votes
1answer
55 views

Python Script Output to File from Crontab on Linux [closed]

I need to capture the output of a Python script run from crontab into a file. The problem is that while I can see or write the output to a file when running the script from the command line, I cannot ...
0
votes
0answers
22 views

NetworkError: Low level socket error connecting to host 10.0.3.51 on port 22: No route to host (tried 1 time)

I am trying to create the new lxc container and execute the shell command on the new created container. The lxc management tool which I use is [lxclite]: https://github.com/googley/LXCLite. I am using ...
-5
votes
0answers
48 views

AI Bot to interact like a human [closed]

I wan't to make a bot in python that i can chat with and it will respond with something that makes sense and not reply "I like chocolate too!" when i ask how it is doing. Anyone who could give me ...
0
votes
0answers
18 views

Python PDF library to insert the text into existing pdf file on linux machine [closed]

Is there any good way to insert the text into existing pdf file using python 2.5 in linux machine?. Any help that might be appreciated -Loganathan
1
vote
1answer
37 views

Python Chat Server - Telnet error

I have the following code which is supposed to implement a basic chat server on my localhost. The code has no errors (i dont get any erros thrown at me when i run the code). However when i run the ...
1
vote
1answer
40 views

How do I pass Python arrays to shell script as an Array?

I have a shell script (test.sh) in which I am using bash arrays like this - #!/bin/bash ... echo $1 echo $2 PARTITION=(0 3 5 7 9) for el in "${PARTITION[@]}" do echo "$el" done ... As of ...
0
votes
0answers
75 views

difference between python print and sys.stdout() statements on linux

I write some script in python, which interacts with user in shell. I used print 'something' to, actually, print something. I run it through ssh on my remote machine and need to log errors, so I ...
1
vote
1answer
48 views

Python interact with running process

I have a python script that allows me to interact with my Rapsberry Pi from my phone using a simple web server (Flask). In this script, I can call omxplayer to play a media file, I do this via a ...
0
votes
3answers
47 views

How to execute shell script from Python after passing input parameters

I have a shell script in my JSON document jsonStr which I am able to execute it using Python subprocess module and it works fine. Below is my Python script which works fine if I execute the shell ...
0
votes
1answer
53 views

Execute the shell script by passing certain parameters to it using Python?

I am working on a project with Python in which I am supposed to execute shell script with Python. I have written a simple program from which I am able to execute shell script with my python code. But ...
2
votes
1answer
53 views

My python program works fine in Windows 7 and prints to the console but gives an error in Linux Mint?

I'm 14 years old and I'm pretty noob at python. I am coding a program in windows. I started up my linux mint hardrive and for some reason it gives an error in the mint but not windows 7? Anyone have ...
0
votes
1answer
33 views

Problems with cross platform tell / seek in Python

Having a weird bug with Python 2.7.3 file reading. If I do this sort of thing: end_of_header = f.tell() print f.readline() f.seek(end_of_header) print f.readline() the results are different. The ...
-3
votes
1answer
81 views

Computer Science advice [closed]

Some background info: I'm currently doing a degree in Computing and Information Science at University. I'm a late starter (24) and need some help, As someone who is starting later than others I'm ...
0
votes
1answer
38 views

python celery no module named app.tasks

I am trying to run the demo application from Celery the project directory is /usr/local/proj [root@merit1 proj]# ls -lh total 16K -rw-r--r--. 1 root root 363 Dec 23 00:36 celery.py -rw-r--r--. 1 ...
0
votes
2answers
63 views

Only take from the latest string with python regex

I using regex in my Python application. The string that I run on with regex contains many lines. String (a portion of the string i using): 36% [============> ] 55.5 / ...
0
votes
1answer
32 views

Automating launch of a python selenium script

I am trying to crontab a python/selenium script but obviously this won't work since Firefox requires a display, I went down the PyVirtualDisplay / xvfb route but this won't give me visual feedback, I ...
2
votes
1answer
26 views

Python netadd module on centOS

I have a centOS server and I installed python2.7 on it... I installed: # yum groupinstall "Development tools" # yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel ...
1
vote
1answer
49 views

Raspbian Run 4 commands from terminal window after desktop loads Python script?

The following commands (to get a small screen working) execute just fine if I type them in from the LXTerminal window while running Raspian on a raspberry Pi once my desktop is loaded: sudo modprobe ...
2
votes
1answer
22 views

calculate percentage inode usage using python

I am trying to calculate percentage of inode usage in python. Here is my sample python code st = os.statvfs(path) free = (st.f_bavail * st.f_frsize) / 1024 total = (st.f_blocks * st.f_frsize) / 1024 ...
1
vote
3answers
33 views

Sending data chunks over named pipe in linux

I want to send data blocks over named pipe and want receiver to know where data blocks end. How should I do it with named pipes? Should I use some format for joining and splitting blocks (treat pipe ...
0
votes
1answer
57 views

Python compile a script within a GUI

I am currently working on the final year project for my degree. I have chosen to research and develop a tool to aid the delivery of the new Computing curriculum that is coming to schools next year. I ...
0
votes
2answers
46 views

How to start a python script (with Parameters) on another location from desktop

We are using Ubuntu for OpenERP development, everyday at morning I have to browse to openERP directory from terminal, start the "openerp-server" python file with lots of parameters, and then keep the ...
0
votes
1answer
26 views

How to install python-evdev on Mac OS?

Is there any way to install the python-evdev library on Mac OS? When I try to install it, Mac says that The linux/input.h header file is missing. (of course). Is it possible to install it under Mac? ...
1
vote
0answers
27 views

Screen is not showing any information (Raspberry Pi/Arch Linux)

I am trying to get my Raspberry Pi screen to work but I have no success. I've build demo1.py using this source code: import RPi.GPIO as GPIO import time LCD_RS = 25 LCD_E = 24 LCD_D4 = 23 LCD_D5 = ...
0
votes
1answer
21 views

Install urllib2 in Arch Linux

I am trying to install the urllib2 module in Arch Linux as I need to run a Python code. The error that the Python code outpus is: File "PiMiner/PiMiner.py", line 3, in <module> import sys, ...
1
vote
1answer
11 views

Calling IDA Pro through python

I am trying to use a python script to call IDA Pro and have it run in bash mode. Similar to that of the linux terminal line './idal -B input-File' is there a quick and simple way I can do this ...
1
vote
1answer
45 views

Run a script when user press print, and not start spooling before script ends (linux, cups)

What I need to do, is execute a python program/script in conjunction with user presses print, and not let the print job spool before this program quits. Reason is that the print driver is not open ...
2
votes
1answer
80 views

Execute remote commands as root using Python and paramiko

Currently I'm working on a Python script to run embed shell scripts, the OS contain root and normal_user. The problem is, when I try to switch from normal_user to root, using a single command in one ...
0
votes
0answers
18 views

PyUSB interaction with unrecognized device?

I am using PyUSB with Python2.6 and I'm trying to send/receive data from a USB device that doesn't send device descriptions/names/product id's/etc, so it's unrecognised by PyUSB and Linux (lsusb). How ...
0
votes
0answers
45 views

Same filesystem based caching works in Windows, not in Linux

I'm willing to cache most of the processing results for the site homepage, namely a data dict summarizing numbers of database objects (resources per category). Tried filesystem cache at low level ...
2
votes
0answers
26 views

Paramiko inside Python Daemon causes IOError

I'm trying to execute ssh commands using paramiko from inside a python daemon process. I'm using the following implementation for the daemon: https://pypi.python.org/pypi/python-daemon/ When the ...
1
vote
2answers
56 views

Why don’t I see interleaved lines when writing to a file in parallel?

I have a Red Hat Enterprise Linux system running several Python processes. Each process is writing to the same log file via standard Python WatchedFileHandler. Together, they write several dozens of ...
3
votes
1answer
104 views

Is python2 reluctant to free memory?

I know that python has its own memory management implementation using areans for objects of different sizes and much more, although I haven't found a thorough documentation yet. Still I'd like to ...
0
votes
1answer
28 views

tracking CPU usage of a process and its children

This question has answers for Windows OS. However I am looking for something similar for my OS X (or any *nix) machine. I want to track CPU usage of a process and all the child it spawns, over the ...
1
vote
1answer
74 views

Linux, Write output to the file and terminate it using Python

There are various topics available on this very topic, "How to write output to the text file". But my issue is different because the output to the command in question is continous. What I want to do ...

15 30 50 per page