General :: Python - Enable The Libattr Frature (abbreviated Xattr)?

Aug 10, 2010

I would use xattr in python, but found the xattr's keys() is empty, does that indicate the libattr feature wasn't enabled? I've learned the libattr feature is disabled in ext3/ext4 by default, but how to enable it?

>>> import xattr
>>> x = xattr.xattr('tiger_8a428_userdvd.dmg')
>>> x
<xattr file='tiger_8a428_userdvd.dmg'>
>>> x.keys()
[]

View 1 Replies


ADVERTISEMENT

General :: Determining Network Status On Abbreviated System?

May 24, 2011

I have and embedded system which apparently, due to space considerations, is missing lots of normal commands. I can get the following information by "cat /proc/version":

Linux version 2.4.19-uc0 (...) (gcc version 2.95.3 20010315 (release)(ColdFire patches - 20010318 from http://fiddes.net/coldfire/)(-msep-data patches)) #461 Tue May 24 12:06:06 PDT 2011

At issue is the fact that, after some time, the system stops responding to the Network (e.g., you can ping it, then some time later you can't). We suspect that some sort of network monitor is accessing the device and causing the trouble, but don't know for sure.

What I would like to do is log some sort of useful network status information and/or be able to reset the network if I can figure out there is an issue from within the device.

I thought I had it all working using "/etc/init.d/network restart" but I've come to find out that the command is not recognised in this system. I also can't issue a "top" command to see what services are running. I can Telnet in, so I can try commands and see if they work.

Have any of you worked with such an abbr. system and if so, what might be around that I'm unaware of to help determine network status?

View 3 Replies View Related

General :: Xattr In Arch - Operation Is Not Supported

Nov 8, 2010

I installed pyxattr to play around with, and when I try to set them it says that the operation is not supported. Does Arch Linux not support xattr, or how do I enable them?

View 10 Replies View Related

Fedora Security :: Restricting Xattr Flags With Selinux ?

Jul 12, 2009

I've got a question about chattr command. is it possible to restrict a root access for this command. what i want is something similar to freebsd behaviour aka the kernel secure level. setting a particular security level results in limiting some operations (i.e changing immutable flags on files) by root. well, if someone gained an access to a machine in some way, nothing would stop him changing the file's flags. so the question is if it can be achieved with selinux?

View 2 Replies View Related

General :: Get Apt-get To Install Python Packages For A Different Version Of Python?

Oct 27, 2010

in ubuntu 10.10, I have installed python 2.7. I would like to use apt-get to install packages to this version of python but I haven't been able to figure out howThings I have tried without success:changing the symlink at /usr/bin/python to point to /usr/bin/python2.7 - even after doing this apt-get still installs stuff to python2.6.Set up python2.7 as the primary alternative using update-alternatives - doesn't work

View 3 Replies View Related

Ubuntu :: Deluge WebUI Enable / Re-enable Subsequently Unable To Re-enable It (doesn't Appear In The Side Panel Again)?

Feb 10, 2010

I recently installed Deluge 1.2.0 from the following PPA:[URL]I using this on two different Linux computers. One is running Linux Mint 8 and the other is running Ubuntu Netbook Remix 9.10. The first time on either computer when I enable WebUI in the Deluge GUI it works fine. However if I ever disable it in plugins section I am subsequently unable to re-enable it (doesn't appear in the side panel again). Rebooting or reinstalling Deluge seems to have no effect.Is this a bug or am I doing something wrong?

View 3 Replies View Related

Programming :: Make Python Programs Run Without Entering The Command Python?

Mar 22, 2009

I want to be able to do

sudo ./program.py

instead of always having to do

sudo python program.py

What do I need to change?

View 5 Replies View Related

Programming :: Python - Get Text File Data Into An Array On Python?

Nov 30, 2009

I've already used line split stuff to transform my data into something like this in a text file:

Code:

['1', '1', '3', '20.7505207']
['2', '1', '3', '23.0488319']
['3', '1', '3', '-1.5768747']
['4', '1', '3', '-26.4772491']

[code]....

How can I get this on a python program so I can manipulate it as an array?

View 3 Replies View Related

Software :: Python 3 Want Situation For Python 2 And Become Stop?

Jul 17, 2010

Python 3 want situation for python 2?Python 2 become stop?

View 1 Replies View Related

CentOS 5 :: Yum - Python-devel / Python Dependency

Jan 7, 2011

yum dependency problem please? I am running Centos 5.5. I need to install python-devel, but when I do so I get:

[Code]....

View 2 Replies View Related

Programming :: Python 2.x - Represent The Same In Python 3.x

Mar 4, 2010

I have a function definition in a Python 2.x script which take a tuple as one of its arguments, but 2to3 has no answers nor any of my searching on how to represent the same in Python 3.x

Code:

def blah(self, (string1, string2))

View 4 Replies View Related

CentOS 5 :: Upgrade Python-2.4.3 To Python-2.5?

Mar 30, 2011

How can I upgrade python-2.4.3 to python-2.5?

View 1 Replies View Related

General :: Python Crash In Fedora 12

May 5, 2010

Due to this problem, everything that uses python is not working.

/lib/librt.so.1: symbol pthread_barrier_wait, version GLIBC_2.2 not defined in file libpthread.so.0 with link time reference

Please install a package which provides this module, or verify that the module is installed correctly.It's possible that the above module doesn't match the current version of Python, which is: 2.6.2 (r262:71600, Aug 21 2009, 12:22:21) [GCC 4.4.1 20090818 (Red Hat 4.4.1-6)]

View 1 Replies View Related

General :: Comparision Between Python And Java

Oct 15, 2010

Every one would be much familiar dat a python compiler is available with Ubuntu. I found it and i just thought to learn python coz the coding is easier with python. Can someone tell me which one is better- python or java and i should learn which language?

View 5 Replies View Related

General :: Specifying A Directory Path In Python?

Nov 20, 2009

I'm trying to write a script in python to extract data from maillogs in gz format. I wrote a shell script but i now want to do this in python, as thats the preferred method where i work. anyway does anyone know how to specify directory paths for example the maillogs exist in /var/log so i want the script to go to that directory would LOG_DIR="/var/log/" work?

View 1 Replies View Related

General :: Build ONLY Python Interpreter?

Oct 26, 2010

I am using ubuntu hardy and python 2.6.5 (built from sources). For a custom python packager I need to rebuild python interpreter (python executable). I am new to linux and don't have much knowledge of gcc and other stuff. Here is the process:1. Copy python.c as myapp.c. myapp.c is in the same directory (python2.6.5) in which I have all the required files. 2. Using the syntax from makefile of python sources, here is my first command to produce myapp.o

Code:
gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I/home/zeno/installed/Python-2.6.5/Include -fPIC -DPy_BUILD_CORE -c myapp.c -o myapp.o
This produce myapp.o but throws a warning:

Code:
myapp.c:24:2: warning: no newline at end of file
Next is to produce the executable or python interpreter:
Code:
gcc -pthread -Xlinker -export-dynamic -o $@ myapp.o -L. -lpython2.6 -lpthread -ldl -lutil -lm -o myapp
This is causing an error:
Code:
/usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'

[Code]...

View 1 Replies View Related

General :: Ethernet/MAC Address Using Python?

Nov 23, 2010

How do you get correct ethernet/mac id of your local network card using python script? Most of the article suggests to parse the output of ipconfig /all on windows and ifconfig on linux. I am sure that this solution would work on windows but I am a linux starter and not sure the reliability of ifconfig on linux distros. Couple of other solutions on linux are:

Code:

def getHwAddr(ifname):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15]))
return ''.join(['%02x:' % ord(char) for char in info[18:24]])[:-1]

[code].....

View 2 Replies View Related

General :: How To Copy A File Using Python

Oct 31, 2009

How do copy a file from one location to another using python script? How do i execute the shell script within python script?

View 1 Replies View Related

General :: How To Install Python In RHEL 5?

May 22, 2011

I want to install python in RHEL 5.0.

View 2 Replies View Related

General :: Importing Python Script

Apr 8, 2011

I am able to import file.py in my C program(main.c), but unable to import this file [url]

Im using centos5.5 with python2.4 using this command to run it: gcc -o output pythonembed.c -lpython2.4

How can i import this script:
[url]

View 4 Replies View Related

General :: Logging A To /var/log/messages Using Python?

Mar 25, 2011

I use python 2.6 logger to log to a file. But now I want it to be part of /var/log/messages.

Any tips/pointer/guide on what to do?

View 1 Replies View Related

General :: Yum - Remove Python And 630+ Dependencies

Oct 19, 2010

He was having problems with python and python-devel complaining about conflicting versions or some such when he was updating with yum. I told him (yes, a little of this is my fault) to try removing and reinstalling python and/or python-devel. Little did I know... He ran "yum remove python" and it listed over 600 (!) dependent packages to remove as well. Without telling me THAT part he clicked "y" and then watched as yum removed python and all sorts of other stuff (including yum--how's that for irony?) .

I have to go deal with this situation tomorrow morning but he has so blown away this system I almost don't know where to start. Sure I could re-download the rpm of python and reinstall, it but then I'd still have to one-by-one reinstall all the other rpms that were blown away by the python removal with yum. I do take at least partial responsibility for this. But really? 600+ packages and he clicked "y"? Yeesh. Oh, it's a RHEL 5 machine.

View 4 Replies View Related

General :: Installed Python Module Is Not Found?

Jul 10, 2010

This borders on stackoverflow/superuser, but I guess it's a simple installation problem.I've installed python-twisted on my ubuntu 10.04 server, but it can't be found.This is what I get when I try to import something:

>>> from twisted.internet import reactor
Traceback (most recent call last):
File "", line 1, in [code]....

I've installed the package through apt-get.That way the module is installed in this folder: /usr/lib/python2.6/dist-packages/twisted with an __init__.py file.When I try to use python setup.py install (on the download from the site) it installs it to /usr/local/lib/python2.6/dist-packages/twisted, but it also does not find it there.

View 1 Replies View Related

General :: Install The Python Module For Gnash?

Aug 5, 2011

How do I install the Python module for Gnash?

But apart from that, what basic concept am I not understanding about installing packages on Linux?

I am used to installing packages using package managers - mostly apt-get and zypper. I have occasionally installed from source, often with no trouble. However I recently installed Gnash and discovered that it has a Python binding that must be compiled from source and this has led down a rabbithole making me feel stupider at each turn.

First, I attempt do a ./configure --enable-python in the gnash source dir. This ends up failing with an error that

package pygtk-codegen-2.0 isn't found

The lead developer, Rob Savoye, was kind enough to point me at packages.debian.org, telling me I just need to locate this package. After many failed searches, I found that the python-gtk2-dev package contains this ... file? script? Great, but I couldn't figure out how to obtain the python-gtk2-dev package. It doesn't exist in any of my openSUSE configured repositories.

So I headed to the GNOME site and searched, found that the PyGTK package contains pygtk-codegen. Download the tarball, cd, ./configure, and this fails because I don't have GLIB. After some more searching I use zypper to install glib2-devel (libglib-2.0 was already installed), and now PyGTK fails to configure because I don't have GObject.

Find that, download tarball, cd, ./configure, fail. I don't have gobject-introspection-1.0, apparently. I DO have gobject-introspection installed, and it's version is ≥ 1.0, but that's what the script says.

So I will readily admit I am new to Linux, but I have to be missing some basic step here. Can anyone give me a clue about any of the above? Is it normal to have to install one dependency after another like this? Is OpenSUSE the wrong distro? What would make this process not so horrible?

View 2 Replies View Related

General :: Write A Shell Script Contains Python One?

Oct 22, 2010

I want to write a shell script contains python one. So,the result of python one is flv file. I want the path of this is copied into a enviroment variable that i have to pass as a flag argument of another program (to convert into mp3). To individuate the result of python script I thought to use (in PWD)

Code:
ls | grep -E '^.*mp3$'
But my question is: How can I copy this result into enviroment variable?

View 4 Replies View Related

General :: Can PATH Statement Be Used With Python In Ubuntu 9.10?

Oct 10, 2010

On Ubuntu 9.10 I installed Python 3.1.1 successfully with Synaptic Package Manager. However the Python interpreter cannot find my scripts, currently in /home/dave/pycode. This appends _temporarily_ but python remains clueless about location of my scripts. Searched Internet and some speak of .rc or .bashrc or .profile..files. Found some of these and opened with Komodo : they are Linux script files and I am clueless as to how to modify.Currently I can import my scripts only if I change to the /pycode dir before running.Lutz's Python book says to change PATH file - Ha .Sobell's "A practical Guide to Ubuntu Linux" is no help. Ubuntu's own on line help is worth less than a fart in a hurricane. Ubuntu's gedit would not even open bash.bashrc.

View 7 Replies View Related

General :: Embedding Python Script In C Program?

Apr 7, 2011

How can i embed python script in C program?

View 1 Replies View Related

General :: Fonts Conflict During Python Installation?

Apr 25, 2010

I am trying to install Python and during the installation the system returns "dejavu-sans-fonts conflicts with dejavu-fonts". I would imaging that removing one or other of these font packages will resolve the issue but don't understand how to do that.

View 2 Replies View Related

General :: Python 2.6 Dependencies Error During Installations

Feb 11, 2011

I am trying to install vodafone mobile connect 2.10 (noarch.rpm) but keep getting a python = 2.6 is needed by python-sq*. I had Python 2.6 installed and upgraded to 2.6.6, but still got the error. What could I be doing wrong or what repositories are short on my openSuse 11.0 to have the installation work. I downloaded the correct version of vodafone for my system.

View 1 Replies View Related

General :: Python Modules(lib-dynload) Are Too Big In Size?

Apr 28, 2010

Recently I have compiled python 2.6.5 on ubuntu "hardy" 8.04. The script was as simple as it could be:

Code:
./configure --enable-shared
make

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved