Tested on Python 2.6 interpreter: >>> a=set('abcde') >>> a set(['a', 'c', 'b', 'e', 'd']) >>> l=['f','g'] >>> l ['f', 'g'] >>> a.add(l) Traceback (most recent call last): File "<pyshell#35>",...
  • May 13, 2022
  • 0 Comments
I have installed OpenCV on the Occidentalis operating system (a variant of Raspbian) on a Raspberry Pi, using jayrambhia’s script found here. It installed version 2.4.5. When I try...
  • May 10, 2022
  • 0 Comments
I am getting the following error: Exception in thread Thread-3: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run self.__target(*self.__args,...
  • May 10, 2022
  • 0 Comments
I’m trying to use TDD (test-driven development) with pytest. pytest will not print to the console when I use print. I am using pytest my_tests.py to run it. The...
  • May 9, 2022
  • 0 Comments
I am trying to install PIL (the Python Imaging Library) using the command: sudo pip install pil but I get the following message: Downloading/unpacking PIL You are installing a...
  • May 9, 2022
  • 0 Comments
I’ve been making Python scripts for simple tasks at work and never really bothered packaging them for others to use. Now I have been assigned to make a Python...
  • May 7, 2022
  • 0 Comments