Python is a dynamically and strongly typed programming language whose design philosophy emphasizes code readability. Two significantly different versions of Python (2 and 3) are in use. Please mention the version that you are using when asking a question about Python.

learn more… | top users | synonyms (2) | python jobs

0
votes
0answers
3 views

Posted event does not turn up with pygame.event.get()

I am putting together a component-entity game engine using Pygame, and I am using custom Pygame Userevents as my messaging system (the way the different subsystems within the engine can communicate ...
0
votes
0answers
5 views

use F to update multiple fields Python

HI i need to update the multiple fields in the database , right now i am updating like this for t in getteamPlayers : getmyplayer= myplayer.objects.get(id=t.playerId) getPlayerAge = ...
0
votes
0answers
8 views

How can i decode JSON-like string in cyrrilic?

I'm trying to create a simple spider in Scrapy that will get all the adverts from a site. The problem is that all the adverts are in cyrrilic so i get strings like that: ...
0
votes
0answers
6 views

redis-py subscribe blocked when read message

Recentlly i use python and redis to build a smarl messge-driven project. i use one thread to subsribe to redis channel(called message thread here); a timer thread; and a worker thread; when message ...
-6
votes
0answers
24 views

listing ptograms to select in python [on hold]

I am new to python and have been trying to list out a couple of my programs so that a user can select an option/number and that program would launch. ex: Word Excel Calculator Enter a number : 1 ...
0
votes
2answers
11 views

How to compare two xml files in python in script?

I am new python. I have some predefined xml files. I have a script which generate new xml files. I want to write an automated script which compares xmls files and stores the name of differing xml file ...
0
votes
0answers
12 views

grouping dataframes in pandas efficiently?

I have the following dataframe in pandas where there's a unique index (employee) for each row and also a group label type: df = pandas.DataFrame({"employee": ["a", "b", "c", "d"], "type": ["X", "Y", ...
0
votes
0answers
11 views

KeyError: Django Losing Session Data Between CBV Redirects

When I redirect to another view after adding data, specifically stripe Customer data, to a dict that is then added to my session, I lose all of the information in my session at the redirected view. ...
0
votes
0answers
9 views

PyQt4 tutorial or book with up to date content

Firstly, I am aware of the following similar questions that have been asked before on Stackoverflow. However, most of the answers are at least 1 year old (if i am not wrong) and i am wondering if ...
1
vote
3answers
24 views

Extracting parenthesis with a specific format with Python

I am fairly new to python so I apologies if this is quite a novice question, but I am trying to extract text from parentheses that has specific format from a raw text file. I have tried this with ...
0
votes
0answers
11 views

How to get the whole strings with space in jinja2

i use python, jinja2, GAE. I have a python list passed to jinja2. The list looks like ['hi mate', 'hello world"]. But I only can get 'hi', 'hello' from the 'item' {% for item in pyList %} if I ...
-1
votes
1answer
22 views

Python heapq not being pushed in right order?

util.py import heapq class PriorityQueue: def __init__(self): self.heap=[] def push(self,item,priority): pair = (priority,item) heapq.heappush(self.heap,pair) ...
0
votes
0answers
13 views

use F for referencing 2 tables to update python

HI i have a script which use 2 or 3 tables for referencing to update the data in database below is the code getteam = myteam.objects.only("id") # [:2] limits the query to 2 just for testing for ...
0
votes
0answers
6 views

load OSX plist to LaunchDaemons with python subprocess

I'm trying to install an OSX LaunchDaemon using python but calling launchctl using subprocess.Popen doesn't actually install the service. I have the plist file in /Library/LaunchDaemons/ and I can ...
0
votes
0answers
5 views

python job queueing where worker nodes must ssh into controller, not the other way around

There are lots of distributed job queuing libraries for Python (see http://wiki.python.org/moin/ParallelProcessing). All of the ones I've looked at so far seem to share a design model where a ...

1 2 3 4 5 14014
15 30 50 per page