python-2.7
Is there a way to find out the name of the file stdout is redirected to in Python
I know how to detect if my Python script\'s stdout is being redirected (>) using sys.stdout.isatty() but is there a way to discover what it\'s being 开发者_运维技巧redirected to?[详细]
2023-03-04 07:19 分类:问答IplImage 'None' error on CaptureFromFile() - Python 2.7.1 and OpenCV 2.2 WinXP
I am running Python2.7.1 and OpenCV 2.2 without problems in my WinXP laptop and wrote a tracking program that is working without a glitch. But for some strange reason I cannot get the same program to[详细]
2023-03-02 10:51 分类:问答How can I retrieve a given number of movies under a given genre using imdbpy?
I am starting using imdbpy and I am interesting in a way to implement a method with the following specifications:[详细]
2023-03-01 17:02 分类:问答PyUSB/ similar USB functionality for Python 2.7
Is it possible to get a progr开发者_如何学Cam like PyUSB, or similar, for python version 2.7?I\'m not sure what the problem is - the PyUSB page says it supports Python >= 2.4. From other Googled web s[详细]
2023-03-01 12:53 分类:问答Python 2.7 not working in Windows Console
I recen开发者_运维技巧tly upgraded from python 2.6 to python 2.7 and everytime I try todo python setup.py install I get.[详细]
2023-02-26 19:55 分类:问答When running Virtualenv 1.6 on Mac OS X 10.6.7, Python 2.7.1
I\'m currently trying to set up pinax on top of Python 2.7.1 and Django 1.3. For the first few steps, one is required to set up virtualenv, with the following commands:[详细]
2023-02-24 22:43 分类:问答Practical Django Projects - Pages 71 and 80
I am reading the book \"Practical Django Projects\". It is a nice book. I have a few questions though :[详细]
2023-02-24 06:07 分类:问答What is a good way to handle exceptions when trying to read a file in python?
I want to read a .csv file in python. I don\'t know if the file exists. My current solution is below. It feels sloppy to me because the two separate exception tests are awkwardly juxtaposed.[详细]
2023-02-23 13:30 分类:问答On Ubuntu, how to install pygtk for python 2.7 through apt-get?
I\'m using Ubuntu 10.10, which comes with Python 2.6.I would like to test a PyGTK app I\'m writing with Python 2.7.[详细]
2023-02-22 21:59 分类:问答Unescaping Characters in a JSON response string
I made a JSON request that gives me a string that uses Unicode character codes that looks like: s = \"\\u003Cp\\u003E\"[详细]
2023-02-22 11:21 分类:问答