Tagged Questions
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.
0
votes
1answer
4 views
app engine decodes urlencoded string
The client passes an url-encoded string to the server:
GET /setscore?score=15938&level=12&name=%D0%97%D0%B5%D0%B1%D1%80%D0%B0
But the request class seem to decode that for me:
INFO ...
0
votes
0answers
10 views
How to replace text in pygame on key press
I'm quite new to pygame but have a good knowledge of python and have been trying to code a basic rpg style turn based combat game. Everything seems to work except that i can't seem to figure out a way ...
0
votes
0answers
4 views
Ignoring windows hidden files with python glob
I am moving some files with a python script. The script should work on both osx and windows.
I am using the the glob module to select the files. Filter out directories with isfile method from ...
0
votes
0answers
23 views
wrapping html with a python function
I want to be able to wrap a div based on it's id. For example given the following HTML:
<body>
<div id="info">
<div id="a1">
</div>
<div ...
0
votes
0answers
15 views
python csv list by rows instead of columns
I have a script that can take the final redirection url and save it into CSV file.
The script write codes in 1 column for example A1 then A3 then A5
How to make it write the codes by rows for ...
2
votes
2answers
18 views
What are the advantages to using bitwise operations over boolean operations in Python?
I'm having trouble understanding just why I would want to use bitwise operators in a high-level language like Python. From what I have learned of high- vs low-level languages is that high-level ones ...
2
votes
1answer
12 views
how to create an associative array in the query string
I'm using requests lib and python 2.7
When doing this :
import requests
uri_params = {
u'email': u'[email protected]',
u'id_user': 15,
u'user_var': {
u'var1': u'val1',
...
1
vote
1answer
6 views
Python: confuse about run Scrapy from within a Python script
Follow the document, I could run the scrapy from a python script, but I can't get the scrapy result
this is my spider:
from scrapy.spider import BaseSpider
from scrapy.selector import ...
0
votes
0answers
6 views
Shell Script to Capture part of data in Excel sheet
I Need following WAM APPLAUNCH_INITIATED and WAM APP CREATED WINDOW time stamp data in below log file to capture in Excel sheet using Shell Scripting Language
2013-07-09T02:22:18.535639Z [24] ...
1
vote
1answer
39 views
Try to compress Sha1 down in size, maybe a better option to make unique identifier
I have the following three pieces of information. A group name, a group type, and group ranking.
As a quick example
"Mom's cats", "Cats", "Top10"
The example is way off from what I'm doing with ...
0
votes
0answers
11 views
Convert a list of dictionaries to a hierarchy structure
I found my self in the need of some assitance, I'm trying to convert a list of dictionaries (you'll see) in to some sort of tree/hirarchy structure. All i have to work with is there depth-param en the ...
-2
votes
0answers
22 views
What characters need to be escaped for JSON.parse
I notice that you can't save 1B (escape) in json for JSON.parse function you will got SyntaxError: Unexpected token (in google chrome) you need to write it as unicde \u001b. I'm have json_serialize ...
1
vote
2answers
29 views
Pull certain elements out of a 2D python list?
As an easy way to test for the correct way to pull out certain elements of a large tileset, inputted as a 2D list in my program, I put the following into the Python Shell:
->>>test = [ ...
0
votes
0answers
22 views
Synthetic sentence summary [on hold]
I've seen a lot of NLP libraries like libots that are able to create summaries by selecting a body of text's most important sentences. However, I've been unable to find any libraries capable of ...
0
votes
1answer
34 views
how can I stop diff when one file has ended?
I'm comparing 2 files that are different by length but i don't want to see the output of the longer file after the shorter file has ended.
though i do need to know if there are missing lines on either ...