python Programming Glossary: errno
Python subprocess.Popen “OSError: [Errno 12] Cannot allocate memory” http://stackoverflow.com/questions/1367373/python-subprocess-popen-oserror-errno-12-cannot-allocate-memory subprocess.Popen &ldquo OSError Errno 12 Cannot allocate memory&rdquo Note This question was originally.. python2.4 subprocess.py line 835 in _get_handles OSError Errno 12 Cannot allocate memory The output of free m on the server.. 4096 0 write 2 OSError 7 7 write 2 2 2 write 2 Errno 12 Cannot allocate memor ... 33 33 write 2 n 1 1 unlink var..
Create a temporary FIFO (named pipe) in Python? http://stackoverflow.com/questions/1430446/create-a-temporary-fifo-named-pipe-in-python this question os.mkfifo will fail with exception OSError Errno 17 File exists if the file already exists so there is no security..
What is the Python egg cache (PYTHON_EGG_CACHE)? http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache while trying to extract file s to the Python egg cache Errno 13 Permission denied ' var www .python eggs' The Python egg..
Read a file on App Engine with Python? http://stackoverflow.com/questions/2630205/read-a-file-on-app-engine-with-python its contents and get the last modified tag I get a IOError Errno 13 file not accessible I know that i cannot delete or update..
Making moves w/ websockets and python / django ( / twisted? ) http://stackoverflow.com/questions/4363899/making-moves-w-websockets-and-python-django-twisted most recent call last File console line 1 in module error Errno 9 Bad file descriptor Sad. OK so I don't know much of anything..
Python [Errno 98] Address already in use http://stackoverflow.com/questions/4465959/python-errno-98-address-already-in-use Errno 98 Address already in use In my Python socket program I sometimes..
Adding folders to a zip file using python http://stackoverflow.com/questions/458436/adding-folders-to-a-zip-file-using-python feed the path to a folder in myZipFile.write I get IOError Errno 13 Permission denied '.. packed bin' Any help is much welcome...
Problem with multi threaded Python app and socket connections http://stackoverflow.com/questions/4783735/problem-with-multi-threaded-python-app-and-socket-connections 2011 01 31 11 08 29 224 error wikipedia.org reason Errno 111 Connection refused 2011 01 31 11 08 29 225 done google.co.in.. google.co.in 2011 01 31 11 08 29 227 error msn.com reason Errno 111 Connection refused 2011 01 31 11 08 29 228 error live.com.. refused 2011 01 31 11 08 29 228 error live.com reason Errno 111 Connection refused 2011 01 31 11 08 29 250 done google.de..
opening websites using urllib2 from behind corporate firewall - 11004 getaddrinfo failed http://stackoverflow.com/questions/4847649/opening-websites-using-urllib2-from-behind-corporate-firewall-11004-getaddrinf 'http python.org' Getting error URLError urlopen error Errno 11004 getaddrinfo failed I have tried with different handlers..
Using an HTTP PROXY - Python http://stackoverflow.com/questions/5620263/using-an-http-proxy-python .read returns urllib2.URLError urlopen error Errno 10061 No connection could be made because the target machine.. actively refused it or urllib2.URLError urlopen error Errno 11004 getaddrinfo failed Extra info urllib.urlopen .... works.. but I'm getting this error now URLError urlopen error Errno 10060 A connection attempt failed because the connected party..
Read Unicode characters from command-line arguments in Python 2.x on Windows http://stackoverflow.com/questions/846850/read-unicode-characters-from-command-line-arguments-in-python-2-x-on-windows temp argv.py line 7 in module print open first_arg IOError Errno 2 No such file or directory 'Jorgen.txt' Note ”I'm talking about..
Converting a String to Dictionary? http://stackoverflow.com/questions/988228/converting-a-string-to-dictionary shutil.py line 206 in rmtree names os.listdir path OSError Errno 2 No such file or directory 'mongo' ast.literal_eval shutil.rmtree..
What conditions result in an opened, nonblocking named pipe (fifo) being “unavailable” for reads? http://stackoverflow.com/questions/10021759/what-conditions-result-in-an-opened-nonblocking-named-pipe-fifo-being-unavai data os.read new_pipe 1024 The read occasionally raises errno 11 Resource temporarily unavailable. When is this error raised.. writing and O_NONBLOCK is set read shall return 1 and set errno to EAGAIN . So basically your second assumption is wrong If.. however you can just catch the exception and retry import errno def safe_read fd size 1024 ''' reads data from a pipe and returns..
How to timeout function in python, timeout less than a second http://stackoverflow.com/questions/11901328/how-to-timeout-function-in-python-timeout-less-than-a-second And here is the code from functools import wraps import errno import os import signal class TimeoutError Exception pass def.. pass def timeout seconds 10 error_message os.strerror errno.ETIME def decorator func def _handle_timeout signum frame raise..
Fetch a Wikipedia article with Python http://stackoverflow.com/questions/120061/fetch-a-wikipedia-article-with-python squid 2.6.STABLE21 to Error ERR_ACCESS_DENIED errno No Error at Tue 23 Sep 2008 09 09 08 GMT Wikipedia seems to..
What user do python scripts run as in windows? http://stackoverflow.com/questions/1213706/what-user-do-python-scripts-run-as-in-windows call it and provide an exception handler like this import errno os stat shutil def handleRemoveReadonly func path exc excvalue.. excvalue exc 1 if func in os.rmdir os.remove and excvalue.errno errno.EACCES os.chmod path stat.S_IRWXU stat.S_IRWXG stat.S_IRWXO.. exc 1 if func in os.rmdir os.remove and excvalue.errno errno.EACCES os.chmod path stat.S_IRWXU stat.S_IRWXG stat.S_IRWXO..
Copy file or directory in Python http://stackoverflow.com/questions/1994488/copy-file-or-directory-in-python is thrown then retry with shutil.copy . import shutil errno def copyanything src dst try shutil.copytree src dst except.. src dst except OSError as exc # python 2.5 if exc.errno errno.ENOTDIR shutil.copy src dst else raise share improve.. src dst except OSError as exc # python 2.5 if exc.errno errno.ENOTDIR shutil.copy src dst else raise share improve this..
Timeout function if it takes too long to finish http://stackoverflow.com/questions/2281850/timeout-function-if-it-takes-too-long-to-finish code as timeout.py . from functools import wraps import errno import os import signal class TimeoutError Exception pass def.. pass def timeout seconds 10 error_message os.strerror errno.ETIME def decorator func def _handle_timeout signum frame raise.. the error Connection timed out @timeout 30 os.strerror errno.ETIMEDOUT def long_running_function3 ... share improve this..
Return a list of imported Python modules used in a script? http://stackoverflow.com/questions/2572582/return-a-list-of-imported-python-modules-used-in-a-script abc _bisect posixpath _random os2emxpath tempfile errno pprint binascii token sre_constants re _abcoll collections ntpath..
How do I check if a string is a number in Python? http://stackoverflow.com/questions/354038/how-do-i-check-if-a-string-is-a-number-in-python A number if the number is valid A status code e.g. via errno or exception to show that no valid number could be parsed. C..
Get hard disk serial number using Python on Linux http://stackoverflow.com/questions/4193514/get-hard-disk-serial-number-using-python-on-linux fd HDIO_GET_IDENTITY hd printf .20s n hd.serial_no else if errno ENOMSG printf No serial number available n else perror ERROR..
Python [Errno 98] Address already in use http://stackoverflow.com/questions/4465959/python-errno-98-address-already-in-use Or is this intended python sockets connection close errno share improve this question Yes it is intended. Here you..
Why can't I handle a KeyboardInterrupt in python? http://stackoverflow.com/questions/4606942/why-cant-i-handle-a-keyboardinterrupt-in-python . fread can return with an error with errno EINTR it performs its own signal handling . In this case Py_UniversalNewlineFread..
Mocking open(file_name) in unit tests http://stackoverflow.com/questions/5237693/mocking-openfile-name-in-unit-tests i in range length return attributes_list except IOError errno strerror logging.error I O error s s errno strerror except IndexError.. except IOError errno strerror logging.error I O error s s errno strerror except IndexError errno strerror logging.error 'Index.. I O error s s errno strerror except IndexError errno strerror logging.error 'Index Error s s' errno strerror finally..
How to exit a multithreaded program? http://stackoverflow.com/questions/5849484/how-to-exit-a-multithreaded-program python import threading import socket import time import errno class StoppableThread threading.Thread def __init__ self threading.Thread.__init__.. host self.stop_event.set except socket.error as sock_errno sock_errstr if sock_errno errno.EWOULDBLOCK # socket would.. except socket.error as sock_errno sock_errstr if sock_errno errno.EWOULDBLOCK # socket would block sleep sometime time.sleep..
mkdir -p functionality in python http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python this question mkdir p functionality as follows import os errno def mkdir_p path try os.makedirs path except OSError as exc.. os.makedirs path except OSError as exc # Python 2.5 if exc.errno errno.EEXIST and os.path.isdir path pass else raise Update For.. path except OSError as exc # Python 2.5 if exc.errno errno.EEXIST and os.path.isdir path pass else raise Update For Python..
Python multiprocessing: How can I RELIABLY redirect stdout from a child process? http://stackoverflow.com/questions/7714868/python-multiprocessing-how-can-i-reliably-redirect-stdout-from-a-child-process port authkey secret break except socket.error as ex if ex.errno 98 raise port 1 ## if errno 98 then port is not available. proc.. socket.error as ex if ex.errno 98 raise port 1 ## if errno 98 then port is not available. proc subprocess.Popen sys.executable..
|