How to read a maze from an image and convert it to binary values in Python?

I want some way (In Python 3) to read pixels of a maze image and the expected output should be a binary list [[1, 1,...

Drawing a spiral in a spiral using Python turtle?

What is wrong with my code for turtle angie? I want her to spiral inside brad's square circle. My Code: import tu...

how to find the outline of union rectangles?

I have coordinates of each rectangles and want to find the outlines of union rectangles. So what I did is that j...

How do you check whether a number is divisible by another number (Python)??

I need to test whether each number from 1 to 1000 is a multiple of 3 or a multiple of 5. The way I thought I'd do th...

Python : name 'math' is not defined Error??

I am a beginner in python and cant understand why this is happening: from math import * print "enter the number" n=...

Reverse colormap in matplotlib?

I would like to know how to simply reverse the color order of a given colormap in order to use it with plot_surface....

How do I get current URL in Selenium Webdriver 2 Python??

I'm trying to get the current url after a series of navigations in Selenium. I know there's a command called getLoca...

Matplotlib pyplot.title(string) returns error?

When I call pyplot.title('some string') it throws the exception, 'str' object is not callable'. I copied the followi...

How to set the font size of a Canvas' text item??

I have the following code: canvas.create_text(x, y, font="Purisa", text= k) How do I set the font size with a var...

python: sys is not defined?

I have a piece of code which is working in Linux, and I am now trying to run it in windows, I import sys but when I ...

What does the “-U” option stand for in pip install -U?

Despite a ton of Googling, I can't find any docs for pip's command line options/arguments. What does pip install -U ...

How can I check if a string represents an int, without using try/except??

Is there any way to tell whether a string represents an integer (e.g., '3', '-17' but not '3.14' or 'asfasfas') With...

How to print the full NumPy array, without truncation??

When I print a numpy array, I get a truncated representation, but I want the full array. Is there any way to do th...

Turtle and draw a tree with Transcrypt?

today I want draw a tree in browser with Transcrypt. I have code in Python which is work in Skulpt: import random i...