Programming :: Python "IOError: [Errno 24] Too Many Open Files"?

Feb 2, 2011

I'm trying to write a mediaplayer for my phone + computer in python... It is going well, but I ran into a problem when I moved the programme from my phone (where it worked) to my computer (where it didn't). The error I got was:

Code:
File "./hearse.py", line 169, in getSongInfo
File "/home/joshua/scripts/python2/myMusic.py", line 120, in getSongTitle

[code]....

View 2 Replies


ADVERTISEMENT

Red Hat / Fedora :: Setup Iptables - IOError: [Errno 13] Permission Denied

May 26, 2011

I am trying to set up iptables, I get this error message and dont' know what to do.

[Code]...

EDIT. I did chmod 777 /etc/sysconfig/iptables.old and it still doesnt work

View 9 Replies View Related

Slackware :: Default PATH - Python: Can't Open File 'SABnzbd.py': [Errno 2] No Such File Or Directory

Nov 24, 2010

I have just installed SABnzb application in my home folder. The executable file is SABnzb.py When I run the command in the Konsole # python SABnzb.py I have this Quote: python: can't open file 'SABnzbd.py': [Errno 2] No such file or directory

View 5 Replies View Related

Programming :: DataBase In Python - Compile .py Files Into A .exe File

Jun 20, 2011

i am new to python programing and i have a couple of ?'s

1- what would i do if i needed to find the closest, bigger number, from a list of numbers when the user types a number in.

2- (windows) i need a program that can compile .py files into a .exe file so that it works on a machine without python it also needs to work with python 3.2.

View 8 Replies View Related

Programming :: Writing Files With Python Produces Blank 0KB File?

Jun 22, 2010

I am working on a little project in python. i have produced this prototype

Code:
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
#DocC documentation prototype

[Code].....

View 2 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

Server :: ErrNo 14 And ErrNo 256 In Yum Configuration

May 21, 2011

I have installed CentOS 5.6 guest in vmware. This machine has host-only networking. I would like to install vmware-tools, which requires that gcc be installed. (As vmware tools is not yet configured, I cannot copy paste the error. So I am typing it out). As gcc has dependancies, I thought of configuring a local yum repository via http. http is already up and running fine.These are the steps I did:

I mounted the iso as loopback in /mnt/cdrom.

cd /var/www/html
mkdir -p yum/base-pkg

/var/www/html/yum/base-pkg is where all the rpm's going to be served via http will be present. I am changing the ownership of /var/www/html/yum/base-pkg to apache:apache, though not sure if this step is required.

chown -R apache:apache /var/www/html/yum/base-pkg
Now, cd /mnt/cdrom
ls CentOS | wc -l
shows 2684

I am copying these 2684 packages as follows:

cp -avr CentOS/* /var/www/html/yum/base-pkg

I am also copying the directory "repodata" as follows:

cp -R repodata/* /var/www/html/yum/base-pkg
Now, cd /etc/yum.repos.d

ls shows the following files:

CentOS-Base.repo
CentOS-Debuginfo.repo
CentOS-Media.repo
CentOS-Vault.repo

I am renaming the .repo directories to something else. I hope this will ensure that yum will not look into the default repositories, rather will look only into my custom repository file.

for i in $(ls); do mv $i $i.org; done

Now I am creating my repository file named mylocal.repo (in /etc/yum.repos.d)

touch mylocal.repo
vi mylocal.repo
[base-local]
name=Centos $releasever - $basearch

[code].....

View 4 Replies View Related

Programming :: Using Python To Merge Two Text Files Line For Line

Jul 6, 2010

I'm a bit new to Python programming and hoped that someone might be able to help with a problem I'm having. What I essentially want to do is to combine two text files line for line. I know how to do this in a bash script so to give you a better idea here's the code for that:

Code:

This is basically for adding on values to the end of a CSV file that uses ';' as the delimiter. So say file1 said:

And file2 said:

Then running this command would create merged_file1_and_file2 which would be:

The code I'm using at the moment is:

Code:

As I'm sure any experienced python programmer will see, this prints out the first line of the file "csvraw" and then all of the lines of "stamps" and then the remainder of "csvraw".

What I'd like to do is something like: (pseudo code, I know it's not python ;-))

Code:

Is this possible? I've tried googling and my Python Pocket Reference hasn't been much help. I've looked at pickling but that doesn't seem appropriate.

View 1 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

Ubuntu :: Error: "Note: Cannot Open TUN/TAP Dev /dev/net/tun: Permission Denied (errno=13)"

Mar 14, 2011

I have a problem setting up a TUN interface for OpenVPN. Running OpenVPN gives me this error: "Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)"

Which i tracked down to: "WARNING: Couldn't open directory /lib/modules/2.6.18-164.15.1.el5.028stab068.9: No such file or directory" (if i run /sbin/modproble tun). Does anyone know how to fix this?

View 1 Replies View Related

Programming :: How To Open The Device Files

Feb 10, 2010

i want to open and read /dev/pts/o file as a user how can i open? using normal fopen and fread functions? is it possible to open lik dat ? it der any alternate way to open and read the device files in ubuntu

View 6 Replies View Related

Programming :: Java - Too Many Files Open?

Feb 18, 2010

i am creating program that gets 'key' string and directory path and finds if key string is present in any file under given path, everything seemed OK but when i put path like "/" after 5 mins i get error : Too many opened files. I've minimalized opened File object at the same time as much as posible, tried to call System.gc(),tried to close every stream every opened file, google but i still cannot search in bigger directories.

Algorithm (mine one is much bigger so i tried to make it as small as possible:

read 'path';
read 'key'(set as public);
#&
call method get('path') {

[Code]....

why I always get that runtime error ? (I need it to search hundreds of GB so when my 40GB partition do this what will bigger one do )

View 7 Replies View Related

Ubuntu :: Can't Open Places: "errno 21 Is A Directory"

Apr 6, 2011

All of a sudden I can't open any directory in Places: I get an error message saying [errno 21] Is a directory" followed by the name of the directory that I'm trying to open in Ubuntu 11.04

This error first popped up in one small subdirectory when I used Bazaar today; I recently installed it and it has been working OK until now.

(I can still access everything via desktop shortcuts)

View 2 Replies View Related

Programming :: How To Open .doc / .ppt / .xls / .docx Files Using Java

Feb 14, 2010

does anyone know how to open .doc .ppt .xls .docx.... files using java ? i found just Apache POI but it can open just .xls files.

View 4 Replies View Related

General :: IOError: HTTP Error 404: Not Found

Jun 25, 2010

friends <
I tried installing amanda like this:
yum -y install amanda*
Gathering header information file(s) from server(s)
Server: Fedora Linux / stable for Red Hat Linux 3ES (i386)

[code].....

I tried yum because when i did the simple download o the newest amanda rpm and tried t install.. i get the following dependency problem..

[root@Mixer amanda-dwnload]# rpm -ivh amanda-backup_server-3.1.0-2.rhel4.i386.rpm
error: Failed dependencies:
libcurl.so.3 is needed by amanda-backup_server-3.1.0-2.rhel4
libidn.so.11 is needed by amanda-backup_server-3.1.0-2.rhel4
tar >= 1.14 is needed by amanda-backup_server-3.1.0-2.rhel4

I do have yum installed -- that s when i do

yum --version
2.0.3

i see a vers num.it is a redhat system

uname -a
Linux Mixer 2.4.21-58.EL #1 Tue Nov 4 11:55:15 EST 2008 i686 i686 i386 GNU/Linux
---
cat /etc/issue
Red Hat Enterprise Linux ES release 3 (Taroon Update 9)

[code].....

View 10 Replies View Related

Programming :: Totem Python Plugin Programming: Any Signal For Video Mouse Click?

Feb 9, 2011

I want that I click with the mouse on the video, it paused.I notice that there is "BaconVideoWidget" which I guess is the video rendering widget but it don't have signal named "clicked":

Code:
vd = totem_object.get_video_widget()
vd.connect("clicked", vd.hide)

[code]....

View 3 Replies View Related

Programming :: GCC Unable To Find "errno" When Compiling On Ubuntu?

Dec 14, 2010

I am trying to compile a very simple program which uses errno variable, but I am getting compile error of not finding "errno" Given is my program.

1 #include <stdio.h>
2 #include <unistd.h>
3 #include <fcntl.h>

[code]...

View 2 Replies View Related

Programming :: Kernel Module - Task_struct / Files Struct, Open_fds, And The Open File Descriptors In Task?

May 1, 2010

This for Kernel 2.6.29.6. I'm trying to code a kernel module that displays process information.

how to count opened file descriptors per task. I have been able to write a module that lists all the current process names along with their pid number in /var/log/messages. Basically, I cycle through the ring of processes using the macro for_each_process(task) and printk the comm and pid of each task. I'm trying to see how many file descriptors each task has open. I've been reading up in books and all over the internet. At first I thought I needed to access max_fds under files_struct, but that just lists the maximum number of file descriptors that can be opened per task, which by default is set at 256. I then thought about counting the elements in the fd_array. But then I learned that every task's fd_array is initially set at 32. Now I know that I need to access open_fds of type fd_set * in files_struct. open_fds is a pointer to all the open file descriptors. The problem is that I don't know how to access a pointer of type fd_set.

Is there a good guide or book that really focuses on type fd_set and open_fds? Every book and resource I've read never really go into depth on this. relationship between files struct, open_fds, and the open file descriptors in task?

View 4 Replies View Related

Programming :: Error 4 Which (according To /usr/include/asm-generic/errno-base.h) Means "interrupted System Call"

Aug 1, 2010

I'm using gmake (v3.81) to build some c executables. As the first step in the process I run the files through a preprocessor (for embedded SQL). The preprocessor completes successfully, but the gmake reports an error and discontinues buiding the remaining dependencies...

make *** [myfile.c] Error 4

which (according to /usr/include/asm-generic/errno-base.h) means "interrupted System Call". My preprocessor doesn't raise any signals, so I'm not sure what's causing this error.

View 2 Replies View Related

Programming :: Open Two Text Files - Read Them Line By Line And Update Parameters Of The 3rd File ?

Oct 18, 2010

I have two txt files containing x and y coordinates: xcoord.txt & ycoord.txt. I need to open them; read them line by line to get each coordinate; then each time I need to update Xs and Ys parameters inside another file called "dc.in" with the grabbed values.

Finally each time I need to run two exe files ( dc_2002 and st_vac) and produce corresponding output for each Xs and Ys ( dc.in is an input file for this exe files)

I have written the following code but it does not work:

View 14 Replies View Related

Ubuntu :: Error: To Many Open Files But None Of The Files In Them Are Open?

Jan 9, 2010

they keep coming up with Error: To many open files but none of the files in them are open?

View 4 Replies View Related

Programming :: Python 2.x Vs 3.x

Apr 21, 2010

I'm starting to learn python and I am wondering whether I should start with python 2.x or should I just start learning python 3.x?

View 2 Replies View Related

General :: Error Unknown Tag: Copyright: Modified CNRI Open Source License While Installing Rpm In Python

Apr 9, 2010

while installing ... Installing python2.4-2.4-1pydotorg.src.rpm

warning: user jafo does not exist - using root
warning: group jafo does not exist - using root
warning: user jafo does not exist - using root
warning: group jafo does not exist - using root
error: Legacy syntax is unsupported: copyright

error: line 55: Unknown tag: Copyright: Modified CNRI Open Source License

View 3 Replies View Related

Programming :: Convert Map From Python 2.x To 3.x

Apr 6, 2010

I have an existing line of code from a P2 script that I cannot find a solution to converting to P3:

Code:
for i, x in map(None, list1, list2):
I have found the information about converting the simple case:
map(None,x) becomes list(x)

But my googling was unable to find a solution when more than one iterable exists.

View 2 Replies View Related

Programming :: How To Run Python Script From C

Jan 31, 2010

I have a python script I wrote a while ago and now I would like to call that script from inside C. I know how to do one command from C, but how would you execute an entire script from C, and passing arguments? Like:

Code:

int main(void)
{
python( myprogram(1 2 3) );
}

So I can pass arguments to my script.

View 3 Replies View Related

Programming :: Py_FindMethod In Python 3.1.1

Jan 19, 2010

what the equivalent function in Python 3.1.1 is for Python 2.6.4s:

Py_FindMethod

Be buggered if I can find anything in the doco to say what replaced it or what alternative code may need to be entered to replace it

View 1 Replies View Related

Programming :: Python With Web Development ?

Dec 17, 2010

I have decided to learn python as it seems to be powerful not just for web development (like php) but also a clean powerful language for other puposes.

Q: Can someone suggest a tutorial or book, on learning python (beginner to intermediate) which has as its focus for learning, web development?

In order of preference: 1. Comprehensive, 2. Online, 3. Free

View 2 Replies View Related

Programming :: Piping In Bash Using Python?

Dec 16, 2010

I have a bash script that I want to import in to Python, mainly just to see if I can or not. However in the script I do use some piping of commands into sed to trim it down to what I need. When I tried doing it with the os.system() call, it didn't work. The exact error is

sed: -e expression #1, char 16: unterminated `s' command

However the command that was run can be run in bash without an error. Is there a better/another way to do this? For reference the command is:

Code:

locate -n 1 wp-config.php | sed 's/wp-config.php/
/g' | sed '/wp-config.php/ d' | sed '/^$/ d'

View 3 Replies View Related

Programming :: Accessing Python Scripts Using Web?

Mar 17, 2011

I am using Centos. I have written some scipts in python that access my routers and fetch the configuration, etc. Now i was thinking of creating a web interface which i can access from my windows XP. I want it to have good look n feel :-),

View 7 Replies View Related







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