Today (Saturday) We will make some minor tuning adjustments to MySQL.

You may experience 2 up to 10 seconds "glitch time" when we restart MySQL. We expect to make these adjustments around 1AM Eastern Daylight Saving Time (EDT) US.


How to fix Python path for some script/app?


 
Thread Tools Search this Thread
# 1  
How to fix Python path for some script/app?

Hello,

i have:
# python -V
Python 2.7.6

But original for my CentOS is 2.3 or 2.4

my python folder:
/root/python2.7.6
(inside are folders like lib, include, bin, share)

I launched app iotop:

Code:
# iotop -od 6
Traceback (most recent call last):
  File "/usr/bin/iotop", line 16, in ?
    main()
  File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 567, in main
    main_loop()
  File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 557, in <lambda>
    main_loop = lambda: run_iotop(options)
  File "/usr/lib/python2.4/site-packages/iotop/ui.py", line 465, in run_iotop

How can i modiffy python path for this application? so it work, or what is the cause/fix for above error please? Im total nooob
# 2  
You can modify python path specified in the first line of "iotop" script.
# 3  
Quote:
Originally Posted by bartus11
You can modify python path specified in the first line of "iotop" script.
# vi $(which iotop)

Code:
#!/usr/bin/python
# iotop: Display I/O usage of processes in a top like UI
# Copyright (c) 2007, 2008 Guillaume Chazarain <guichaz@gmail.com>, GPLv2
# See iotop --help for some help

import sys

try:
    from iotop.ui import main
except ImportError, e:

Please how that line should look like?
 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Pass File name and Directory Path through command to python script
etldeveloper
I'm writing python script to get the file-names in the current directory and file sizes .I'm able to get file list and their sizes but unable to pass them through command line. I want to use this script to execute on other directory and pass directory path with file name through command line. Any...... Shell Programming and Scripting
1
Shell Programming and Scripting
Advise on os.path in python
maverick_here
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I'm writing a python script to give me the number of files and directories in a given directory and I'm having...... Homework & Coursework Questions
1
Homework & Coursework Questions
find the fully-qualified path for the app my module is running in
erwinfletch
Hi- I need the cpp call that will tell me the full path to the app I'm running in. For example, I'm running in a loaded library for either mozilla or firefox, but would like to know the full path to the executable /usr/bin/firefox /usr/bin/mozilla /usr/local/firefox1_5 etc... (For...... Programming
4
Programming

Featured Tech Videos