In the 2.x series of the Python programming language, 2.7 is the latest, and last, major release.

learn more… | top users | synonyms

0
votes
0answers
11 views

Dijkstras Algorithm - Missing path

Im still pretty new to programming though I have programmed some simple algorithms now. My final goal, before I'm moving on to something more advanced (i.e small games and so on), is to implement ...
0
votes
1answer
19 views

How to link or embed a Python code into Facebook. I made a cool math game and want to share it

I am in my early stages of writing Python Code and recently wrote a cool, entertaining math trick. Everybody loves it. How would I go about creating an interface that enables people of Facebook to ...
-2
votes
2answers
24 views

Python ( mod_wsgi ) how to fetch strings between 2 other strings such as : <title>aaa</title>

This is my python code so far. a='<title>aaa</title><test>bbb</test>' def application(environ, start_response): import re a1 = re.findall('()', a2) ...
-5
votes
0answers
30 views

How to add a simple output text box in python? [on hold]

I would like to add a dynamic text box in my window using python.so that i could display the return values of my function in the window.
0
votes
1answer
27 views

python-2.7 .zip multiple generated lists

Lets say I have a function that generates X amount of equal length lists based on function call. e.g if there are 5 separate strings in function call it should generate 5 lists and .zip/join/merge ...
0
votes
1answer
31 views

TypeError: 'int' object is not callable,,, len()

I wrote a program to play hangman---it's not finished but it gives me an error for some reason... import turtle n=False y=True list=() print ("welcome to the hangman! you word is?") word=raw_input() ...
0
votes
1answer
21 views

Print variable from other file with raw_input

So I'm just starting out on a project here. For starters, I have two files. The first file is myDict.py. In there I store variables that I want to be able to fetch. myDict.py: numbers = [1, 5, 8, ...
0
votes
1answer
29 views

How to encode/decode this file in Python?

I am planning to make a little Python game that will randomly print keys (English) out of a dictionary and the user has to input the value (in German). If the value is correct, it prints 'correct' and ...
1
vote
0answers
23 views

Running scrapy from inside Python script - CSV exporter doesn't work

My scraper works fine when I run it from the command line, but when I try to run it from within a python script (with the method outlined here using Twisted) it does not output the two CSV files that ...
1
vote
1answer
10 views

Tkinter hangs while sensing (in a for loop)

while True: x = [] while True: sense = 0 for i in range(0,4): k = gpio.input(sensor) if k = 1: sense += 1 ...
0
votes
1answer
20 views

Pass value from executing script

I am trying to pass the value from an executing script to another file. Capture.py is the executing script. The script is running and will end only when KeyboardInterrupt. #capture.py def ...
1
vote
0answers
21 views

Keeping Python packages with the same top-level name in different directories

I have several Python packages that I'd like to keep on separate filesystems but which unfortunately share the same top-level module name. To illustrate, the directory structure looks like this: ...
2
votes
1answer
34 views

Python: EOFError: EOF when reading a line

This may be repeated, but none of the existing answers solved my problem. So, I'm using Python 2.7, and I get this error (title) whenever I try this: number = int(raw_input('Number : ')) I tried ...
0
votes
0answers
18 views

Why does OAuth2 authentication work on home machine but not on a server?

I'm struggling to get OAuth2 authorisation to work on a script I'm working on when I run it on an EC2 Linux server instance (running Ubuntu 13.04). The line which is giving the trouble is this: ...
1
vote
1answer
21 views

return rows in a dataframe closest to a user-defined number

I have a user defined number which I want to compare to a certain column of a dataframe. I would like to return the rows of a dataframe which contain (in a certain column of df, say, df.num) the 5 ...

1 2 3 4 5 577
15 30 50 per page