id
string
question_id
int64
chunk_index
int32
embedding_text
string
dense_tokens
int32
sparse_tokens
int32
languages
list
tags
list
payload_json
string
dense
list
sparse_indices
list
sparse_values
list
1ea0da66-4b81-5acf-a084-a97a16cb38aa
337
0
Title: XML Processing in Python I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it. Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons a...
113
120
[ "python" ]
[ "python", "xml" ]
{"accepted_answer_id":342,"answer_count":12,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-02T03:35:55.697000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2021-11-12T18:56:21.143000+00:00","last_edit_date":"2016-12-30T12:56:21.493000+00:00...
[ -0.00861358642578125, 0.0111541748046875, -0.0297393798828125, -0.004634857177734375, 0.0084991455078125, -0.056427001953125, 0.0298614501953125, 0.025970458984375, -0.0072021484375, 0.00885009765625, -0.022308349609375, 0.007022857666015625, -0.01546478271484375, 0.0271453857421875, 0.0...
[ 12, 23, 47, 136, 158, 214, 444, 1305, 1467, 1672, 1884, 3299, 3714, 4034, 4516, 8781, 9433, 12937, 13452, 16981, 17777, 20594, 26950, 33976, 38280, 42459, 45367, 48962, 59376, 63847, 64549, 71062, 78662, 92537, 102158, 106290, 115774, 123996,...
[ 0.004638671875, 0.1171875, 0.001708984375, 0.07373046875, 0.142578125, 0.0986328125, 0.000732421875, 0.0654296875, 0.00927734375, 0.06982421875, 0.06201171875, 0.1884765625, 0.0712890625, 0.09326171875, 0.09375, 0.0888671875, 0.1357421875, 0.09814453125, 0.064453125, 0.11914062...
1747982c-cf50-50e4-b5be-0eef66b4f1fb
469
0
Title: How can I find the full path to a font from its display name on a Mac? I am using the Photoshop's javascript API to find the fonts in a given PSD. Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc. This is all happening in a python ...
108
111
[ "python" ]
[ "python", "macos", "fonts", "photoshop" ]
{"accepted_answer_id":3040,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-02T15:11:16.430000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2022-12-15T07:51:30.287000+00:00","last_edit_date":"2016-12-22T03:53:45.467000+00:00...
[ -0.0018138885498046875, -0.0285491943359375, -0.00420379638671875, -0.005123138427734375, -0.0187225341796875, 0.0007958412170410156, -0.0033473968505859375, 0.0007996559143066406, -0.0196685791015625, 0.00470733642578125, -0.0026950836181640625, 0.007106781005859375, 0.031982421875, -0.00...
[ 7, 10, 47, 70, 87, 98, 450, 756, 831, 1295, 1528, 1542, 3444, 4393, 4727, 7413, 8561, 9351, 11249, 11435, 11782, 11787, 12401, 16487, 17116, 17198, 17368, 32354, 34475, 39605, 42518, 44116, 48962, 50828, 51042, 57767, 60875, 61687, 72761, ...
[ 0.0311279296875, 0.00732421875, 0.1328125, 0.061279296875, 0.05126953125, 0.029541015625, 0.0245361328125, 0.0029296875, 0.08642578125, 0.078125, 0.0869140625, 0.1318359375, 0.06494140625, 0.1572265625, 0.1748046875, 0.171875, 0.13671875, 0.134765625, 0.0693359375, 0.1806640625...
2e7bbed2-eda6-52c4-8e92-b25f3e468a23
502
0
Title: Get a preview JPEG of a PDF on Windows? I have a cross-platform (Python) application which needs to generate a JPEG preview of the first page of a PDF. On the Mac I am spawning sips. Is there something similarly simple I can do on Windows?
59
66
[ "python" ]
[ "python", "windows", "image", "pdf" ]
{"accepted_answer_id":7090,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-02T17:01:58.500000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2024-08-17T16:13:45.803000+00:00","last_edit_date":"2020-06-17T20:47:48.287000+00:00...
[ -0.040191650390625, -0.0338134765625, 0.007358551025390625, -0.01560211181640625, -0.008453369140625, -0.0237579345703125, -0.0136566162109375, 0.0203399658203125, 0.0023784637451171875, -0.004730224609375, 0.0009455680847167969, 0.006206512451171875, 0.04351806640625, -0.03216552734375, ...
[ 10, 47, 53, 54, 78, 98, 111, 434, 479, 592, 831, 2161, 3773, 4727, 5117, 5623, 6423, 6859, 8781, 9191, 9844, 20779, 21373, 22751, 27117, 38415, 41421, 48962, 50828, 139392, 172121, 216281 ]
[ 0.05322265625, 0.02490234375, 0.028564453125, 0.0250244140625, 0.134765625, 0.1044921875, 0.0380859375, 0.04736328125, 0.12890625, 0.040771484375, 0.0164794921875, 0.010009765625, 0.2021484375, 0.1318359375, 0.06884765625, 0.09375, 0.1630859375, 0.216796875, 0.08349609375, 0.15...
39e79c76-e882-5dbe-b252-5183816201b0
535
0
Title: Continuous Integration System for a Python Codebase I am starting to work on a hobby project with a Python codebase and I would like to set up some form of continuous integration (i.e. running a battery of test-cases each time a check-in is made and sending nag e-mails to responsible persons when the tests fail...
144
156
[ "python" ]
[ "python", "continuous-integration", "extreme-programming" ]
{"accepted_answer_id":541,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":"2025-10-15T00:11:55.037000+00:00","creation_date":"2008-08-02T18:43:54.787000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2018-05-14T17:46:14.650000+00:00","last_edit_date":"2018...
[ 0.0162200927734375, -0.0037593841552734375, -0.027496337890625, -0.0043487548828125, -0.0033931732177734375, -0.0184478759765625, 0.00928497314453125, 0.031951904296875, 0.01727294921875, 0.0009398460388183594, -0.02056884765625, 0.005405426025390625, 0.036895751953125, 0.0279693603515625,...
[ 28, 73, 100, 223, 310, 678, 1257, 1733, 1884, 2065, 2684, 2806, 3034, 3173, 3229, 3445, 4197, 4488, 5423, 5426, 5701, 5809, 6226, 7228, 9803, 10723, 10821, 11389, 11399, 11675, 12353, 12638, 12765, 13452, 18151, 19283, 19336, 21373, 27650, ...
[ 0.0169677734375, 0.1259765625, 0.0673828125, 0.1171875, 0.09326171875, 0.002197265625, 0.03515625, 0.056396484375, 0.07568359375, 0.130859375, 0.01220703125, 0.004150390625, 0.1845703125, 0.1123046875, 0.01611328125, 0.0625, 0.111328125, 0.0751953125, 0.083984375, 0.17578125, ...
f54dc076-4522-5bce-b9b2-9f73b1ebcdbe
594
0
Title: cx_Oracle: How do I iterate over a result set? There are several ways to iterate over a result set. What are the tradeoff of each?
36
43
[ "python", "sql" ]
[ "python", "sql", "database", "oracle-database", "cx-oracle" ]
{"accepted_answer_id":595,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-03T01:15:08.507000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python","sql"],"last_activity_date":"2016-10-15T20:47:11.027000+00:00","last_edit_date":"2016-10-14T18:15:27.420000+...
[ -0.00896453857421875, -0.0204315185546875, 0.003696441650390625, -0.01448822021484375, 0.004039764404296875, -0.041351318359375, 0.00412750244140625, 0.017578125, 0.01995849609375, 0.00801849365234375, -0.0216217041015625, 0.0092620849609375, 0.01027679443359375, 0.01235198974609375, 0.0...
[ 10, 17, 47, 54, 67, 70, 87, 219, 425, 645, 670, 5423, 8560, 11030, 11249, 12638, 16713, 16750, 40368, 48322, 48962, 52350 ]
[ 0.0211181640625, 0.08984375, 0.0546875, 0.048583984375, 0.1328125, 0.005615234375, 0.061767578125, 0.0595703125, 0.1083984375, 0.1982421875, 0.04296875, 0.21484375, 0.28125, 0.1142578125, 0.10205078125, 0.035400390625, 0.1865234375, 0.2109375, 0.10546875, 0.1396484375, 0.0179...
2a31fffa-ff98-5db6-80fb-974bc3000629
683
0
Title: Using 'in' to match an attribute of Python objects in an array I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like, foo in iter_attr(array of python objects, attribute name) I've looked over the docs but this kind of thing doesn't fall unde...
77
92
[ "python" ]
[ "python", "arrays", "iteration" ]
{"accepted_answer_id":57833,"answer_count":8,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-03T13:19:16.983000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2011-11-24T09:57:27.813000+00:00","last_edit_date":"2008-08-23T16:11:59.307000+00:0...
[ 0.0205230712890625, 0.00595855712890625, -0.0185546875, 0.013641357421875, 0.0168304443359375, -0.0380859375, 0.00885009765625, -0.013702392578125, -0.01020050048828125, -0.02789306640625, -0.004207611083984375, 0.022491455078125, 0.01253509521484375, 0.0023193359375, 0.023712158203125, ...
[ 13, 17, 23, 31, 42, 47, 53, 54, 73, 111, 214, 345, 720, 1314, 1379, 1884, 5775, 6817, 6953, 8562, 9351, 10298, 10336, 13580, 14858, 17198, 19305, 27639, 32354, 36746, 37629, 48869, 48962, 50828, 107003, 145581, 145870, 150380, 162520, 189...
[ 0.0810546875, 0.0927734375, 0.23046875, 0.189453125, 0.1201171875, 0.002685546875, 0.1083984375, 0.030029296875, 0.275390625, 0.05810546875, 0.01318359375, 0.05517578125, 0.25390625, 0.0269775390625, 0.052001953125, 0.03857421875, 0.205078125, 0.04296875, 0.021728515625, 0.0336...
e22bec48-4f0c-5293-9ae0-2060976afc2e
742
0
Title: Class views in Django Django view points to a function, which can be a problem if you want to change only a bit of functionality. Yes, I could have million keyword arguments and even more if statements in the function, but I was thinking more of an object oriented approach. For example, I have a page that dis...
135
139
[ "python" ]
[ "python", "django", "view", "oop" ]
{"accepted_answer_id":33957,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-03T15:55:28.633000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2014-10-08T05:53:09.677000+00:00","last_edit_date":"2008-09-11T20:14:02.330000+00:0...
[ -0.0113983154296875, 0.015960693359375, -0.0199127197265625, -0.00827789306640625, 0.0169219970703125, -0.0187225341796875, 0.0149993896484375, 0.03863525390625, 0.005157470703125, -0.01116180419921875, -0.0035552978515625, 0.00839996337890625, -0.0000768899917602539, 0.01361846923828125, ...
[ 10, 23, 47, 297, 765, 831, 1286, 2053, 2174, 2806, 2967, 3299, 3444, 3917, 4527, 4734, 4785, 5809, 6275, 6528, 6561, 9191, 10750, 10760, 15549, 15700, 16912, 18507, 19879, 21115, 21373, 21455, 23509, 26847, 27803, 32354, 32635, 35014, 35672...
[ 0.0220947265625, 0.0223388671875, 0.1123046875, 0.00390625, 0.0283203125, 0.0184326171875, 0.048095703125, 0.050048828125, 0.09326171875, 0.001953125, 0.1240234375, 0.158203125, 0.0390625, 0.083984375, 0.0166015625, 0.01318359375, 0.09423828125, 0.056396484375, 0.19140625, 0.06...
89b25954-cdef-5092-966d-c6b341320a82
766
0
Title: Python and MySQL I can get Python to work with Postgresql but I cannot get it to work with MySQL. The main problem is that on the shared hosting account I have I do not have the ability to install things such as Django or PySQL, I generally fail when installing them on my computer so maybe it's good I can't ins...
121
128
[ "python" ]
[ "python", "mysql", "postgresql", "bpgsql" ]
{"accepted_answer_id":1619,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-03T17:44:07.450000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2019-10-12T05:19:46.087000+00:00","last_edit_date":"2012-05-31T16:57:58.230000+00:00...
[ -0.0214996337890625, -0.01110076904296875, -0.018096923828125, -0.028778076171875, 0.0279541015625, -0.02032470703125, 0.0176239013671875, 0.0236053466796875, -0.017852783203125, -0.0169219970703125, -0.0260772705078125, 0.0237274169921875, 0.00522613525390625, 0.01145172119140625, 0.003...
[ 47, 98, 100, 136, 442, 678, 707, 765, 831, 903, 959, 1284, 1884, 2046, 2795, 2967, 3714, 4127, 4488, 5201, 6183, 6713, 8966, 9405, 9844, 11001, 11435, 11782, 12301, 13909, 14037, 15426, 17562, 20600, 27512, 27803, 27980, 32354, 35782, 378...
[ 0.03759765625, 0.00537109375, 0.033935546875, 0.0869140625, 0.0068359375, 0.123046875, 0.010498046875, 0.0322265625, 0.040771484375, 0.02880859375, 0.07177734375, 0.031494140625, 0.03857421875, 0.08984375, 0.072265625, 0.09765625, 0.045654296875, 0.07763671875, 0.11328125, 0.02...
15367acb-289e-5580-88f8-635d01314422
773
0
Title: How do I use itertools.groupby()? I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this: Take a list - in this case, the children of an objectified lxml element Divide it into groups based on some criteria The...
138
167
[ "python" ]
[ "python", "python-itertools" ]
{"accepted_answer_id":7286,"answer_count":16,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-03T18:27:09.687000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2024-09-26T05:05:55.680000+00:00","last_edit_date":"2020-07-29T19:19:49.903000+00:0...
[ 0.0154266357421875, 0.004627227783203125, -0.0210418701171875, -0.006259918212890625, 0.0087127685546875, -0.0275726318359375, 0.0225067138671875, -0.0154266357421875, 0.01390838623046875, 0.004474639892578125, 0.01113128662109375, 0.0187530517578125, -0.00882720947265625, -0.01318359375, ...
[ 5, 7, 17, 47, 54, 67, 87, 96, 107, 111, 112, 132, 645, 720, 903, 1272, 3060, 3181, 3642, 3934, 4127, 4527, 4692, 5303, 5608, 8560, 11249, 12830, 14432, 16454, 17368, 20020, 20653, 28219, 31577, 32354, 35509, 36746, 41097, 46673, 47314, ...
[ 0.001708984375, 0.107421875, 0.0634765625, 0.01220703125, 0.044677734375, 0.052734375, 0.059326171875, 0.053466796875, 0.006103515625, 0.036376953125, 0.0810546875, 0.1103515625, 0.087890625, 0.1865234375, 0.061279296875, 0.2373046875, 0.0126953125, 0.0810546875, 0.06884765625, ...
c7c65d81-fc56-59fd-8991-9873612ec624
972
0
Title: Adding a method to an existing object instance in Python How do I add a method to an existing object (i.e., not in the class definition) in Python? I understand that it's not generally considered good practice to do so, except in some cases.
58
60
[ "python" ]
[ "python", "oop", "methods", "monkeypatching" ]
{"accepted_answer_id":2982,"answer_count":19,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-04T02:17:51.780000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-06-18T04:10:31.397000+00:00","last_edit_date":"2023-06-18T04:10:31.397000+00:0...
[ 0.00418853759765625, 0.022186279296875, -0.01309967041015625, -0.00156402587890625, 0.00861358642578125, -0.0391845703125, -0.00516510009765625, 0.018524169921875, -0.005634307861328125, 0.007259368896484375, -0.0008263587951660156, 0.0157012939453125, 0.0164031982421875, -0.01889038085937...
[ 10, 23, 47, 54, 62, 87, 142, 221, 959, 4127, 11249, 15190, 18507, 28219, 36746, 40494, 41361, 48962, 50218, 55300, 59725, 80934, 90698, 110527, 137567, 144573, 145581 ]
[ 0.126953125, 0.08984375, 0.181640625, 0.09375, 0.140625, 0.1025390625, 0.03369140625, 0.000732421875, 0.1640625, 0.080078125, 0.005126953125, 0.2236328125, 0.1728515625, 0.034912109375, 0.2236328125, 0.0126953125, 0.16015625, 0.037841796875, 0.0206298828125, 0.296875, 0.16503...
fdcef97e-47cf-5e0a-bf22-09c790157409
1,171
0
Title: What is the most efficient graph data structure in Python? I need to be able to manipulate a large (10^7 nodes) graph in python. The data corresponding to each node/edge is minimal, say, a small number of strings. What is the most efficient, in terms of memory and speed, way of doing this? A dict of dicts is...
280
315
[ "python" ]
[ "python", "performance", "data-structures", "graph-theory" ]
{"accepted_answer_id":28705,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":"2016-01-20T02:53:03.077000+00:00","creation_date":"2008-08-04T12:00:57.297000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2017-03-22T17:42:28.463000+00:00","last_edit_date":"20...
[ 0.02813720703125, 0.0245208740234375, -0.0478515625, -0.00955963134765625, 0.003246307373046875, -0.0108795166015625, -0.0189971923828125, -0.0246429443359375, 0.042083740234375, 0.0015707015991210938, -0.0247650146484375, -0.004657745361328125, -0.002780914306640625, -0.000762462615966796...
[ 7, 23, 56, 67, 70, 83, 110, 111, 112, 297, 429, 645, 756, 939, 966, 988, 1264, 1286, 1375, 1733, 2053, 2684, 2831, 2967, 3871, 3917, 4271, 4785, 4865, 5303, 5608, 5701, 8781, 12638, 13695, 15094, 16981, 17198, 17203, 17514, 18507, 185...
[ 0.1220703125, 0.042724609375, 0.056884765625, 0.030029296875, 0.043701171875, 0.008056640625, 0.1328125, 0.1669921875, 0.08642578125, 0.046630859375, 0.080078125, 0.05078125, 0.00439453125, 0.0634765625, 0.0986328125, 0.1298828125, 0.08349609375, 0.05810546875, 0.064453125, 0.0...
dde2a3ef-2c33-5be7-a88b-b2bc695cd495
1,476
0
Title: How do you express binary literals in Python? How do you express an integer as a binary number with Python literals? I was easily able to find the answer for hex: >>> 0x12AF 4783 >>> 0x100 256 and octal: >>> 01267 695 >>> 0100 64 How do you use literals to express binary in Python? Summary of Answe...
263
205
[ "python" ]
[ "python", "syntax", "binary", "integer", "literals" ]
{"accepted_answer_id":13107,"answer_count":8,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-04T18:20:36.487000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2020-11-29T04:40:27.877000+00:00","last_edit_date":"2017-03-13T13:47:17.753000+00:0...
[ 0.0107574462890625, -0.0210418701171875, -0.0224609375, -0.0338134765625, 0.017486572265625, -0.037353515625, -0.0309600830078125, 0.004608154296875, -0.01276397705078125, 0.0069427490234375, -0.0219879150390625, 0.01678466796875, 0.0281219482421875, 0.0051422119140625, 0.034515380859375...
[ 10, 18, 23, 31, 47, 54, 110, 136, 141, 180, 201, 237, 275, 289, 398, 425, 571, 670, 678, 757, 764, 831, 892, 959, 963, 966, 1505, 1530, 1662, 1884, 2394, 3413, 3559, 3768, 3917, 4046, 4527, 6002, 6635, 7413, 7911, 8080, 10461, 112...
[ 0.019775390625, 0.083984375, 0.099609375, 0.05224609375, 0.0322265625, 0.0703125, 0.01318359375, 0.03955078125, 0.146484375, 0.1650390625, 0.060546875, 0.1142578125, 0.0272216796875, 0.15625, 0.04248046875, 0.1328125, 0.001953125, 0.05859375, 0.095703125, 0.0908203125, 0.1464...
7b740c20-a6bb-532a-bb82-dd69479b8740
1,734
0
Title: Any experiences with Protocol Buffers? I was just looking through some information about Google's protocol buffers data interchange format. Has anyone played around with the code or even created a project around it? I'm currently using XML in a Python project for structured content created by hand in a text e...
113
123
[ "python" ]
[ "python", "xml", "database", "protocol-buffers" ]
{"accepted_answer_id":1780,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T00:12:55.290000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2013-02-02T14:04:50.913000+00:00","last_edit_date":"2013-02-02T14:04:50.913000+00:00...
[ -0.016693115234375, 0.01371002197265625, -0.0152587890625, 0.0126953125, 0.031219482421875, -0.040771484375, -0.016571044921875, 0.026458740234375, 0.0259857177734375, 0.029083251953125, -0.0256195068359375, 0.0268096923828125, 0.03216552734375, 0.0043792724609375, 0.026336669921875, -...
[ 7, 23, 98, 136, 221, 237, 373, 581, 667, 678, 939, 1284, 1815, 1940, 2053, 2685, 3535, 4537, 4677, 5941, 7986, 8305, 9384, 9433, 10932, 10941, 12663, 13452, 16487, 17368, 18151, 18234, 20625, 20653, 28541, 30391, 33153, 35672, 38352, 3893...
[ 0.142578125, 0.008544921875, 0.028564453125, 0.0419921875, 0.0281982421875, 0.05517578125, 0.15234375, 0.02685546875, 0.1689453125, 0.1259765625, 0.03466796875, 0.025390625, 0.1982421875, 0.0791015625, 0.1220703125, 0.08203125, 0.125, 0.0869140625, 0.035400390625, 0.04077148437...
a09b7c60-13c4-59fe-bf0d-bc0cd0f57fdf
1,829
0
Title: How do I make a menu that does not require the user to press [enter] to make a selection? I've got a menu in Python. That part was easy. I'm using raw_input() to get the selection from the user. The problem is that raw_input (and input) require the user to press Enter after they make a selection. Is there an...
191
211
[ "python" ]
[ "python" ]
{"accepted_answer_id":1852,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T02:39:23.140000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2015-03-01T17:34:42.907000+00:00","last_edit_date":"2015-03-01T17:34:42.907000+00:00...
[ 0.0021648406982421875, -0.0248870849609375, -0.033416748046875, -0.0028400421142578125, -0.0012922286987304688, -0.078369140625, 0.0118408203125, 0.004718780517578125, 0.037506103515625, 0.01214599609375, -0.0191192626953125, 0.0404052734375, 0.034149169921875, 0.0151519775390625, 0.0132...
[ 10, 13, 23, 31, 34, 47, 54, 73, 87, 88, 107, 132, 246, 304, 350, 450, 454, 954, 959, 1299, 1528, 2046, 2060, 2472, 2806, 2967, 3249, 3253, 3584, 3917, 4163, 4568, 4879, 4958, 6639, 6782, 7077, 7103, 8026, 9248, 9572, 11249, 12765, ...
[ 0.03173828125, 0.0194091796875, 0.0537109375, 0.1083984375, 0.1552734375, 0.004638671875, 0.021728515625, 0.1162109375, 0.0174560546875, 0.004150390625, 0.01904296875, 0.051513671875, 0.0537109375, 0.0159912109375, 0.1201171875, 0.0654296875, 0.03955078125, 0.0732421875, 0.119140...
c916a8de-e8ab-561f-835e-c75306da1771
1,854
0
Title: How to identify which OS Python is running on What do I need to look at to see whether I'm on Windows or Unix, etc.?
34
35
[ "python" ]
[ "python", "operating-system", "cross-platform", "platform-agnostic" ]
{"accepted_answer_id":1857,"answer_count":28,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T03:23:18.917000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2024-04-19T15:30:47.437000+00:00","last_edit_date":"2023-03-25T14:52:36.177000+00:0...
[ -0.017364501953125, -0.0306854248046875, -0.0273590087890625, -0.017242431640625, 0.01010894775390625, -0.02783203125, -0.00969696044921875, 0.00011986494064331055, -0.0040435791015625, -0.0224761962890625, -0.03021240234375, 0.01374053955078125, 0.04901123046875, 0.0123748779296875, 0.0...
[ 39, 47, 83, 87, 98, 99, 707, 992, 1957, 3129, 3773, 3871, 4084, 6713, 11249, 11787, 36766, 51042, 135812, 145581 ]
[ 0.07080078125, 0.046875, 0.01171875, 0.012939453125, 0.109375, 0.01416015625, 0.06640625, 0.1298828125, 0.076171875, 0.045654296875, 0.193359375, 0.0263671875, 0.1474609375, 0.078125, 0.008544921875, 0.193359375, 0.06884765625, 0.07421875, 0.1435546875, 0.263671875 ]
a7d1ea9d-e0d6-5dfa-b36f-c461c1ed9c98
1,983
0
Title: Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably. When should I use one or the other, and why?
79
69
[ "python" ]
[ "python", "list", "tuples" ]
{"accepted_answer_id":2277,"answer_count":18,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T07:18:55.853000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2021-10-08T16:48:07.107000+00:00","last_edit_date":"2019-05-02T20:34:39.577000+00:0...
[ 0.0204315185546875, 0.00487518310546875, -0.035491943359375, 0.00811004638671875, 0.0272064208984375, -0.025909423828125, -0.000021219253540039062, -0.004787445068359375, 0.015411376953125, 0.0171661376953125, -0.014007568359375, 0.024871826171875, -0.0007295608520507812, -0.00408554077148...
[ 4, 11, 16, 70, 136, 186, 268, 370, 707, 831, 1632, 1940, 2367, 2858, 3229, 3789, 4527, 5303, 5608, 5941, 8705, 11814, 12638, 14847, 15400, 17721, 44677, 48962, 60212, 68252, 78458, 145581, 152028, 155761 ]
[ 0.033203125, 0.03564453125, 0.00390625, 0.05078125, 0.10205078125, 0.028076171875, 0.10498046875, 0.14453125, 0.0294189453125, 0.0869140625, 0.068359375, 0.1083984375, 0.002197265625, 0.10009765625, 0.07421875, 0.07373046875, 0.1083984375, 0.2392578125, 0.0625, 0.072265625, 0...
250f2845-8d59-5196-93cb-fbde50049a97
2,311
0
Title: File size differences after copying a file to a server vía FTP I have created a PHP-script to update a web server that is live inside a local directory. I'm migrating the script into Python. It works fine for the most part, but after a PUT command, the size of the file appears to change. Thus, the size of the f...
300
355
[ "php", "python" ]
[ "php", "python", "ftp", "webserver", "ftplib" ]
{"accepted_answer_id":2316,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T13:40:47.470000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["php","python"],"last_activity_date":"2020-07-11T07:06:47.050000+00:00","last_edit_date":"2019-06-04T09:28:15.763000...
[ -0.015472412109375, -0.049041748046875, -0.01303863525390625, 0.00690460205078125, 0.020599365234375, -0.03167724609375, 0.002277374267578125, -0.0102386474609375, -0.01035308837890625, -0.01279449462890625, -0.0022029876708984375, -0.004940032958984375, 0.0269012451171875, -0.056915283203...
[ 7, 10, 47, 56, 64, 70, 87, 214, 254, 450, 1176, 1238, 1295, 1467, 2480, 3181, 3931, 3934, 4000, 4439, 4734, 4778, 5612, 5701, 5885, 6867, 6954, 7001, 7026, 7077, 7103, 7332, 8520, 8668, 9790, 9803, 10723, 10869, 11435, 12921, 13267, 1...
[ 0.0810546875, 0.00146484375, 0.0654296875, 0.1123046875, 0.1142578125, 0.019287109375, 0.004150390625, 0.01708984375, 0.15234375, 0.0185546875, 0.039794921875, 0.027099609375, 0.0673828125, 0.056884765625, 0.1640625, 0.052001953125, 0.018310546875, 0.0986328125, 0.095703125, 0....
f7e68191-20aa-5e31-a50b-0ce35709d580
2,933
0
Title: Create a directly-executable cross-platform GUI app using Python Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux. The problem being I have no idea where to start or how to wr...
88
95
[ "python" ]
[ "python", "user-interface", "deployment", "tkinter", "release-management" ]
{"accepted_answer_id":2937,"answer_count":14,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-05T22:26:00.797000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-11-28T08:57:45.557000+00:00","last_edit_date":"2020-10-11T06:50:09.827000+00:0...
[ 0.0196075439453125, 0.0039043426513671875, -0.025604248046875, 0.01096343994140625, 0.01824951171875, -0.047027587890625, 0.0027561187744140625, 0.003520965576171875, 0.0038890838623046875, -0.0290374755859375, -0.025238037109375, 0.01922607421875, 0.0309906005859375, -0.01898193359375, ...
[ 4, 10, 47, 98, 100, 110, 136, 142, 163, 442, 678, 765, 831, 903, 1010, 1340, 1467, 2886, 2967, 3060, 3642, 3773, 3917, 3934, 4027, 4034, 4727, 6275, 6528, 7108, 7440, 8035, 9969, 11814, 13651, 17368, 22729, 22819, 22936, 29908, 33022, ...
[ 0.012451171875, 0.0517578125, 0.01318359375, 0.0732421875, 0.0966796875, 0.05712890625, 0.03955078125, 0.007568359375, 0.0126953125, 0.1005859375, 0.1494140625, 0.02197265625, 0.03076171875, 0.005126953125, 0.1318359375, 0.13671875, 0.05615234375, 0.1669921875, 0.1162109375, 0....
50985981-a73b-5a54-b059-0ada230cb315
3,061
0
Title: Calling a function of a module by using its name (a string) How do I call a function, using a string with the function's name? For example: import foo func_name = "bar" call(foo, func_name) # calls foo.bar()
59
69
[ "python" ]
[ "python", "object", "reflection" ]
{"accepted_answer_id":3071,"answer_count":19,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-06T03:36:08.627000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2024-08-23T17:41:09.733000+00:00","last_edit_date":"2022-06-04T21:43:08.880000+00:0...
[ -0.003467559814453125, 0.005420684814453125, -0.016265869140625, -0.01367950439453125, 0.022186279296875, -0.044891357421875, 0.004192352294921875, 0.02484130859375, -0.03302001953125, 0.007091522216796875, -0.00888824462890625, -0.00047278404235839844, -0.004978179931640625, -0.0092010498...
[ 10, 11, 16, 31, 54, 87, 111, 132, 214, 238, 390, 678, 1299, 2203, 3584, 5775, 6863, 7477, 9351, 11249, 11627, 11782, 17368, 24927, 26265, 27781, 32354, 48962, 79315, 88996 ]
[ 0.02490234375, 0.008056640625, 0.014892578125, 0.1435546875, 0.0281982421875, 0.052978515625, 0.0291748046875, 0.009765625, 0.05810546875, 0.053955078125, 0.0181884765625, 0.123046875, 0.1767578125, 0.00634765625, 0.119140625, 0.1513671875, 0.0908203125, 0.193359375, 0.2080078125...
5382b1b6-42d1-5125-b938-9086520ee2d8
3,088
0
Title: Best ways to teach a beginner to program? Original Question I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organ...
442
467
[ "python" ]
[ "python", "language-agnostic" ]
{"accepted_answer_id":null,"answer_count":86,"chunk_count":1,"chunk_index":0,"closed_date":"2011-09-14T17:54:00.613000+00:00","creation_date":"2008-08-06T05:01:16.677000+00:00","has_accepted_answer":false,"is_closed":true,"languages":["python"],"last_activity_date":"2012-08-04T01:54:34.093000+00:00","last_edit_date":"2...
[ 0.004276275634765625, 0.01300048828125, -0.01898193359375, -0.022369384765625, 0.0289306640625, -0.032806396484375, -0.01218414306640625, 0.01593017578125, 0.0068511962890625, -0.0069122314453125, -0.06280517578125, 0.03656005859375, 0.01113128662109375, 0.0258941650390625, 0.01557922363...
[ 10, 28, 32, 47, 54, 56, 71, 83, 100, 116, 136, 138, 180, 214, 248, 570, 603, 642, 678, 717, 759, 764, 765, 803, 831, 873, 944, 1141, 1193, 1284, 1305, 1326, 1528, 1529, 1614, 1679, 1760, 2446, 2489, 2499, 2809, 2823, 2947, 3060, ...
[ 0.052978515625, 0.00732421875, 0.0191650390625, 0.1123046875, 0.037109375, 0.1279296875, 0.009765625, 0.0380859375, 0.0771484375, 0.00244140625, 0.05078125, 0.03173828125, 0.01025390625, 0.045654296875, 0.010986328125, 0.035888671875, 0.1103515625, 0.03515625, 0.052734375, 0.03...
36c07639-2e25-5f3a-bed1-98fc0655b7c9
3,976
0
Title: Programmatically talking to a Serial Port in OS X or Linux I have a Prolite LED sign that I like to set up to show scrolling search queries from a apache logs and other fun statistics. The problem is, my G5 does not have a serial port, so I have to use a usb to serial dongle. It shows up as /dev/cu.usbserial an...
397
433
[ "python" ]
[ "python", "linux", "macos", "serial-port" ]
{"accepted_answer_id":null,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-06T21:00:01.217000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2015-11-15T13:15:20.733000+00:00","last_edit_date":"2012-08-20T20:18:10.340000+00:0...
[ -0.0203094482421875, -0.004810333251953125, -0.015899658203125, -0.018157958984375, -0.018524169921875, -0.03680419921875, 0.009979248046875, -0.004779815673828125, 0.03106689453125, 0.0036449432373046875, -0.0176849365234375, 0.018646240234375, 0.00612640380859375, -0.01380157470703125, ...
[ 41, 47, 110, 111, 166, 184, 186, 223, 246, 257, 275, 420, 483, 510, 520, 527, 758, 765, 872, 959, 1002, 1010, 1019, 1081, 1193, 1224, 1250, 1430, 1733, 1821, 1846, 1884, 1926, 2241, 2301, 2837, 2967, 3089, 3668, 3871, 4034, 4063, 42...
[ 0.031005859375, 0.1611328125, 0.015625, 0.011962890625, 0.0791015625, 0.0888671875, 0.00048828125, 0.053955078125, 0.018310546875, 0.0732421875, 0.08203125, 0.06298828125, 0.033203125, 0.005126953125, 0.171875, 0.0888671875, 0.1767578125, 0.052490234375, 0.0615234375, 0.0805664...
a8e11896-f45d-5823-960c-6c536b191a67
4,942
0
Title: How to sell Python to a client/boss/person When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it?
50
53
[ "php", "python", "ruby" ]
[ "php", "python", "ruby-on-rails", "ruby" ]
{"accepted_answer_id":4978,"answer_count":8,"chunk_count":1,"chunk_index":0,"closed_date":"2017-04-20T02:56:16.843000+00:00","creation_date":"2008-08-07T16:43:21.937000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["php","python","ruby"],"last_activity_date":"2017-01-27T11:22:24.910000+00:00","last_ed...
[ -0.00988006591796875, -0.0160980224609375, -0.028289794921875, 0.005031585693359375, 0.0207061767578125, -0.04522705078125, 0.005859375, 0.0151519775390625, -0.00751495361328125, -0.00508880615234375, -0.049224853515625, 0.019287109375, 0.0297088623046875, 0.0239105224609375, 0.016571044...
[ 10, 23, 47, 54, 442, 645, 707, 831, 1511, 5201, 5426, 11249, 16091, 23282, 26458, 28282, 30816, 37170, 41392, 47302, 48962, 64209, 66139, 73342, 74703, 143907, 145581, 158189 ]
[ 0.010986328125, 0.058837890625, 0.10205078125, 0.0361328125, 0.013671875, 0.08984375, 0.048583984375, 0.03271484375, 0.1416015625, 0.072265625, 0.2041015625, 0.0615234375, 0.08642578125, 0.1435546875, 0.0771484375, 0.1650390625, 0.06103515625, 0.0693359375, 0.1396484375, 0.2207...
df81ea1e-d44a-5ab7-b6c4-107207cf943b
5,102
0
Title: How do you set up Python scripts to work in Apache 2.0? I tried to follow a couple of googled up tutorials on setting up mod_python, but failed every time. Do you have a good, step-by step, rock-solid howto? My dev box is OS X, production - Centos.
70
73
[ "python" ]
[ "python", "apache", "apache2" ]
{"accepted_answer_id":null,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-07T18:24:12.013000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2014-11-13T09:00:56.957000+00:00","last_edit_date":"2012-07-24T18:15:03.187000+00:0...
[ -0.0297393798828125, -0.007289886474609375, -0.0318603515625, -0.0193634033203125, 0.005725860595703125, -0.050750732421875, 0.00009310245513916016, 0.0246734619140625, 0.0010547637939453125, -0.01546478271484375, -0.022430419921875, 0.0264434814453125, 0.0462646484375, 0.027740478515625, ...
[ 7, 23, 47, 54, 111, 188, 232, 398, 1193, 1257, 1272, 1430, 1733, 2811, 3642, 4127, 4488, 5423, 6493, 9795, 11249, 11787, 11907, 16530, 16655, 24941, 26484, 26499, 28960, 29954, 33245, 36049, 37842, 48962, 50828, 53550, 57143, 81366, 97281, ...
[ 0.058349609375, 0.0247802734375, 0.059326171875, 0.04833984375, 0.00927734375, 0.12109375, 0.166015625, 0.0262451171875, 0.103515625, 0.1533203125, 0.008544921875, 0.1630859375, 0.03125, 0.2236328125, 0.04931640625, 0.0142822265625, 0.123046875, 0.154296875, 0.1328125, 0.157226...
60b3095a-adf5-5af5-b46d-41c346fc4985
5,136
0
Title: Creating a shared library in MATLAB A researcher has created a small simulation in MATLAB and we want to make it accessible to others. My plan is to take the simulation, clean up a few things and turn it into a set of functions. Then I plan to compile it into a C library and use SWIG to create a Python wrapper....
120
133
[ "c", "matlab", "python" ]
[ "python", "c", "matlab" ]
{"accepted_answer_id":5302,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-07T18:47:58.487000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["c","matlab","python"],"last_activity_date":"2023-01-23T18:01:53.553000+00:00","last_edit_date":"2022-06-27T20:20:20...
[ 0.01096343994140625, 0.00598907470703125, -0.01096343994140625, 0.019287109375, 0.021087646484375, -0.01503753662109375, 0.00691986083984375, 0.005092620849609375, -0.00826263427734375, -0.00524139404296875, -0.0172576904296875, 0.027191162109375, 0.0119171142578125, -0.00362396240234375, ...
[ 23, 47, 56, 83, 313, 1264, 1294, 1295, 1340, 1363, 1774, 1916, 3095, 3249, 3444, 3934, 4527, 5423, 5608, 5646, 7108, 8966, 9969, 10846, 11782, 13380, 15504, 15673, 19048, 19336, 19713, 25188, 27060, 27803, 28282, 31343, 32354, 35773, 38415,...
[ 0.012451171875, 0.07958984375, 0.054443359375, 0.007080078125, 0.087890625, 0.162109375, 0.150390625, 0.05029296875, 0.099609375, 0.115234375, 0.1611328125, 0.0303955078125, 0.0260009765625, 0.056884765625, 0.053955078125, 0.0634765625, 0.031494140625, 0.0341796875, 0.01586914062...
3c837932-d6e0-537e-af27-53f6764bbad0
5,415
0
Title: Convert Bytes to Floating Point Numbers? I have a binary file that I have to parse and I'm using Python. Is there a way to take 4 bytes and convert it to a single precision floating point number?
47
56
[ "python" ]
[ "python", "floating-point" ]
{"accepted_answer_id":73281,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-07T22:24:27.740000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-04-13T18:22:37.073000+00:00","last_edit_date":"2020-06-27T15:49:23.990000+00:0...
[ 0.017333984375, -0.0109100341796875, -0.013092041015625, -0.00896453857421875, -0.00849151611328125, -0.00801849365234375, 0.003772735595703125, -0.0014448165893554688, -0.0179290771484375, -0.01073455810546875, -0.00860595703125, 0.0187530517578125, 0.01102447509765625, -0.051177978515625...
[ 7, 10, 32, 47, 136, 184, 201, 366, 390, 765, 1636, 1657, 1830, 2394, 2685, 3311, 3917, 5646, 6275, 6635, 11001, 11435, 11549, 14012, 17368, 21917, 22619, 26518, 38699, 41097, 48962, 96760, 103332, 145581 ]
[ 0.0263671875, 0.02685546875, 0.0220947265625, 0.119140625, 0.02099609375, 0.1103515625, 0.1572265625, 0.11328125, 0.1435546875, 0.06787109375, 0.1728515625, 0.0751953125, 0.1142578125, 0.1318359375, 0.0186767578125, 0.166015625, 0.10546875, 0.1005859375, 0.15234375, 0.138671875...
49fe219e-3ed7-5677-b04b-3e34359ec204
5,419
0
Title: Python, Unicode, and the Windows console When I try to print a string in a Windows console, sometimes I get an error that says UnicodeEncodeError: 'charmap' codec can't encode character ..... I assume this is because the Windows console cannot handle all Unicode characters. How can I work around this? For exa...
90
96
[ "python" ]
[ "python", "unicode" ]
{"accepted_answer_id":5430,"answer_count":16,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-07T22:26:58.063000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2024-10-08T06:43:30.363000+00:00","last_edit_date":"2023-03-16T01:52:27.720000+00:0...
[ 0.01195526123046875, -0.040740966796875, -0.01361846923828125, -0.003818511962890625, 0.028411865234375, -0.038116455078125, 0.0011911392211914062, 0.018951416015625, 0.01373291015625, 0.0223846435546875, -0.0152740478515625, 0.012847900390625, -0.0022945404052734375, -0.004764556884765625...
[ 18, 22, 23, 70, 238, 674, 705, 756, 831, 1528, 3773, 4488, 7768, 9254, 9790, 10932, 18151, 18468, 18499, 28412, 31611, 34831, 35782, 40899, 41591, 44116, 53418, 62346, 62816, 64457, 68018, 79315, 91995, 124850, 130250, 145581, 219778 ]
[ 0.0849609375, 0.1220703125, 0.025390625, 0.020751953125, 0.0908203125, 0.02294921875, 0.04052734375, 0.040283203125, 0.08056640625, 0.1279296875, 0.181640625, 0.05322265625, 0.0869140625, 0.1416015625, 0.0595703125, 0.10107421875, 0.1650390625, 0.099609375, 0.1630859375, 0.1562...
b33a55b6-9171-5cf8-98ab-f4f40d55d0cf
5,909
0
Title: Get size of a file before downloading in Python I'm downloading an entire directory from a web server. It works OK, but I can't figure how to get the file size before download to compare if it was updated on the server or not. Can this be done as if I was downloading the file from a FTP server? import urllib ...
328
358
[ "python" ]
[ "python", "urllib" ]
{"accepted_answer_id":5985,"answer_count":12,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-08T13:35:19.970000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2022-11-28T01:16:33.860000+00:00","last_edit_date":"2013-07-06T01:43:48.180000+00:0...
[ -0.0160369873046875, -0.02935791015625, -0.0304107666015625, -0.016265869140625, -0.0072479248046875, -0.030181884765625, 0.00919342041015625, -0.0080718994140625, -0.014617919921875, -0.0246429443359375, -0.016510009765625, -0.0175628662109375, 0.04669189453125, -0.03936767578125, -0.02...
[ 23, 47, 53, 64, 70, 111, 214, 237, 277, 434, 456, 509, 707, 787, 831, 959, 1238, 1284, 1295, 1467, 1650, 2046, 2203, 3501, 3642, 4000, 4015, 4171, 4857, 5584, 5612, 7026, 7693, 8108, 9185, 9191, 9803, 10723, 11435, 11627, 12765, 13267...
[ 0.034423828125, 0.0281982421875, 0.01904296875, 0.0673828125, 0.06201171875, 0.1171875, 0.043212890625, 0.011962890625, 0.017333984375, 0.04736328125, 0.07666015625, 0.004638671875, 0.010498046875, 0.00146484375, 0.007568359375, 0.056640625, 0.0245361328125, 0.00146484375, 0.0505...
754d0d2f-7272-51ed-b0cd-caf413aa5d69
5,966
0
Title: Best way to abstract season/show/episode data Basically, I've written an API to www.thetvdb.com in Python. The current code can be found here. It grabs data from the API as requested, and has to store the data somehow, and make it available by doing: print tvdbinstance[1][23]['episodename'] # get the name o...
532
605
[ "python" ]
[ "python", "data-structures" ]
{"accepted_answer_id":10778,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-08T14:05:45.290000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2021-10-25T12:24:20.477000+00:00","last_edit_date":"2017-03-29T20:45:42.267000+00:0...
[ -0.0030059814453125, 0.00624847412109375, -0.034759521484375, -0.027374267578125, 0.03143310546875, -0.0333251953125, 0.0017480850219726562, 0.0171356201171875, 0.0278472900390625, -0.005771636962890625, -0.018798828125, 0.007556915283203125, 0.02166748046875, -0.0209503173828125, 0.0026...
[ 11, 18, 23, 47, 56, 64, 71, 98, 106, 112, 132, 136, 184, 237, 277, 416, 429, 468, 678, 991, 1022, 1105, 1286, 1426, 1556, 1614, 2046, 2053, 2174, 2347, 2806, 2965, 2967, 2982, 3082, 3249, 3509, 3917, 3934, 3996, 4173, 4343, 4390, ...
[ 0.103515625, 0.158203125, 0.05078125, 0.033447265625, 0.0751953125, 0.052001953125, 0.06787109375, 0.03955078125, 0.11328125, 0.083984375, 0.08935546875, 0.033203125, 0.026611328125, 0.0174560546875, 0.083984375, 0.005615234375, 0.010009765625, 0.0087890625, 0.03173828125, 0.11...
10288730-5120-5b85-8371-141a7ef0fc2b
8,154
0
Title: Pylons error - 'MySQL server has gone away' I'm using Pylons (a python framework) to serve a simple web application, but it seems to die from time to time, with this in the error log: (2006, 'MySQL server has gone away') I did a bit of checking, and saw that this was because the connections to MySQL were not ...
243
237
[ "python" ]
[ "python", "mysql", "pylons" ]
{"accepted_answer_id":46442,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-11T19:59:32.670000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2019-04-15T13:10:37.253000+00:00","last_edit_date":"2019-04-15T13:10:37.253000+00:0...
[ -0.012115478515625, -0.0034313201904296875, -0.001247406005859375, -0.0182952880859375, 0.0240020751953125, -0.0016040802001953125, -0.0230560302734375, 0.00861358642578125, 0.023651123046875, 0.002391815185546875, -0.0171051025390625, 0.0261383056640625, -0.006683349609375, 0.015151977539...
[ 7, 47, 53, 68, 107, 138, 272, 442, 509, 738, 864, 879, 923, 959, 1176, 1295, 1430, 1467, 1556, 1733, 2967, 4390, 4420, 4759, 5885, 6259, 6713, 7464, 8035, 8781, 10002, 10715, 10723, 11435, 11703, 12684, 13695, 16065, 16578, 17198, 17368...
[ 0.166015625, 0.060302734375, 0.031005859375, 0.1435546875, 0.05859375, 0.06884765625, 0.0625, 0.0223388671875, 0.0213623046875, 0.00634765625, 0.0732421875, 0.1083984375, 0.0771484375, 0.049560546875, 0.08984375, 0.0830078125, 0.162109375, 0.04296875, 0.154296875, 0.091796875, ...
95d0d53b-f4ce-51ca-99c4-39e7ee49552d
8,692
0
Title: How to use XPath in Python? What are the libraries that support XPath? Is there a full implementation? How is the library used? Where is its website?
36
40
[ "python" ]
[ "python", "xml", "dom", "xpath", "python-2.x" ]
{"accepted_answer_id":null,"answer_count":11,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-12T11:28:36.900000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2022-11-02T11:25:50.533000+00:00","last_edit_date":"2020-07-10T14:39:28.570000+00:...
[ -0.0055999755859375, 0.0017070770263671875, -0.008209228515625, -0.0252838134765625, -0.006229400634765625, -0.052001953125, -0.011077880859375, 0.0263519287109375, -0.0313720703125, -0.0166473388671875, -0.0118560791015625, 0.00437164306640625, 0.0103607177734375, 0.00946044921875, 0.03...
[ 23, 83, 450, 1294, 4165, 4393, 4527, 8060, 10484, 10519, 11249, 11814, 35773, 45005, 48962, 145581, 208124 ]
[ 0.037841796875, 0.008544921875, 0.002685546875, 0.078125, 0.1083984375, 0.049072265625, 0.142578125, 0.1591796875, 0.0791015625, 0.29296875, 0.0771484375, 0.10546875, 0.208984375, 0.1748046875, 0.043212890625, 0.2451171875, 0.146484375 ]
3560a09a-98f4-5c6b-9bb5-3016b99e39dd
8,948
0
Title: Accessing MP3 metadata with Python Is there a maintained package I can use to retrieve and set MP3 ID3 metadata using Python?
32
36
[ "python" ]
[ "python", "mp3", "metadata" ]
{"accepted_answer_id":null,"answer_count":16,"chunk_count":1,"chunk_index":0,"closed_date":"2020-06-04T13:25:59.893000+00:00","creation_date":"2008-08-12T15:16:00.637000+00:00","has_accepted_answer":false,"is_closed":true,"languages":["python"],"last_activity_date":"2021-07-24T16:02:02.540000+00:00","last_edit_date":"2...
[ -0.0007810592651367188, -0.0079803466796875, -0.022552490234375, -0.006946563720703125, -0.0036258697509765625, 0.0017290115356445312, -0.007740020751953125, -0.0002913475036621094, -0.00414276123046875, 0.0110931396484375, -0.01383209228515625, 0.0290069580078125, 0.03631591796875, -0.031...
[ 136, 214, 297, 363, 456, 678, 831, 2685, 3134, 3996, 4527, 5423, 10135, 10646, 11338, 17368, 23550, 40266, 48962, 76104, 98169, 145581 ]
[ 0.00048828125, 0.004150390625, 0.0264892578125, 0.2373046875, 0.015625, 0.06103515625, 0.0186767578125, 0.013427734375, 0.08203125, 0.091796875, 0.0634765625, 0.1337890625, 0.1806640625, 0.1337890625, 0.169921875, 0.054931640625, 0.1943359375, 0.119140625, 0.025390625, 0.160156...
45f5912a-38f6-55e6-81f2-7d6440a389ac
10,123
0
Title: How do I treat an integer as an array of bytes in Python? I'm trying to decode the result of the Python os.wait() function. This returns, according to the Python docs: a tuple containing its pid and exit status indication: a 16-bit number, whose low byte is the signal number that killed the process, and who...
164
191
[ "python" ]
[ "python" ]
{"accepted_answer_id":10129,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-13T17:46:41.940000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2020-06-26T18:17:28.803000+00:00","last_edit_date":null,"question_id":10123,"score"...
[ 0.0248565673828125, -0.0019121170043945312, -0.021392822265625, -0.03656005859375, 0.00107574462890625, -0.032501220703125, 0.00974273681640625, -0.00756072998046875, -0.0142822265625, -0.0029430389404296875, -0.01021575927734375, 0.00540924072265625, 0.01117706298828125, -0.03131103515625...
[ 8, 23, 53, 54, 67, 87, 111, 132, 136, 217, 237, 362, 370, 390, 450, 634, 892, 1144, 1363, 1505, 1636, 2606, 3137, 4785, 5423, 8705, 9433, 10298, 10778, 11192, 11249, 11435, 11814, 14012, 14585, 16750, 18151, 22958, 23399, 25632, 26073, ...
[ 0.1796875, 0.03271484375, 0.0322265625, 0.0242919921875, 0.1220703125, 0.028564453125, 0.0732421875, 0.0927734375, 0.05517578125, 0.19140625, 0.083984375, 0.107421875, 0.0654296875, 0.1142578125, 0.0126953125, 0.17578125, 0.1474609375, 0.058837890625, 0.0216064453125, 0.1699218...
6de41648-f81f-5a54-8847-2a5541b2dee4
11,060
0
Title: How should I unit test a code-generator? This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions. I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code need...
276
300
[ "c++", "python" ]
[ "c++", "python", "unit-testing", "code-generation", "swig" ]
{"accepted_answer_id":11074,"answer_count":8,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-14T13:59:21.533000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["c++","python"],"last_activity_date":"2015-07-20T04:10:25.057000+00:00","last_edit_date":"2008-08-23T19:52:34.19300...
[ -0.0138702392578125, 0.00640106201171875, 0.0161895751953125, 0.00580596923828125, 0.0309600830078125, -0.051910400390625, 0.0210723876953125, 0.013397216796875, 0.0201263427734375, 0.005001068115234375, -0.0284576416015625, 0.0240478515625, 0.01012420654296875, 0.032135009765625, 0.0182...
[ 23, 54, 56, 87, 104, 186, 237, 384, 493, 876, 1284, 1286, 1290, 1829, 2046, 2069, 2285, 2811, 2967, 3034, 3444, 3917, 4002, 4785, 5351, 5608, 6713, 7730, 9803, 10336, 11249, 11675, 12008, 12301, 12638, 14037, 17198, 17368, 17991, 18151, ...
[ 0.0498046875, 0.012451171875, 0.02587890625, 0.001220703125, 0.06201171875, 0.05712890625, 0.0185546875, 0.0478515625, 0.1220703125, 0.041259765625, 0.0177001953125, 0.01318359375, 0.1591796875, 0.0164794921875, 0.004638671875, 0.03369140625, 0.0230712890625, 0.1123046875, 0.1162...
4ea88dca-ffe1-53bb-847d-ba216a3676f0
12,591
0
Title: Using an XML catalog with Python's lxml? Is there a way, when I parse an XML document using lxml, to validate that document against its DTD using an external catalog file? I need to be able to work the fixed attributes defined in a document’s DTD.
59
68
[ "python" ]
[ "python", "xml", "lxml" ]
{"accepted_answer_id":null,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-15T18:42:20.503000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2021-01-08T09:47:01.883000+00:00","last_edit_date":null,"question_id":12591,"score"...
[ 0.0292510986328125, 0.0261383056640625, 0.007282257080078125, -0.0179901123046875, 0.00899505615234375, -0.0244598388671875, -0.00551605224609375, 0.0269775390625, -0.0145111083984375, 0.0208587646484375, -0.02386474609375, 0.01042938232421875, 0.01361083984375, 0.0076751708984375, 0.025...
[ 10, 67, 90, 96, 184, 186, 345, 366, 391, 678, 2685, 3871, 3917, 4488, 6953, 11435, 12937, 17368, 19048, 26548, 44622, 48962, 61924, 71426, 92537, 100045, 131492, 145581, 150380, 173591, 188347 ]
[ 0.0169677734375, 0.1259765625, 0.022216796875, 0.1064453125, 0.08203125, 0.00439453125, 0.04736328125, 0.1181640625, 0.0537109375, 0.06298828125, 0.0162353515625, 0.04150390625, 0.10009765625, 0.080078125, 0.02880859375, 0.1298828125, 0.1796875, 0.0556640625, 0.033447265625, 0....
b1467a03-da0b-5d8c-9d06-2dd0ff2cb613
12,592
0
Title: Can you check that an exception is thrown with doctest in Python? Is it possible to write a doctest unit test that will check that an exception is raised? For example, if I have a function foo(x) that is supposed to raise an exception if x < 0, how would I write the doctest for that?
71
73
[ "python" ]
[ "python", "doctest" ]
{"accepted_answer_id":12609,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-15T18:43:17.177000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2021-12-16T08:59:08.467000+00:00","last_edit_date":"2021-12-16T08:59:08.467000+00:0...
[ -0.0030117034912109375, -0.00974273681640625, -0.019134521484375, -0.0013360977172851562, 0.0212554931640625, -0.0295257568359375, 0.0204315185546875, 0.0259857177734375, 0.00252532958984375, 0.021728515625, 0.01163482666015625, -0.00159454345703125, -0.00921630859375, 0.0289459228515625, ...
[ 19, 23, 31, 83, 142, 425, 450, 678, 757, 1022, 3034, 4171, 4426, 5775, 6954, 7722, 12765, 25072, 32354, 33022, 48962, 51584, 104250, 131527, 134598, 138804, 145581, 165249 ]
[ 0.03173828125, 0.0107421875, 0.146484375, 0.05224609375, 0.031494140625, 0.0302734375, 0.021728515625, 0.08203125, 0.1162109375, 0.027099609375, 0.205078125, 0.06005859375, 0.08203125, 0.125, 0.271484375, 0.10595703125, 0.19921875, 0.1357421875, 0.1181640625, 0.09375, 0.01403...
b4fc3060-d82c-5524-b97c-9a26774e9d63
13,396
0
Title: Replacement for for... if array iteration I love list comprehensions in Python, because they concisely represent a transformation of a list. However, in other languages, I frequently find myself writing something along the lines of: foreach (int x in intArray) if (x > 3) //generic condition on x x++ ...
129
137
[ ".net", "python" ]
[ ".net", "python", "arrays", "loops", "iteration" ]
{"accepted_answer_id":13435,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-16T22:28:39.827000+00:00","has_accepted_answer":true,"is_closed":false,"languages":[".net","python"],"last_activity_date":"2011-06-25T12:18:42.583000+00:00","last_edit_date":"2008-09-12T05:14:06.1500...
[ -0.005870819091796875, -0.032867431640625, -0.0184326171875, 0.030059814453125, 0.0213623046875, -0.0185546875, 0.001247406005859375, -0.00748443603515625, 0.016326904296875, 0.01678466796875, -0.00927734375, 0.023712158203125, 0.0096893310546875, -0.01514434814453125, 0.03546142578125, ...
[ 4, 16, 17, 18, 23, 27, 53, 98, 100, 111, 246, 425, 674, 720, 853, 977, 1022, 2053, 2174, 2320, 2737, 3220, 3789, 4288, 4358, 4666, 4904, 5161, 5303, 7092, 7614, 8439, 9433, 10298, 10794, 23935, 27781, 29806, 32562, 33233, 33636, 35431...
[ 0.001708984375, 0.01220703125, 0.02734375, 0.04833984375, 0.034912109375, 0.054443359375, 0.04736328125, 0.03076171875, 0.1796875, 0.031494140625, 0.058837890625, 0.01025390625, 0.02734375, 0.228515625, 0.014892578125, 0.166015625, 0.07421875, 0.0174560546875, 0.244140625, 0.00...
352d6f11-5a2a-517e-8118-a014948bacc5
13,454
0
Title: Python version of PHP's stripslashes I wrote a piece of code to convert PHP's striplashes into valid Python [backslash] escapes: cleaned = stringwithslashes cleaned = cleaned.replace('\\n', '\n') cleaned = cleaned.replace('\\r', '\n') cleaned = cleaned.replace('\\', '') How can I condense it?
80
106
[ "python" ]
[ "python", "string", "escaping" ]
{"accepted_answer_id":null,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-17T01:23:50.067000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2023-11-29T14:18:44.397000+00:00","last_edit_date":"2015-05-30T19:17:17.387000+00:0...
[ 0.00801849365234375, -0.029815673828125, -0.02838134765625, 0.006622314453125, 0.043243408203125, -0.05224609375, -0.011993408203125, -0.023284912109375, -0.018890380859375, -0.0014848709106445312, -0.0172271728515625, 0.0159149169921875, -0.005016326904296875, -0.00579071044921875, 0.01...
[ 7, 19, 42, 87, 90, 107, 111, 158, 297, 442, 831, 2203, 3934, 5106, 5544, 11249, 11389, 12620, 13273, 18151, 23935, 35604, 41872, 43613, 46622, 47302, 48962, 54397, 63847, 76228, 79315, 86479, 96760, 118435, 144281, 145581 ]
[ 0.091796875, 0.050048828125, 0.05078125, 0.001220703125, 0.12109375, 0.0810546875, 0.00927734375, 0.13671875, 0.19921875, 0.099609375, 0.0201416015625, 0.0673828125, 0.095703125, 0.054931640625, 0.2177734375, 0.02734375, 0.1591796875, 0.0986328125, 0.0400390625, 0.1396484375, ...
2dec481c-fe7b-5edd-b6e4-a3e762a098e0
13,791
0
Title: Python Regular Expressions to implement string unescaping I am trying to implement string unescaping with Python regex and backreferences, and it doesn't seem to want to work very well. I'm sure it's something I'm doing wrong but I can't figure out what... >>> import re >>> mystring = r"This is \n a test \r" ...
197
220
[ "python" ]
[ "python", "regex", "backreference" ]
{"accepted_answer_id":13943,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-17T18:20:21.060000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2016-12-30T12:57:33.183000+00:00","last_edit_date":"2016-12-30T12:57:33.183000+00:0...
[ 0.022918701171875, -0.003383636474609375, -0.027191162109375, -0.012054443359375, 0.0243377685546875, -0.06268310546875, -0.0081939697265625, 0.0113983154296875, -0.01003265380859375, 0.0016107559204101562, -0.0220794677734375, 0.01329803466796875, -0.0172119140625, 0.0015659332275390625, ...
[ 5, 10, 18, 19, 42, 47, 83, 136, 294, 418, 456, 653, 678, 759, 773, 831, 915, 1065, 1340, 1690, 1884, 2367, 3034, 3355, 4420, 4488, 4552, 5299, 5701, 6835, 9254, 10366, 11814, 11907, 13273, 16275, 17514, 17669, 18991, 22144, 22729, 249...
[ 0.004150390625, 0.0947265625, 0.00537109375, 0.07080078125, 0.0673828125, 0.002197265625, 0.13671875, 0.0458984375, 0.0732421875, 0.0869140625, 0.1689453125, 0.076171875, 0.0751953125, 0.14453125, 0.1923828125, 0.032470703125, 0.10009765625, 0.052734375, 0.0966796875, 0.0952148...
f820e536-0de1-56dc-94fa-0c19e159d31a
13,857
0
Title: Can you explain closures (as they relate to Python)? I've been reading a lot about closures and I think I understand them, but without clouding the picture for myself and others, I am hoping someone can explain closures as succinctly and clearly as possible. I'm looking for a simple explanation that might help ...
78
90
[ "python" ]
[ "python", "functional-programming", "closures" ]
{"accepted_answer_id":141426,"answer_count":15,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-17T19:14:30.747000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2025-02-21T15:58:21.307000+00:00","last_edit_date":"2014-02-23T22:43:02.420000+00...
[ 0.035247802734375, 0.01117706298828125, -0.0270843505859375, 0.0011234283447265625, 0.027679443359375, -0.054656982421875, -0.01259613037109375, 0.0244903564453125, -0.0128936767578125, 0.0023956298828125, -0.01313018798828125, 0.016326904296875, -0.0231781005859375, 0.004642486572265625, ...
[ 6, 7, 100, 136, 162, 398, 831, 1672, 2856, 3444, 4171, 4527, 5351, 5915, 6333, 7440, 7722, 8781, 13648, 15400, 15490, 16454, 16487, 22008, 27060, 28219, 33444, 35978, 48962, 49726, 73342, 76746, 123019, 145581, 156377, 170224, 187136 ]
[ 0.034423828125, 0.1552734375, 0.0146484375, 0.00390625, 0.007080078125, 0.0240478515625, 0.0419921875, 0.012451171875, 0.0625, 0.0272216796875, 0.062255859375, 0.119140625, 0.026123046875, 0.0791015625, 0.0556640625, 0.03369140625, 0.00537109375, 0.0888671875, 0.000732421875, 0...
e7e40b6c-6ae7-5028-94a9-9bf7edf735b6
13,941
0
Title: Python Sound ("Bell") I'd like to have a python program alert me when it has completed its task by making a beep noise. Currently, I use import os and then use a command line speech program to say "Process complete". I much rather it be a simple "bell." I know that there's a function that can be used in Cocoa...
134
145
[ "python" ]
[ "python", "macos", "audio", "terminal" ]
{"accepted_answer_id":13949,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-17T21:33:39.780000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2022-06-20T18:57:17.270000+00:00","last_edit_date":"2020-07-02T15:02:41.017000+00:0...
[ -0.0036678314208984375, 0.016143798828125, 0.016387939453125, 0.0005669593811035156, 0.01302337646484375, -0.053741455078125, -0.01438140869140625, 0.01873779296875, 0.0034465789794921875, -0.00960540771484375, -0.0014438629150390625, -0.0080108642578125, 0.042205810546875, -0.013435363769...
[ 10, 11, 71, 110, 163, 186, 362, 390, 571, 765, 831, 1528, 1556, 1884, 3075, 3229, 3714, 4358, 4488, 4517, 4527, 4727, 5045, 5154, 6766, 6796, 6868, 8781, 10752, 11814, 13315, 14192, 17198, 17368, 20662, 24927, 26531, 28412, 28484, 32354, ...
[ 0.032958984375, 0.10693359375, 0.036865234375, 0.1337890625, 0.09375, 0.1552734375, 0.0732421875, 0.02783203125, 0.1142578125, 0.060546875, 0.033935546875, 0.2060546875, 0.150390625, 0.119140625, 0.1572265625, 0.099609375, 0.0157470703125, 0.0166015625, 0.06396484375, 0.2480468...
6de06cb1-4741-54f2-be55-93c008063e3b
14,281
0
Title: Is there a python module for regex matching in zip files I have over a million text files compressed into 40 zip files. I also have a list of about 500 model names of phones. I want to find out the number of times a particular model was mentioned in the text files. Is there any python module which can do a r...
101
102
[ "python" ]
[ "python", "regex", "zip", "text-processing" ]
{"accepted_answer_id":14320,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-18T07:41:09.010000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2014-09-02T15:44:08.707000+00:00","last_edit_date":"2014-09-02T15:44:08.707000+00:0...
[ 0.0158843994140625, -0.0101776123046875, -0.0374755859375, -0.0215911865234375, 0.009246826171875, -0.0047149658203125, 0.029541015625, -0.007694244384765625, -0.009429931640625, -0.01458740234375, -0.0175018310546875, 0.023956298828125, 0.043182373046875, -0.00856781005859375, 0.0225830...
[ 7, 10, 23, 47, 51, 54, 98, 100, 214, 375, 509, 645, 708, 765, 831, 1112, 1810, 2071, 2101, 2499, 2685, 2967, 3299, 3355, 3444, 3934, 5303, 6835, 7413, 7986, 8781, 11856, 14012, 14858, 15490, 17198, 17311, 19879, 20028, 24089, 26783, 4...
[ 0.031494140625, 0.0654296875, 0.0238037109375, 0.011474609375, 0.057861328125, 0.05322265625, 0.0257568359375, 0.04052734375, 0.08837890625, 0.0400390625, 0.06103515625, 0.0244140625, 0.1572265625, 0.017333984375, 0.021728515625, 0.1005859375, 0.0771484375, 0.005126953125, 0.0937...
ebc4e7c9-62a3-5f44-80d0-afb9220af986
14,389
0
Title: Regex and unicode I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example), grabs the episode name (from the www.thetvdb.com API) and automatically renames them into something nicer (Show Name - [01x02].avi) The script works fine, that is until you try and use it on files th...
521
733
[ "python" ]
[ "python", "regex", "unicode", "character-properties" ]
{"accepted_answer_id":14391,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-18T09:41:14.273000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2018-12-06T11:30:33.877000+00:00","last_edit_date":"2012-03-29T18:10:10.003000+00:0...
[ 0.031829833984375, -0.01122283935546875, -0.0292205810546875, -0.033721923828125, 0.023162841796875, -0.0247039794921875, -0.00585174560546875, 0.023040771484375, -0.00902557373046875, 0.00920867919921875, -0.0224456787109375, -0.007602691650390625, 0.045135498046875, -0.005344390869140625...
[ 4, 5, 6, 7, 9, 11, 13, 15, 16, 25, 31, 32, 44, 47, 56, 58, 64, 70, 71, 83, 87, 98, 100, 111, 112, 132, 136, 169, 184, 206, 247, 254, 268, 277, 284, 294, 297, 363, 366, 378, 425, 434, 454, 456, 468, 538, 561, 621, 756, ...
[ 0.00732421875, 0.00732421875, 0.007568359375, 0.0272216796875, 0.099609375, 0.041259765625, 0.04345703125, 0.007568359375, 0.0078125, 0.0078125, 0.1181640625, 0.00732421875, 0.00634765625, 0.06298828125, 0.119140625, 0.00732421875, 0.007080078125, 0.008544921875, 0.007080078125, ...
d1739573-8969-5324-9447-f992b9004318
14,422
0
Title: Why is the PyObjC documentation so bad? For example, http://developer.apple.com/cocoa/pyobjc.html is still for OS X 10.4 Tiger, not 10.5 Leopard.. And that's the official Apple documentation for it.. The official PyObjC page is equally bad, http://pyobjc.sourceforge.net/ It's so bad it's baffling.. I'm cons...
221
275
[ "python" ]
[ "python", "macos", "cocoa", "pyobjc" ]
{"accepted_answer_id":14507,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":"2013-08-20T14:46:02.913000+00:00","creation_date":"2008-08-18T10:23:22.113000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2013-08-20T12:56:44.553000+00:00","last_edit_date":"20...
[ -0.03009033203125, 0.00530242919921875, -0.015869140625, -0.01238250732421875, -0.0124969482421875, -0.0240478515625, 0.0156402587890625, 0.01178741455078125, -0.00376129150390625, -0.0186004638671875, -0.032928466796875, 0.005153656005859375, 0.0125579833984375, -0.0124359130859375, 0.0...
[ 11, 56, 83, 90, 100, 133, 143, 170, 188, 221, 238, 429, 441, 587, 603, 617, 678, 758, 903, 934, 944, 959, 961, 1193, 1272, 1286, 2069, 2472, 2685, 3522, 3667, 4068, 4129, 4171, 4902, 5045, 6493, 6494, 7464, 7693, 8781, 8913, 9007, ...
[ 0.146484375, 0.004638671875, 0.021240234375, 0.0625, 0.05029296875, 0.078125, 0.032958984375, 0.205078125, 0.056884765625, 0.1123046875, 0.09228515625, 0.010009765625, 0.1396484375, 0.16015625, 0.044677734375, 0.1513671875, 0.006103515625, 0.1181640625, 0.023193359375, 0.102539...
3e24d3d6-e0aa-5d0d-830e-e1066d2550da
15,798
0
Title: How do I validate xml against a DTD file in Python I need to validate an XML string (and not a file) against a DTD description file. How can that be done in python?
46
48
[ "python" ]
[ "python", "xml", "validation", "dtd" ]
{"accepted_answer_id":15931,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-19T06:24:54.217000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2016-04-23T11:18:32.950000+00:00","last_edit_date":"2013-07-04T12:26:04.030000+00:0...
[ -0.002899169921875, 0.03680419921875, 0.002178192138671875, -0.0087127685546875, -0.005767822265625, -0.038055419921875, -0.00147247314453125, 0.0252838134765625, -0.00444793701171875, 0.0257720947265625, -0.03289794921875, 0.006626129150390625, -0.006717681884765625, -0.0137481689453125, ...
[ 23, 54, 67, 391, 450, 831, 959, 3871, 11249, 11435, 16940, 17198, 26548, 44622, 48962, 50828, 76811, 79315, 92537, 100045, 131492, 145581 ]
[ 0.022216796875, 0.007080078125, 0.1494140625, 0.05078125, 0.00732421875, 0.005615234375, 0.03173828125, 0.0927734375, 0.0556640625, 0.150390625, 0.06201171875, 0.078125, 0.1962890625, 0.234375, 0.0400390625, 0.1669921875, 0.2021484375, 0.1787109375, 0.2392578125, 0.236328125, ...
1cf2cb8b-008d-5c54-a760-d08dd3b3af69
15,995
0
Title: Useful code which uses reduce()? Does anyone here have any useful code which uses reduce() function in python? Is there any code other than the usual + and * that we see in the examples? Refer Fate of reduce() in Python 3000 by GvR
62
65
[ "python" ]
[ "python", "functional-programming" ]
{"accepted_answer_id":null,"answer_count":24,"chunk_count":1,"chunk_index":0,"closed_date":"2016-03-13T08:46:14.817000+00:00","creation_date":"2008-08-19T11:16:58.120000+00:00","has_accepted_answer":false,"is_closed":true,"languages":["python"],"last_activity_date":"2022-11-16T18:02:35.520000+00:00","last_edit_date":"2...
[ 0.027984619140625, 0.0015230178833007812, -0.0343017578125, 0.026947021484375, 0.0576171875, -0.04547119140625, -0.0061798095703125, 0.01201629638671875, 0.0213470458984375, 0.01551055908203125, -0.0023174285888671875, 0.0246124267578125, -0.00798797607421875, -0.00904083251953125, 0.029...
[ 16, 23, 132, 136, 661, 997, 1052, 1957, 2499, 3036, 3129, 3688, 3789, 4527, 7844, 17198, 17287, 18151, 27781, 32354, 34390, 35672, 36836, 48962, 50828, 80234, 115723, 145581 ]
[ 0.009765625, 0.0400390625, 0.1416015625, 0.0281982421875, 0.07861328125, 0.13671875, 0.0291748046875, 0.032958984375, 0.0162353515625, 0.07275390625, 0.0283203125, 0.009033203125, 0.01025390625, 0.111328125, 0.109375, 0.0703125, 0.1650390625, 0.1923828125, 0.0947265625, 0.16406...
488efb78-dd70-5cac-ba76-a26b7ec7d27f
16,067
0
Title: Prototyping with Python code before compiling I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually. IIRC, one ...
228
267
[ "python" ]
[ "python", "swig", "ctypes", "prototyping", "python-sip" ]
{"accepted_answer_id":1661276,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-19T12:32:38.903000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2022-12-03T19:08:21.523000+00:00","last_edit_date":"2020-09-22T10:10:12+00:00","q...
[ 0.0017833709716796875, 0.005573272705078125, -0.01013946533203125, 0.0228729248046875, 0.035858154296875, -0.0257110595703125, -0.00542449951171875, 0.0168609619140625, 0.037506103515625, -0.016387939453125, -0.00925445556640625, 0.0265350341796875, 0.0206298828125, -0.018157958984375, 0...
[ 8, 47, 53, 159, 162, 214, 237, 280, 313, 344, 375, 456, 678, 809, 842, 876, 1029, 1294, 1409, 1543, 1603, 1774, 3714, 3934, 4331, 4527, 4778, 5045, 5974, 7010, 7311, 7477, 8108, 9842, 9969, 10298, 10931, 12960, 18151, 18770, 19514, 19...
[ 0.0279541015625, 0.0986328125, 0.1201171875, 0.05908203125, 0.047607421875, 0.06103515625, 0.0029296875, 0.0810546875, 0.03662109375, 0.080078125, 0.052978515625, 0.043701171875, 0.095703125, 0.1318359375, 0.0247802734375, 0.00634765625, 0.150390625, 0.09033203125, 0.162109375, ...
f1d4eedb-d3a5-5d87-9a25-cb9c74a22d53
16,861
0
Title: Sanitising user input using Python What is the best way to sanitize user input for a Python-based web application? Is there a single function to remove HTML characters and any other necessary characters combinations to prevent an XSS or SQL injection attack?
52
56
[ "python" ]
[ "python", "xss" ]
{"accepted_answer_id":null,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-19T20:18:31.740000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2017-07-11T01:42:17.960000+00:00","last_edit_date":"2017-07-11T01:42:17.960000+00:0...
[ 0.021453857421875, 0.0164794921875, -0.028564453125, 0.00228118896484375, 0.01445770263671875, -0.055694580078125, -0.0292816162109375, -0.0007777214050292969, -0.027618408203125, 0.035308837890625, -0.0364990234375, 0.017425537109375, -0.0128631591796875, -0.0007038116455078125, 0.01528...
[ 47, 214, 1193, 1467, 1735, 2965, 3917, 11001, 15268, 17368, 19097, 20650, 23240, 32354, 38415, 38937, 48962, 52875, 56282, 63559, 77007, 80866, 87388, 107730, 112243, 115049, 124850, 145581, 162515 ]
[ 0.0322265625, 0.07373046875, 0.0791015625, 0.0888671875, 0.1904296875, 0.119140625, 0.0703125, 0.080078125, 0.1904296875, 0.0673828125, 0.1806640625, 0.16796875, 0.1650390625, 0.185546875, 0.1513671875, 0.162109375, 0.020263671875, 0.1533203125, 0.1279296875, 0.076171875, 0.0...
19b7ee30-c239-506c-a6d4-3cc4a7092b65
17,250
0
Title: How to create an encrypted ZIP file? I am creating an ZIP file with ZipFile in Python 2.5, it works OK so far: import zipfile, os locfile = "test.txt" loczip = os.path.splitext (locfile)[0] + ".zip" zip = zipfile.ZipFile (loczip, "w") zip.write (locfile) zip.close() But I couldn't find how to encrypt the f...
134
154
[ "python" ]
[ "python", "zip", "python-zipfile" ]
{"accepted_answer_id":null,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-20T00:16:40.330000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2024-01-10T18:48:32.633000+00:00","last_edit_date":"2021-10-06T18:00:39.490000+00:0...
[ -0.0107269287109375, -0.004627227783203125, -0.01385498046875, 0.021209716796875, 0.03924560546875, -0.0272216796875, -0.0172882080078125, 0.020355224609375, 0.002651214599609375, 0.003326416015625, -0.0146484375, 0.0022830963134765625, 0.0299224853515625, -0.036773681640625, 0.002958297...
[ 7, 18, 22, 23, 47, 297, 362, 434, 436, 567, 678, 997, 1511, 2060, 2203, 2389, 3442, 3642, 3917, 4527, 5426, 5809, 6954, 7001, 7413, 9803, 10931, 11249, 11435, 11782, 14315, 16487, 18781, 22829, 24927, 26026, 27804, 28282, 29806, 29822, ...
[ 0.01123046875, 0.0107421875, 0.1005859375, 0.055419921875, 0.0322265625, 0.0810546875, 0.1083984375, 0.0986328125, 0.032958984375, 0.140625, 0.03759765625, 0.1181640625, 0.09716796875, 0.06591796875, 0.0283203125, 0.03759765625, 0.1513671875, 0.078125, 0.0247802734375, 0.027709...
de608380-750b-5f74-be5d-b1e0f7881019
17,893
0
Title: What's the best way to distribute python command-line tools? My current setup.py script works okay, but it installs tvnamer.py (the tool) as tvnamer.py into site-packages or somewhere similar.. Can I make setup.py install tvnamer.py as tvnamer, and/or is there a better way of installing command-line applicati...
76
91
[ "python" ]
[ "python", "command-line", "packaging" ]
{"accepted_answer_id":17933,"answer_count":1,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-20T13:07:25.517000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2017-10-11T00:41:39.380000+00:00","last_edit_date":"2017-10-11T00:41:39.380000+00:0...
[ -0.0303192138671875, -0.01222991943359375, -0.03460693359375, 0.006237030029296875, 0.0106201171875, -0.033172607421875, 0.00641632080078125, 0.01187896728515625, -0.00966644287109375, -0.01885986328125, 0.0008912086486816406, 0.035552978515625, 0.03961181640625, -0.0133056640625, 0.0177...
[ 9, 47, 67, 70, 76, 214, 237, 1284, 1764, 1991, 2256, 2965, 3249, 3917, 3934, 4171, 4865, 5044, 6493, 11522, 15917, 17198, 20600, 21373, 26499, 29102, 43240, 43581, 48962, 50828, 55516, 68403, 72977, 75101, 86685, 169581, 174653 ]
[ 0.03857421875, 0.047119140625, 0.109375, 0.05322265625, 0.150390625, 0.0252685546875, 0.07763671875, 0.00927734375, 0.0947265625, 0.2197265625, 0.1533203125, 0.1328125, 0.044189453125, 0.0908203125, 0.03466796875, 0.042236328125, 0.0198974609375, 0.1689453125, 0.177734375, 0.07...
b008d511-a60f-5860-b69b-f53845faadc7
18,418
0
Title: Elegant way to remove items from sequence in Python? When I am writing code in Python, I often need to remove items from a list or other sequence type based on some criteria. I haven't found a solution that is elegant and efficient, as removing items from a list you are currently iterating through is bad. For e...
196
226
[ "python" ]
[ "python", "optimization", "set", "series" ]
{"accepted_answer_id":18435,"answer_count":14,"chunk_count":1,"chunk_index":0,"closed_date":"2015-06-22T15:53:31.867000+00:00","creation_date":"2008-08-20T17:41:24.377000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2013-03-15T14:12:56.133000+00:00","last_edit_date":"2...
[ 0.0289764404296875, -0.009307861328125, -0.0364990234375, 0.033447265625, 0.01401519775390625, -0.0506591796875, -0.0220184326171875, -0.00853729248046875, 0.0206146240234375, 0.005947113037109375, 0.005153656005859375, 0.036041259765625, -0.0228424072265625, -0.00482940673828125, 0.0240...
[ 6, 11, 18, 23, 40, 45, 47, 54, 67, 100, 146, 266, 272, 294, 373, 831, 927, 944, 1286, 1295, 1884, 2174, 3564, 3871, 3917, 3956, 5303, 6494, 6496, 8305, 9007, 9351, 10342, 10484, 10644, 10763, 11627, 14037, 18151, 24500, 26973, 27650, ...
[ 0.00244140625, 0.039306640625, 0.007568359375, 0.02294921875, 0.076171875, 0.029052734375, 0.14453125, 0.013427734375, 0.1298828125, 0.0146484375, 0.166015625, 0.1630859375, 0.1728515625, 0.036865234375, 0.00830078125, 0.0615234375, 0.1396484375, 0.162109375, 0.029541015625, 0....
876d50b3-9324-5522-9e0e-51f3f86e864a
19,030
0
Title: How to check set of files conform to a naming scheme I have a bunch of files (TV episodes, although that is fairly arbitrary) that I want to check match a specific naming/organisation scheme.. Currently: I have three arrays of regex, one for valid filenames, one for files missing an episode name, and one for ...
453
500
[ "python" ]
[ "python", "validation", "naming" ]
{"accepted_answer_id":21302,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-20T22:50:55.643000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2012-08-11T15:56:22.453000+00:00","last_edit_date":null,"question_id":19030,"score"...
[ -0.0065460205078125, -0.005260467529296875, -0.03729248046875, 0.01529693603515625, 0.0013151168823242188, -0.0015535354614257812, -0.0049896240234375, 0.0108184814453125, 0.00872802734375, 0.01105499267578125, -0.007442474365234375, 0.024261474609375, 0.048065185546875, -0.003824234008789...
[ 10, 11, 23, 31, 47, 56, 100, 106, 111, 116, 163, 184, 425, 756, 1286, 1681, 1910, 2749, 3355, 3444, 3742, 4517, 4778, 5037, 5303, 5343, 5423, 5426, 5608, 5809, 6746, 6835, 7013, 9351, 9384, 9550, 10298, 10778, 11249, 11341, 11435, 116...
[ 0.0233154296875, 0.08837890625, 0.0238037109375, 0.0966796875, 0.1171875, 0.1474609375, 0.0277099609375, 0.02490234375, 0.002685546875, 0.06298828125, 0.030517578125, 0.025146484375, 0.0224609375, 0.04296875, 0.006103515625, 0.0712890625, 0.16796875, 0.039306640625, 0.1689453125,...
4e8a2b98-c819-5b58-8396-dd71e42efe2d
19,151
0
Title: How to build a basic iterator? How can I create an iterator in Python? For example, suppose I have a class whose instances logically "contain" some values: class Example: def __init__(self, values): self.values = values I want to be able to write code like: e = Example([1, 2, 3]) # Each time...
146
160
[ "python" ]
[ "python", "object", "iterator" ]
{"accepted_answer_id":24377,"answer_count":10,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-21T00:36:11.773000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-08-24T17:01:50.650000+00:00","last_edit_date":"2023-08-24T17:01:50.650000+00:...
[ -0.00608062744140625, 0.00925445556640625, 0.00812530517578125, -0.007030487060546875, 0.0035610198974609375, -0.0635986328125, -0.0213623046875, 0.0163726806640625, 0.0090179443359375, -0.007122039794921875, 0.0014162063598632812, 0.00991058349609375, 0.004718780517578125, -0.004451751708...
[ 7, 8, 10, 17, 23, 28, 47, 70, 73, 87, 90, 98, 116, 138, 142, 217, 418, 420, 720, 831, 1295, 1380, 1733, 1884, 2203, 3060, 3444, 4597, 5608, 5953, 6226, 6743, 7440, 8305, 9969, 11249, 12403, 12684, 15970, 18151, 18507, 19048, 27494, ...
[ 0.046875, 0.0859375, 0.015869140625, 0.150390625, 0.095703125, 0.0888671875, 0.06884765625, 0.0185546875, 0.053955078125, 0.05224609375, 0.04638671875, 0.031005859375, 0.046142578125, 0.1025390625, 0.09814453125, 0.042724609375, 0.006103515625, 0.0849609375, 0.291015625, 0.0825...
69e4d142-be23-556b-88b8-e8a73d1cbbe1
19,339
0
Title: Transpose/Unzip Function (inverse of zip)? I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item. For example: original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result...
160
179
[ "python" ]
[ "python", "list", "matrix", "transpose" ]
{"accepted_answer_id":19343,"answer_count":14,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-21T04:29:07.580000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2026-04-24T17:28:35.253000+00:00","last_edit_date":"2024-11-09T20:01:49.670000+00:...
[ 0.03289794921875, 0.00798797607421875, -0.018951416015625, -0.006618499755859375, 0.0010728836059570312, 0.003009796142578125, -0.0004992485046386719, -0.0222930908203125, -0.00470733642578125, 0.019073486328125, 0.0199127197265625, 0.030517578125, 0.0013036727905273438, -0.023956298828125...
[ 7, 47, 64, 71, 73, 111, 116, 138, 195, 201, 217, 275, 370, 450, 468, 765, 1884, 2203, 3444, 4720, 4879, 4958, 5117, 5303, 7311, 8439, 8705, 10763, 11062, 12638, 13956, 14256, 14602, 16401, 16750, 17932, 20209, 24209, 26866, 28670, 29458...
[ 0.0849609375, 0.130859375, 0.0255126953125, 0.041748046875, 0.1064453125, 0.0218505859375, 0.169921875, 0.037109375, 0.080078125, 0.087890625, 0.07861328125, 0.0169677734375, 0.12109375, 0.00390625, 0.00390625, 0.0189208984375, 0.08935546875, 0.01171875, 0.1162109375, 0.0966796...
92c2779a-a83c-5e1b-b61e-da2b9f253bfd
19,654
0
Title: Introducing Python The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development. But, currently, one of the developers has seen the light of Django (the company h...
179
194
[ "php", "python" ]
[ "php", "python" ]
{"accepted_answer_id":19715,"answer_count":8,"chunk_count":1,"chunk_index":0,"closed_date":"2017-04-06T07:56:05.527000+00:00","creation_date":"2008-08-21T11:48:03+00:00","has_accepted_answer":true,"is_closed":true,"languages":["php","python"],"last_activity_date":"2012-06-07T02:33:50.953000+00:00","last_edit_date":"201...
[ -0.00794219970703125, 0.0009660720825195312, -0.04229736328125, -0.0141143798828125, 0.05108642578125, -0.027984619140625, 0.0136260986328125, 0.00540924072265625, -0.003009796142578125, -0.00788116455078125, -0.05450439453125, 0.00727081298828125, 0.031524658203125, 0.025787353515625, 0...
[ 4, 7, 9, 10, 16, 23, 47, 53, 56, 70, 83, 87, 100, 111, 186, 191, 214, 538, 678, 683, 686, 1274, 1286, 1556, 1632, 1830, 1836, 2347, 2856, 3501, 3525, 3535, 3789, 4295, 4393, 4488, 4734, 5036, 5608, 5622, 6032, 6044, 6494, 6528, ...
[ 0.006103515625, 0.00634765625, 0.0048828125, 0.006591796875, 0.00537109375, 0.0830078125, 0.005859375, 0.1640625, 0.004638671875, 0.0068359375, 0.006591796875, 0.0048828125, 0.00537109375, 0.0166015625, 0.005859375, 0.06640625, 0.04443359375, 0.0068359375, 0.09228515625, 0.1054...
ea9be777-8f84-56b7-9767-03297c4b6220
20,063
0
Title: What's the best way to parse command line arguments? What's the easiest, tersest, and most flexible method or library for parsing Python command line arguments?
36
45
[ "python" ]
[ "python", "command-line", "command-line-arguments" ]
{"accepted_answer_id":26910,"answer_count":15,"chunk_count":1,"chunk_index":0,"closed_date":"2022-07-02T02:39:22.733000+00:00","creation_date":"2008-08-21T14:24:41.530000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2025-12-28T09:24:57.003000+00:00","last_edit_date":"2...
[ -0.006397247314453125, 0.002117156982421875, -0.03411865234375, 0.006099700927734375, 0.0015172958374023438, -0.058502197265625, -0.0006256103515625, -0.0003070831298828125, 0.0064239501953125, 0.01172637939453125, -0.036956787109375, 0.028778076171875, 0.03741455078125, -0.009353637695312...
[ 7, 47, 184, 271, 366, 525, 1294, 1544, 2684, 2965, 3917, 6953, 10750, 13315, 35773, 48962, 55300, 75101, 77782, 110677, 145581 ]
[ 0.036865234375, 0.023681640625, 0.1240234375, 0.07568359375, 0.166015625, 0.0262451171875, 0.06494140625, 0.0810546875, 0.025146484375, 0.099609375, 0.040771484375, 0.0986328125, 0.2236328125, 0.1337890625, 0.1611328125, 0.0279541015625, 0.09423828125, 0.1787109375, 0.1171875, ...
02fd2e0a-4315-50c6-b7d9-e9bfbfd83417
20,794
0
Title: Find broken symlinks with Python If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are a few other reasons that os.stat() might throw a similar exception. Is there a more precise way of detecting broken symlinks with Python under L...
72
84
[ "python" ]
[ "python", "linux", "symlink" ]
{"accepted_answer_id":26957,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-21T19:00:52.053000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-01-23T23:40:02.393000+00:00","last_edit_date":"2013-12-17T12:43:11.867000+00:0...
[ -0.0075531005859375, -0.0281982421875, -0.0111846923828125, -0.00205230712890625, 0.0204620361328125, 0, 0.0133209228515625, 0.00737762451171875, -0.004756927490234375, -0.024383544921875, -0.02105712890625, 0.0115966796875, 0.00440216064453125, 0.008270263671875, 0.01427459716796875, ...
[ 7, 39, 132, 214, 362, 678, 954, 1379, 2856, 10187, 11782, 11787, 13648, 17198, 17346, 18468, 21373, 26040, 29908, 31611, 48962, 50828, 80234, 89397, 90791, 96391, 104250, 131527, 134995, 145581, 148431 ]
[ 0.051513671875, 0.142578125, 0.0830078125, 0.010986328125, 0.111328125, 0.0703125, 0.1162109375, 0.0810546875, 0.0201416015625, 0.255859375, 0.076171875, 0.162109375, 0.010009765625, 0.12109375, 0.2001953125, 0.13671875, 0.0162353515625, 0.0966796875, 0.1689453125, 0.150390625,...
42fdfc18-209d-573b-8e09-7e8ecb77aa03
20,927
0
Title: Updating an auto_now DateTimeField in a parent model in Django I've got two models: Message and Attachment. Each attachment is attached to a specific message, using a ForeignKey on the Attachment model. Both models have an auto_now DateTimeField called updated. I'm trying to make it so that when any attachment ...
133
160
[ "python" ]
[ "python", "database", "django", "orm" ]
{"accepted_answer_id":20983,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-21T19:41:57.870000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2021-10-27T13:27:40.807000+00:00","last_edit_date":"2021-10-27T13:27:40.807000+00:0...
[ 0.039093017578125, 0.0019817352294921875, -0.006435394287109375, -0.0150146484375, 0.0018472671508789062, -0.01203155517578125, 0.0345458984375, 0.00467681884765625, 0.00628662109375, 0.0043792724609375, -0.007476806640625, 0.013824462890625, -0.00022339820861816406, -0.00959014892578125, ...
[ 8, 23, 47, 57, 71, 132, 136, 221, 420, 674, 903, 934, 1601, 1809, 2203, 2499, 2843, 3229, 3249, 3299, 4488, 4588, 5036, 5423, 6159, 6626, 9208, 10091, 15400, 15970, 18151, 19388, 20255, 25512, 26008, 27803, 28848, 29458, 30098, 31577, 3...
[ 0.0654296875, 0.0185546875, 0.091796875, 0.109375, 0.0947265625, 0.01953125, 0.0206298828125, 0.012939453125, 0.03466796875, 0.031982421875, 0.03662109375, 0.1591796875, 0.1767578125, 0.181640625, 0.025146484375, 0.007568359375, 0.0517578125, 0.02734375, 0.037353515625, 0.21972...
78035b0b-c4ff-5241-a7a0-f4e6a0b1dd27
21,454
0
Title: How can I specify a MySQL ENUM type field in a Django model? How do I go about specifying and using an ENUM in a Django model?
33
39
[ "python" ]
[ "python", "mysql", "django", "django-models", "enums" ]
{"accepted_answer_id":null,"answer_count":10,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-21T23:48:08.777000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2025-04-09T01:25:28.387000+00:00","last_edit_date":"2025-04-08T23:33:48.177000+00:...
[ 0.018524169921875, -0.01129150390625, -0.0219879150390625, -0.01267242431640625, 0.01093292236328125, -0.0284423828125, -0.0193634033203125, 0.01554107666015625, -0.01177215576171875, -0.004184722900390625, 0.00908660888671875, 0.0265350341796875, 0.007232666015625, -0.0161285400390625, ...
[ 23, 136, 241, 831, 1672, 3299, 10644, 11249, 17368, 18929, 27803, 39424, 40140, 44457, 48502, 48962, 109020, 151138, 157146 ]
[ 0.00341796875, 0.047119140625, 0.13671875, 0.05712890625, 0.05126953125, 0.224609375, 0.1728515625, 0.0703125, 0.107421875, 0.10546875, 0.267578125, 0.1162109375, 0.17578125, 0.20703125, 0.181640625, 0.0908203125, 0.341796875, 0.12109375, 0.26953125 ]
cec8d480-a1a5-5eae-9670-212315642515
21,934
0
Title: Why Java and Python garbage collection methods are different? Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed. But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time. Why does Jav...
88
94
[ "java", "python" ]
[ "java", "python", "garbage-collection" ]
{"accepted_answer_id":21964,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T07:35:26.703000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["java","python"],"last_activity_date":"2014-02-02T23:15:20.800000+00:00","last_edit_date":"2013-03-10T23:27:26.8130...
[ 0.022125244140625, 0.01546478271484375, 0.015167236328125, -0.002468109130859375, 0.01004791259765625, -0.015167236328125, -0.03045654296875, 0.03033447265625, 0.022125244140625, -0.01177978515625, -0.037841796875, -0.0022602081298828125, -0.01171875, -0.008148193359375, 0.01808166503906...
[ 7, 23, 110, 136, 186, 297, 402, 429, 621, 748, 1061, 1221, 1286, 1556, 1733, 1970, 3501, 3671, 4527, 4966, 6897, 11522, 11814, 12921, 29458, 34831, 36746, 41925, 42486, 43799, 44084, 48962, 51515, 51713, 54529, 55076, 55300, 68073, 69657, ...
[ 0.06787109375, 0.064453125, 0.06640625, 0.0712890625, 0.026123046875, 0.1142578125, 0.205078125, 0.1220703125, 0.02978515625, 0.1201171875, 0.002197265625, 0.03125, 0.0888671875, 0.05517578125, 0.1240234375, 0.08984375, 0.0279541015625, 0.08642578125, 0.140625, 0.0146484375, ...
a932ef35-4527-5ed6-abd3-f06da29dc079
21,961
0
Title: Date/time conversion using time.mktime seems wrong >>> import time >>> time.strptime("01-31-2009", "%m-%d-%Y") (2009, 1, 31, 0, 0, 0, 5, 31, -1) >>> time.mktime((2009, 1, 31, 0, 0, 0, 5, 31, -1)) 1233378000.0 >>> 60*60*24 # seconds in a day 86400 >>> 1233378000.0 / 86400 14275.208333333334 time.mktime should ...
229
170
[ "python" ]
[ "python", "datetime" ]
{"accepted_answer_id":null,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T09:06:43.707000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2017-07-29T19:37:04.900000+00:00","last_edit_date":"2017-07-27T16:22:08.853000+00:0...
[ 0.03338623046875, -0.00804901123046875, -0.026519775390625, 0.00994873046875, 0.0221405029296875, -0.0032711029052734375, -0.0171661376953125, 0.0009436607360839844, -0.0078125, -0.0182342529296875, 0.02972412109375, 0.0133209228515625, 0.007106781005859375, -0.05352783203125, 0.00571441...
[ 4, 5, 10, 23, 28, 39, 45, 64, 99, 106, 186, 190, 206, 254, 390, 468, 757, 771, 1496, 1639, 1723, 1733, 2357, 3853, 4122, 4598, 5155, 5608, 6032, 6746, 6873, 9297, 10253, 10700, 14012, 15841, 16750, 16792, 17281, 17368, 19201, 24927, ...
[ 0.044677734375, 0.052734375, 0.011474609375, 0.064453125, 0.035400390625, 0.00244140625, 0.0830078125, 0.046630859375, 0.0322265625, 0.046142578125, 0.0211181640625, 0.03564453125, 0.146484375, 0.05517578125, 0.0269775390625, 0.011474609375, 0.06591796875, 0.17578125, 0.18359375,...
d54a363c-415e-5ec7-a60b-c8328b8d40b7
22,059
0
Title: How do content discovery engines, like Zemanta and Open Calais work? I was wondering how as semantic service like Open Calais figures out the names of companies, or people, tech concepts, keywords, etc. from a piece of text. Is it because they have a large database that they match the text against? How would...
92
94
[ "python", "ruby" ]
[ "python", "ruby", "semantics", "zemanta" ]
{"accepted_answer_id":null,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T10:51:19.057000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python","ruby"],"last_activity_date":"2013-08-07T16:43:09.190000+00:00","last_edit_date":"2013-08-07T16:43:09.1900...
[ 0.0223236083984375, -0.007068634033203125, -0.00864410400390625, -0.0126190185546875, 0.0248870849609375, -0.0099334716796875, -0.032012939453125, -0.021026611328125, 0.0105133056640625, -0.0033740997314453125, -0.056793212890625, 0.0105133056640625, 0.053985595703125, 0.00899505615234375,...
[ 7, 47, 53, 54, 70, 102, 136, 164, 237, 484, 1295, 1810, 1884, 2367, 2806, 3395, 3642, 3714, 4488, 4516, 6637, 7986, 10941, 11249, 13527, 14858, 21334, 23755, 26366, 26548, 42459, 43079, 48962, 51216, 53095, 63399, 63847, 76370, 87907, 103...
[ 0.072265625, 0.033203125, 0.06689453125, 0.09033203125, 0.001953125, 0.21875, 0.015869140625, 0.197265625, 0.01220703125, 0.15625, 0.078125, 0.13671875, 0.0189208984375, 0.019775390625, 0.0177001953125, 0.087890625, 0.064453125, 0.1279296875, 0.1435546875, 0.162109375, 0.0302...
b284d95f-f69a-5d52-bf1d-47213c162a5c
22,149
0
Title: Unicode vs UTF-8 confusion in Python / Django? I stumbled over this passage in the Django tutorial: Django models have a default str() method that calls unicode() and converts the result to a UTF-8 bytestring. This means that unicode(p) will return a Unicode string, and str(p) will return a normal string, w...
207
236
[ "python" ]
[ "python", "django", "unicode" ]
{"accepted_answer_id":522827,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T12:01:53.490000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2009-10-21T10:11:53.450000+00:00","last_edit_date":null,"question_id":22149,"score...
[ 0.0016260147094726562, -0.0018491744995117188, -0.0273284912109375, -0.0209197998046875, -0.00310516357421875, -0.035400390625, -0.0118255615234375, 0.0118255615234375, -0.0004973411560058594, -0.0034313201904296875, -0.01366424560546875, -0.0005903244018554688, -0.01425933837890625, 0.000...
[ 10, 11, 22, 23, 47, 53, 67, 83, 112, 132, 248, 254, 261, 345, 390, 587, 645, 756, 783, 903, 959, 1221, 2367, 3638, 3714, 5281, 5423, 5428, 6238, 6626, 7704, 8999, 11782, 16750, 17311, 17376, 18784, 18811, 19283, 20028, 20209, 26950, ...
[ 0.020751953125, 0.0230712890625, 0.0673828125, 0.0947265625, 0.0068359375, 0.0966796875, 0.1044921875, 0.07421875, 0.185546875, 0.0157470703125, 0.0556640625, 0.123046875, 0.0830078125, 0.1171875, 0.0869140625, 0.1904296875, 0.010498046875, 0.06005859375, 0.09326171875, 0.00439...
b7082bde-0582-5ad8-b157-bb9820fdf11c
22,617
0
Title: Format numbers to strings in Python I need to find out how to format numbers as strings. My code is here: return str(hours)+":"+str(minutes)+":"+str(seconds)+" "+ampm Hours and minutes are integers, and seconds is a float. the str() function will convert all of these numbers to the tenths (0.1) place. So in...
136
144
[ "python" ]
[ "python", "string-formatting" ]
{"accepted_answer_id":22624,"answer_count":9,"chunk_count":1,"chunk_index":0,"closed_date":"2022-09-04T05:01:36.613000+00:00","creation_date":"2008-08-22T15:10:46.360000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2024-03-11T23:22:03.083000+00:00","last_edit_date":"20...
[ 0.016510009765625, -0.029815673828125, -0.029693603515625, -0.00789642333984375, 0.01288604736328125, -0.0180511474609375, -0.0157928466796875, 0.01407623291015625, -0.014373779296875, 0.0005755424499511719, 0.016632080078125, 0.0137786865234375, 0.0159149169921875, -0.0193634033203125, ...
[ 7, 23, 39, 47, 70, 83, 132, 136, 237, 257, 363, 418, 497, 621, 756, 892, 927, 1294, 1328, 1492, 1810, 3592, 3642, 3687, 3688, 3871, 7413, 7704, 8368, 9297, 9384, 12824, 14633, 18151, 21917, 25133, 26255, 26451, 30646, 32354, 35773, 44...
[ 0.1259765625, 0.05615234375, 0.091796875, 0.14453125, 0.00341796875, 0.0235595703125, 0.1142578125, 0.0576171875, 0.1171875, 0.07177734375, 0.002685546875, 0.080078125, 0.125, 0.030517578125, 0.01318359375, 0.08984375, 0.12109375, 0.05517578125, 0.0654296875, 0.1318359375, 0....
b1579508-155b-5b93-9ed9-427248ce3d60
22,676
0
Title: How to download a file over HTTP? I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes. The text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows .bat ...
131
141
[ "python" ]
[ "python", "http", "urllib" ]
{"accepted_answer_id":22682,"answer_count":31,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T15:34:13.760000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2025-06-09T19:57:11.090000+00:00","last_edit_date":"2021-02-25T21:56:26.147000+00:...
[ -0.024078369140625, -0.0172882080078125, -0.03765869140625, -0.0011844635009765625, 0.0019664764404296875, -0.04315185546875, 0.0023097991943359375, 0.01036834716796875, -0.0255126953125, 0.0044403076171875, -0.0167999267578125, -0.0131683349609375, 0.03839111328125, -0.03240966796875, 0...
[ 5, 23, 47, 54, 148, 363, 645, 939, 1295, 2806, 2848, 3642, 3773, 3794, 3917, 4165, 4527, 7026, 7413, 7986, 8561, 9433, 10646, 11249, 11435, 12601, 17368, 19336, 19537, 20653, 28282, 45367, 46132, 48962, 49814, 59121, 64194, 70634, 72975, ...
[ 0.0301513671875, 0.0634765625, 0.0205078125, 0.04296875, 0.125, 0.1845703125, 0.115234375, 0.0712890625, 0.005126953125, 0.0126953125, 0.177734375, 0.07421875, 0.1337890625, 0.265625, 0.013427734375, 0.0869140625, 0.06640625, 0.2392578125, 0.00732421875, 0.1015625, 0.06787109...
59873787-ddf5-50ea-8f8b-dbaa0a7516a4
23,397
0
Title: What's the best way to duplicate fork() in windows? How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python? I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic...
77
88
[ "python" ]
[ "python", "windows", "process", "subprocess", "fork" ]
{"accepted_answer_id":null,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-22T20:27:46.767000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2021-05-04T07:51:15.730000+00:00","last_edit_date":"2014-02-12T21:29:00.603000+00:0...
[ -0.0233154296875, 0.0022335052490234375, 0.0081634521484375, -0.0150909423828125, 0.041900634765625, -0.054656982421875, 0.00839996337890625, -0.01094818115234375, 0.01715087890625, -0.00508880615234375, -0.031707763671875, 0.01715087890625, 0.041656494140625, -0.004261016845703125, 0.01...
[ 13, 16, 23, 47, 67, 70, 92, 98, 100, 132, 159, 2481, 2965, 3288, 3773, 3789, 3917, 4865, 5201, 5426, 11249, 11782, 12960, 15490, 17368, 19686, 29479, 29908, 31577, 42238, 46389, 48962, 54825, 55300, 62775, 63769, 71924, 74220, 82761, 8699...
[ 0.09765625, 0.038818359375, 0.1064453125, 0.062255859375, 0.1435546875, 0.0157470703125, 0.2138671875, 0.0947265625, 0.1845703125, 0.1748046875, 0.037841796875, 0.0166015625, 0.10107421875, 0.1689453125, 0.2177734375, 0.042236328125, 0.06884765625, 0.0147705078125, 0.04443359375,...
cfb04618-8b98-5a3b-9bae-04a6449b9a49
24,193
0
Title: Python code generator for Visual Studio? I had an idea, if I add a python .py file to my C# project, and tag the file with a custom generator that would execute the python file, and treat the output as the result of the code generation, ie. put it into a C# file, that would allow me to do quite a lot of code ge...
105
106
[ "python" ]
[ "python", "visual-studio-2008", "code-generation" ]
{"accepted_answer_id":24248,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-23T12:41:43.433000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2008-10-21T20:30:33.330000+00:00","last_edit_date":"2008-08-25T12:20:11.487000+00:0...
[ -0.0152435302734375, 0.002864837646484375, 0.0032787322998046875, 0.00576019287109375, 0.0281219482421875, -0.032379150390625, 0.00897979736328125, 0.047271728515625, 0.00555419921875, 0.0262298583984375, -0.00572967529296875, 0.0170135498046875, 0.024932861328125, 0.006557464599609375, ...
[ 5, 10, 100, 313, 2021, 3714, 3934, 4904, 5915, 6493, 6528, 7909, 11435, 13452, 15190, 16750, 17198, 18151, 22968, 32316, 45367, 48962, 50828, 58093, 63769, 71924, 73372, 85689, 114122, 140992, 145581, 145823 ]
[ 0.0302734375, 0.007568359375, 0.072265625, 0.002685546875, 0.1962890625, 0.002197265625, 0.0181884765625, 0.1123046875, 0.046875, 0.1494140625, 0.0625, 0.0966796875, 0.1298828125, 0.056884765625, 0.0732421875, 0.0654296875, 0.0908203125, 0.2109375, 0.193359375, 0.053955078125, ...
b3499021-111a-54d3-849c-9e71ec41bc63
24,931
0
Title: How to capture Python interpreter's and/or CMD.EXE's output from a Python script? Is it possible to capture Python interpreter's output from a Python script? Is it possible to capture Windows CMD's output from a Python script? If so, which librar(y|ies) should I look into?
68
76
[ "python" ]
[ "python", "windows", "cmd" ]
{"accepted_answer_id":24949,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-24T08:46:57.293000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-06-07T16:40:09.523000+00:00","last_edit_date":"2008-08-24T10:29:08.517000+00:0...
[ -0.00531005859375, -0.027618408203125, -0.0213623046875, 0.0011434555053710938, 0.007183074951171875, -0.07855224609375, 0.006320953369140625, 0.03167724609375, -0.004940032958984375, 0.0026702880859375, -0.0239410400390625, 0.0176849365234375, 0.041015625, -0.003360748291015625, 0.01963...
[ 42, 47, 53, 56, 313, 647, 1295, 3387, 3773, 3934, 7722, 11249, 26499, 26939, 29481, 35773, 44644, 48962, 58745, 140992, 141621, 145581 ]
[ 0.053955078125, 0.050048828125, 0.0693359375, 0.115234375, 0.0296630859375, 0.06884765625, 0.0771484375, 0.126953125, 0.12109375, 0.011962890625, 0.1142578125, 0.0771484375, 0.212890625, 0.0703125, 0.1826171875, 0.1484375, 0.1884765625, 0.0279541015625, 0.025390625, 0.201171875...
6674da41-b156-5991-af41-1618ca0c450d
25,116
0
Title: Binary buffer in Python In Python you can use StringIO for a file-like buffer for character data. Memory-mapped file basically does similar thing for binary data, but it requires a file that is used as the basis. Does Python have a file object that is intended for binary data and is memory only, equivalent to J...
97
114
[ "python" ]
[ "python", "binary", "io", "buffer" ]
{"accepted_answer_id":7357938,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-24T15:37:50.787000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2014-11-02T03:37:41.497000+00:00","last_edit_date":"2014-11-02T02:19:48.950000+00...
[ -0.00882720947265625, 0.0002684593200683594, -0.016357421875, 0.0148162841796875, -0.00853729248046875, -0.0322265625, -0.01055145263671875, 0.033416748046875, 0.029510498046875, 0.01055145263671875, -0.031524658203125, 0.0004260540008544922, 0.01303863525390625, -0.0178985595703125, 0.0...
[ 7, 23, 67, 83, 100, 192, 214, 373, 567, 765, 831, 1294, 2053, 2394, 3311, 3444, 4527, 4734, 5062, 6635, 7077, 7092, 7614, 10931, 11435, 11814, 17780, 18231, 18234, 21373, 23351, 28282, 36746, 41925, 48398, 48962, 54092, 58437, 62816, 7985...
[ 0.00048828125, 0.05615234375, 0.064453125, 0.010009765625, 0.06005859375, 0.146484375, 0.0732421875, 0.10546875, 0.078125, 0.04833984375, 0.05615234375, 0.11328125, 0.103515625, 0.1767578125, 0.05908203125, 0.0289306640625, 0.09375, 0.0859375, 0.119140625, 0.1298828125, 0.027...
5262f4b8-7d09-5df6-9168-a6fd5fbf72b0
25,661
0
Title: pyGame within a pyGTK application What is the best way to use PyGame (SDL) within a PyGTK application? I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events.
64
69
[ "python" ]
[ "python", "gtk", "pygtk", "sdl", "pygame" ]
{"accepted_answer_id":null,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-25T04:36:48.980000+00:00","has_accepted_answer":false,"is_closed":false,"languages":["python"],"last_activity_date":"2013-11-08T13:51:30.673000+00:00","last_edit_date":"2008-08-25T08:31:28.477000+00:0...
[ 0.0131378173828125, 0.0217132568359375, -0.0038394927978515625, -0.00087738037109375, 0.0213470458984375, -0.05902099609375, -0.01025390625, -0.00740814208984375, -0.01163482666015625, -0.0022487640380859375, 0.00821685791015625, 0.019317626953125, 0.0035247802734375, -0.005428314208984375...
[ 10, 16, 23, 47, 70, 136, 159, 294, 527, 724, 765, 2965, 3917, 4527, 5701, 15044, 16128, 17198, 19048, 27502, 27512, 28032, 29735, 38415, 47353, 48962, 55300, 76896, 107576, 111240, 114864, 157318, 188304 ]
[ 0.012451171875, 0.041015625, 0.021240234375, 0.037353515625, 0.002685546875, 0.0252685546875, 0.0654296875, 0.07861328125, 0.041748046875, 0.0966796875, 0.03369140625, 0.1083984375, 0.06591796875, 0.14453125, 0.00390625, 0.002197265625, 0.1376953125, 0.1708984375, 0.021484375, ...
3001dc7f-3a79-59a2-9979-e755d32f2201
25,665
0
Title: Python module for converting PDF to text Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use.
54
55
[ "python" ]
[ "python", "pdf", "text-extraction", "pdf-scraping" ]
{"accepted_answer_id":25689,"answer_count":13,"chunk_count":1,"chunk_index":0,"closed_date":"2015-03-25T13:35:02.287000+00:00","creation_date":"2008-08-25T04:44:06.090000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2020-05-18T17:56:23.060000+00:00","last_edit_date":"2...
[ -0.0204010009765625, -0.006778717041015625, -0.01197052001953125, -0.0308837890625, 0.004184722900390625, -0.033233642578125, -0.007221221923828125, 0.0290069580078125, -0.01349639892578125, -0.01049041748046875, -0.0201568603515625, 0.01885986328125, 0.041748046875, -0.016387939453125, ...
[ 47, 100, 110, 111, 214, 2499, 2685, 3934, 4527, 6859, 7986, 14037, 15483, 17198, 17721, 18151, 32628, 37842, 42902, 48962, 50828, 63847, 84189, 88996, 96760, 102158, 139392, 145581 ]
[ 0.1240234375, 0.03515625, 0.02392578125, 0.03564453125, 0.042236328125, 0.07470703125, 0.0537109375, 0.1162109375, 0.08935546875, 0.27734375, 0.251953125, 0.0155029296875, 0.26171875, 0.1357421875, 0.150390625, 0.1181640625, 0.158203125, 0.07470703125, 0.1181640625, 0.038085937...
570428ce-462a-52fa-acbb-af0adaeebe05
25,807
0
Title: Python super class reflection If I have Python code class A(): pass class B(): pass class C(A, B): pass and I have class C, is there a way to iterate through it's super classed (A and B)? Something like pseudocode: >>> magicGetSuperClasses(C) (<type 'A'>, <type 'B'>) One solution seems to be...
149
162
[ "python" ]
[ "python", "reflection" ]
{"accepted_answer_id":25815,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-25T09:06:16.087000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2011-09-25T02:46:55.227000+00:00","last_edit_date":"2008-08-25T09:21:10.293000+00:0...
[ -0.0019969940185546875, -0.015594482421875, -0.0053863525390625, -0.004291534423828125, -0.004413604736328125, -0.039337158203125, 0.01540374755859375, -0.005573272705078125, 0.015777587890625, -0.001644134521484375, -0.0247955322265625, 0.024169921875, -0.001644134521484375, 0.01152038574...
[ 10, 17, 31, 36, 47, 53, 62, 67, 71, 100, 126, 136, 284, 313, 335, 441, 571, 724, 765, 1601, 1830, 2046, 2077, 2389, 2685, 3378, 3794, 3917, 6561, 8305, 8560, 10644, 18151, 18507, 23831, 27875, 29806, 30646, 32354, 34937, 37202, 40899,...
[ 0.04052734375, 0.038818359375, 0.12109375, 0.1416015625, 0.026611328125, 0.0216064453125, 0.05322265625, 0.1279296875, 0.0966796875, 0.002197265625, 0.0439453125, 0.1083984375, 0.0634765625, 0.1494140625, 0.1201171875, 0.0986328125, 0.0703125, 0.0107421875, 0.0286865234375, 0.2...
70752190-df60-5bc3-980e-873b94924852
26,025
0
Title: Cleanest & Fastest server setup for Django I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: Easy to set up Fast and easy on resou...
255
275
[ "python" ]
[ "python", "django", "apache", "hosting" ]
{"accepted_answer_id":29748,"answer_count":13,"chunk_count":1,"chunk_index":0,"closed_date":"2014-12-05T21:28:02.420000+00:00","creation_date":"2008-08-25T13:28:41.150000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2014-12-05T20:41:17.660000+00:00","last_edit_date":"2...
[ -0.0094146728515625, 0.007534027099609375, -0.037200927734375, 0.0010957717895507812, 0.005413055419921875, -0.046142578125, -0.01312255859375, 0.01247406005859375, 0.0268402099609375, -0.033203125, -0.032958984375, 0.01136016845703125, 0.03814697265625, 0.035064697265625, -0.00030899047...
[ 47, 53, 73, 83, 98, 100, 136, 158, 166, 234, 425, 525, 619, 678, 735, 1257, 1430, 1672, 1764, 1884, 2450, 2661, 2806, 2811, 3129, 3871, 4027, 4527, 5423, 5465, 5701, 6493, 6494, 9795, 10723, 12319, 13158, 14537, 15400, 15787, 16487, 1...
[ 0.0556640625, 0.1923828125, 0.1376953125, 0.0247802734375, 0.0400390625, 0.058837890625, 0.01220703125, 0.1279296875, 0.0341796875, 0.059326171875, 0.150390625, 0.1064453125, 0.04296875, 0.013916015625, 0.234375, 0.009521484375, 0.18359375, 0.00244140625, 0.0634765625, 0.000976...
b4a001c7-8a79-5e68-8564-b8ba0b2dee41
26,595
0
Title: Is there any difference between "foo is None" and "foo == None"? Is there any difference between: if foo is None: pass and if foo == None: pass The convention that I've seen in most Python code (and the code I myself write) is the former, but I recently came across code which uses the latter. None is an...
110
123
[ "python" ]
[ "python" ]
{"accepted_answer_id":26611,"answer_count":13,"chunk_count":1,"chunk_index":0,"closed_date":"2026-06-27T12:47:23.687000+00:00","creation_date":"2008-08-25T18:27:16.330000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2025-07-03T10:10:25.497000+00:00","last_edit_date":nu...
[ 0.0006151199340820312, -0.024505615234375, -0.03936767578125, -0.014373779296875, 0.045013427734375, -0.0301666259765625, -0.009429931640625, 0.019683837890625, -0.0149688720703125, -0.0169677734375, -0.0183868408203125, -0.008544921875, -0.0036525726318359375, 0.018035888671875, 0.03063...
[ 12, 31, 83, 86, 136, 438, 2071, 2174, 2499, 2685, 3055, 3584, 4527, 4734, 5775, 13648, 17721, 18151, 26866, 27875, 36770, 51592, 60212, 69112, 101805, 110527, 145581, 170420, 196707 ]
[ 0.060546875, 0.236328125, 0.1650390625, 0.2060546875, 0.078125, 0.1650390625, 0.025146484375, 0.1669921875, 0.080078125, 0.05810546875, 0.06494140625, 0.2158203125, 0.0283203125, 0.038818359375, 0.2138671875, 0.01611328125, 0.1396484375, 0.1240234375, 0.0966796875, 0.1962890625...
471e9969-d67d-51bd-8b4f-a6e588749338
26,706
0
Title: wxpython: How do I examine dragged data in OnDragOver? I'm a bit perplexed by drag and drop in wxPython (but perhaps this questions pertains to drag and drop in other GUI frameworks as well). The frameworks provides a couple of callbacks (OnEnter and OnDragOver) that purportedly allow me to inform the system wh...
168
195
[ "python" ]
[ "python", "user-interface", "drag-and-drop", "wxpython", "wxwidgets" ]
{"accepted_answer_id":26707,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-25T19:43:15.960000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2008-10-08T17:23:30.857000+00:00","last_edit_date":"2008-10-08T17:23:30.857000+00:0...
[ 0.01009368896484375, 0.00007790327072143555, 0.005702972412109375, -0.0133209228515625, 0.00890350341796875, -0.0213775634765625, 0.01445770263671875, 0.022216796875, 0.008544921875, 0.0223388671875, 0.01129150390625, 0.006389617919921875, 0.01511383056640625, -0.018280029296875, 0.01744...
[ 53, 136, 148, 425, 683, 959, 1957, 2053, 2161, 3687, 3688, 3714, 4902, 5021, 5426, 6493, 8180, 9966, 10625, 11249, 11782, 12620, 14315, 17704, 19069, 20320, 20779, 24911, 27402, 28032, 30646, 35604, 36069, 38937, 43581, 44974, 50828, 53418, ...
[ 0.024169921875, 0.1181640625, 0.07666015625, 0.10302734375, 0.02978515625, 0.0140380859375, 0.185546875, 0.16015625, 0.13671875, 0.03369140625, 0.068359375, 0.083984375, 0.02978515625, 0.0849609375, 0.004638671875, 0.0654296875, 0.049560546875, 0.1025390625, 0.0439453125, 0.003...
ff3ddbae-b9a6-5ad5-9316-69e3c14c5f5c
27,567
0
Title: Where can I learn more about PyPy's translation function? I've been having a hard time trying to understand PyPy's translation. It looks like something absolutely revolutionary from simply reading the description, however I'm hard-pressed to find good documentation on actually translating a real world piece of ...
98
112
[ "python" ]
[ "python", "translation", "pypy" ]
{"accepted_answer_id":42689,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":"2019-12-18T10:18:13.247000+00:00","creation_date":"2008-08-26T08:40:28.853000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2009-06-25T02:07:47.700000+00:00","last_edit_date":nul...
[ -0.0022640228271484375, 0.003269195556640625, -0.006893157958984375, -0.007633209228515625, 0.01195526123046875, -0.0662841796875, -0.00952911376953125, 0.0272216796875, 0.00833892822265625, -0.01189422607421875, -0.028167724609375, 0.00411224365234375, 0.026031494140625, -0.02769470214843...
[ 47, 53, 143, 645, 683, 831, 1286, 1733, 1884, 1916, 2773, 3900, 4127, 6044, 6635, 7413, 7941, 8999, 9790, 9851, 11856, 13580, 16454, 18151, 20653, 27512, 28219, 30698, 31577, 32316, 32354, 33342, 35978, 47599, 51521, 63847, 76811, 78662, 98...
[ 0.09228515625, 0.212890625, 0.1630859375, 0.0169677734375, 0.1845703125, 0.0164794921875, 0.0712890625, 0.04345703125, 0.03759765625, 0.0654296875, 0.06640625, 0.1416015625, 0.0302734375, 0.0206298828125, 0.000244140625, 0.0206298828125, 0.04443359375, 0.0751953125, 0.06591796875...
ef5402e3-a2b2-5902-91e9-bc19d461aa12
28,165
0
Title: Does PHP have an equivalent to this type of Python string substitution? Python has this wonderful way of handling string substitutions using dictionaries: >>> 'The %(site)s site %(adj)s because it %(adj)s' % {'site':'Stackoverflow', 'adj':'rocks'} 'The Stackoverflow site rocks because it rocks' I love this ...
138
173
[ "php", "python" ]
[ "php", "python", "string" ]
{"accepted_answer_id":28247,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-26T14:20:48.910000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["php","python"],"last_activity_date":"2025-06-25T00:05:00.810000+00:00","last_edit_date":"2025-06-25T00:05:00.81000...
[ 0.0023975372314453125, -0.0209808349609375, -0.00032973289489746094, 0.01441192626953125, 0.037139892578125, -0.017486572265625, -0.002216339111328125, 0.0013418197631835938, -0.0182037353515625, -0.003662109375, -0.0306243896484375, 0.033050537109375, 0.003948211669921875, -0.022552490234...
[ 7, 11, 23, 45, 47, 54, 92, 170, 434, 442, 645, 712, 756, 765, 831, 903, 1556, 1745, 1764, 1830, 2594, 3687, 3917, 3957, 5161, 5465, 6512, 6637, 8562, 10484, 10644, 10763, 11090, 12319, 13950, 17368, 17514, 19364, 21373, 24145, 26267, ...
[ 0.1259765625, 0.08203125, 0.0029296875, 0.07763671875, 0.010498046875, 0.007080078125, 0.0198974609375, 0.1689453125, 0.02392578125, 0.1015625, 0.06298828125, 0.0556640625, 0.04296875, 0.0595703125, 0.028564453125, 0.0986328125, 0.027099609375, 0.1220703125, 0.17578125, 0.08447...
fd3bbce2-cd26-5fe3-8e02-a166cda67d0d
28,369
0
Title: Is "safe_eval" really safe? I'm looking for a "safe" eval function, to implement spreadsheet-like calculations (using numpy/scipy). The functionality to do this (the rexec module) has been removed from Python since 2.3 due to apparently unfixable security problems. There are several third-party hacks out ther...
162
180
[ "python" ]
[ "python", "security" ]
{"accepted_answer_id":32028,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-26T15:27:03.587000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2012-11-03T18:04:37.997000+00:00","last_edit_date":"2008-09-07T01:44:49.767000+00:0...
[ 0.0105133056640625, 0.006465911865234375, -0.040863037109375, -0.0021419525146484375, 0.039703369140625, -0.051971435546875, 0.0029087066650390625, 0.00909423828125, -0.0034999847412109375, 0.010101318359375, -0.044403076171875, 0.037322998046875, 0.004634857177734375, 0.004016876220703125...
[ 13, 28, 53, 58, 100, 126, 297, 366, 454, 853, 903, 1081, 1295, 1405, 2022, 2071, 2189, 2481, 2684, 2809, 2831, 3240, 4527, 5062, 5256, 5880, 6183, 6493, 6982, 7816, 8137, 10002, 11522, 12720, 13269, 16487, 16792, 17569, 18151, 21373, 29...
[ 0.142578125, 0.1171875, 0.048828125, 0.107421875, 0.005615234375, 0.0791015625, 0.041748046875, 0.0966796875, 0.031494140625, 0.03125, 0.06982421875, 0.1826171875, 0.06494140625, 0.3046875, 0.0184326171875, 0.08251953125, 0.1328125, 0.0830078125, 0.011962890625, 0.05615234375, ...
5d9ad297-4678-5b82-bac3-61c4750e703a
28,559
0
Title: Most Pythonic way equivalent for: while ((x = next()) != END) What's the best Python idiom for this C construct? while ((x = next()) != END) { .... } I don't have the ability to recode next(). update: and the answer from seems to be: for x in iter(next, END): ....
82
91
[ "c", "python" ]
[ "c", "python" ]
{"accepted_answer_id":28714,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-26T16:37:52.263000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["c","python"],"last_activity_date":"2009-01-13T21:27:28.583000+00:00","last_edit_date":"2009-01-13T21:27:28.583000+...
[ -0.0175323486328125, -0.013031005859375, 0.005359649658203125, -0.00577545166015625, 0.00565338134765625, -0.052581787109375, 0.004352569580078125, 0.006336212158203125, 0.0156402587890625, -0.01207733154296875, -0.00782012939453125, -0.01421356201171875, 0.00371551513671875, -0.0324401855...
[ 17, 23, 70, 86, 100, 112, 132, 153, 306, 313, 425, 711, 720, 903, 1022, 1295, 1369, 1771, 2077, 2203, 2965, 3917, 11737, 12960, 13373, 17006, 29062, 33844, 35166, 37202, 39015, 48962, 60494, 64549, 81273, 145581, 183234 ]
[ 0.02197265625, 0.07666015625, 0.04541015625, 0.1103515625, 0.1533203125, 0.0869140625, 0.13671875, 0.027587890625, 0.23046875, 0.1064453125, 0.1650390625, 0.123046875, 0.236328125, 0.05615234375, 0.1279296875, 0.0673828125, 0.0732421875, 0.0966796875, 0.009765625, 0.1279296875,...
b121a8a6-3e2a-5c8d-8f61-75d848cc5d02
28,668
0
Title: Best way to extract data from a FileMaker Pro database in a script? My job would be easier, or at least less tedious if I could come up with an automated way (preferably in a Python script) to extract useful information from a FileMaker Pro database. I am working on Linux machine and the FileMaker database is o...
346
386
[ "perl", "python" ]
[ "python", "linux", "perl", "scripting", "filemaker" ]
{"accepted_answer_id":28692,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-26T17:20:47.557000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["perl","python"],"last_activity_date":"2009-06-24T17:37:14.203000+00:00","last_edit_date":"2008-09-12T17:49:10.1730...
[ -0.0307464599609375, -0.0294342041015625, -0.0343017578125, -0.03216552734375, -0.00222015380859375, -0.0033359527587890625, 0.0098876953125, 0.01024627685546875, -0.002933502197265625, 0.0350341796875, -0.016204833984375, 0.00222015380859375, 0.026336669921875, -0.00780487060546875, -0....
[ 41, 53, 56, 71, 141, 366, 390, 831, 908, 1193, 1250, 1295, 1466, 1961, 1992, 2046, 2053, 2174, 2806, 2875, 2965, 3535, 3789, 3917, 4000, 4527, 4677, 4734, 4867, 5670, 5701, 6275, 11205, 11345, 11374, 11408, 11787, 12447, 12684, 13409, 1...
[ 0.06884765625, 0.107421875, 0.150390625, 0.015869140625, 0.1796875, 0.0242919921875, 0.0174560546875, 0.005859375, 0.177734375, 0.07470703125, 0.2158203125, 0.0703125, 0.051025390625, 0.032958984375, 0.002197265625, 0.1162109375, 0.1552734375, 0.006103515625, 0.0247802734375, 0...
1db1bb5c-5489-58b2-897d-b4be20574827
28,796
0
Title: What refactoring tools do you use for Python? I have a bunch of classes I want to rename. Some of them have names that are small and that name is reused in other class names, where I don't want that name changed. Most of this lives in Python code, but we also have some XML code that references class names. Si...
149
166
[ "python" ]
[ "python", "refactoring" ]
{"accepted_answer_id":29770,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":"2019-12-18T10:18:39.327000+00:00","creation_date":"2008-08-26T18:26:51.517000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2019-05-08T07:38:27.940000+00:00","last_edit_date":"20...
[ -0.0036830902099609375, -0.0193634033203125, -0.0108795166015625, -0.005889892578125, 0.0305328369140625, -0.0250091552734375, 0.0306549072265625, 0.0157470703125, -0.0019235610961914062, -0.00787353515625, -0.029937744140625, 0.006011962890625, 0.013763427734375, -0.01461029052734375, 0...
[ 18, 23, 47, 100, 107, 136, 214, 284, 398, 456, 678, 683, 1505, 2060, 2940, 3444, 4527, 4865, 5962, 9351, 10763, 11627, 16981, 17006, 17932, 18151, 18507, 19336, 23935, 30022, 33740, 33938, 35159, 44691, 48962, 60525, 60552, 60742, 61112, ...
[ 0.03515625, 0.00537109375, 0.028076171875, 0.037109375, 0.049560546875, 0.029541015625, 0.1328125, 0.1162109375, 0.012451171875, 0.1650390625, 0.034912109375, 0.0184326171875, 0.154296875, 0.05078125, 0.05615234375, 0.0849609375, 0.126953125, 0.06884765625, 0.0751953125, 0.0649...
c77e33ad-9f7e-5d98-a5b7-aa386c4184f5
28,961
0
Title: What's the best way to use web services in python? I have a medium sized application that runs as a .net web-service which I do not control, and I want to create a loose pythonic API above it to enable easy scripting. I wanted to know what is the best/most practical solution for using web-services in python. ...
92
106
[ "python" ]
[ "python", "web-services", "soap" ]
{"accepted_answer_id":322393,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-26T19:49:54.517000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2015-11-02T06:26:22.957000+00:00","last_edit_date":"2009-03-27T02:58:15+00:00","qu...
[ -0.0276336669921875, -0.00206756591796875, -0.0277557373046875, 0.00879669189453125, 0.006732940673828125, -0.06048583984375, 0.01441192626953125, 0.01654052734375, -0.01346588134765625, 0.0124053955078125, -0.0291748046875, -0.0033817291259765625, 0.0270538330078125, 0.0194854736328125, ...
[ 5, 7, 9, 18, 22, 23, 47, 54, 70, 83, 87, 100, 110, 184, 214, 221, 237, 645, 765, 840, 959, 1179, 1467, 1771, 2367, 2631, 2886, 2965, 3444, 3714, 3871, 3917, 4527, 4865, 5078, 6226, 11374, 13267, 17198, 17368, 18588, 22584, 23468, ...
[ 0.0009765625, 0.001708984375, 0.0181884765625, 0.050537109375, 0.005615234375, 0.0986328125, 0.076171875, 0.035400390625, 0.0517578125, 0.0264892578125, 0.021728515625, 0.03515625, 0.048583984375, 0.09765625, 0.009033203125, 0.0869140625, 0.01220703125, 0.036865234375, 0.05053710...
3ad1bdf1-9921-5c7f-bcc8-547892ec5c2a
29,243
0
Title: How do I create an xml document in python Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document() node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) when I r...
164
192
[ "python" ]
[ "python", "xml" ]
{"accepted_answer_id":29255,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-27T00:21:35.643000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2020-12-27T16:00:30.793000+00:00","last_edit_date":"2012-10-29T21:12:59.370000+00:0...
[ -0.009979248046875, 0.019012451171875, -0.0082550048828125, -0.01241302490234375, 0.0018787384033203125, -0.07696533203125, 0.01568603515625, 0.00754547119140625, -0.0161590576171875, 0.0298309326171875, 0, 0.00855255126953125, -0.0007424354553222656, 0.006504058837890625, 0.021865844726...
[ 5, 10, 23, 31, 32, 54, 73, 87, 110, 112, 142, 157, 271, 738, 959, 1003, 1284, 1295, 1299, 1672, 1679, 1884, 2046, 2182, 2203, 2806, 3249, 3584, 3611, 3642, 3815, 4488, 7612, 7986, 9007, 9222, 9969, 11249, 11389, 11627, 11675, 12937, ...
[ 0.001953125, 0.00830078125, 0.035400390625, 0.1279296875, 0.0272216796875, 0.05126953125, 0.06884765625, 0.043212890625, 0.208984375, 0.205078125, 0.011962890625, 0.1357421875, 0.06005859375, 0.001708984375, 0.038330078125, 0.10595703125, 0.003173828125, 0.04443359375, 0.21191406...
e89b2a42-24b4-5b35-a6a3-888f01ee457f
29,562
0
Title: How to use Python distutils? I wrote a quick program in Python to add a gtk GUI to a cli program. How can I create an installer using distutils? Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. My goal is to create a .deb pack...
95
108
[ "python" ]
[ "python", "linux", "installation", "debian", "distutils" ]
{"accepted_answer_id":29575,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-27T05:03:07.993000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2025-05-20T00:40:12.933000+00:00","last_edit_date":"2025-05-20T00:40:12.933000+00:0...
[ -0.021575927734375, 0.01197052001953125, -0.032470703125, 0.0008778572082519531, 0.0116729736328125, -0.0447998046875, 0.005096435546875, 0.0247650146484375, -0.00948333740234375, -0.00888824462890625, 0.0006961822509765625, 0.033172607421875, 0.0280914306640625, -0.02239990234375, 0.023...
[ 5, 7, 23, 34, 45, 47, 93, 100, 142, 262, 425, 661, 706, 831, 1528, 1660, 3249, 3611, 3675, 4027, 4313, 4527, 4734, 11249, 12912, 13315, 13651, 15190, 17368, 28219, 28282, 31472, 41421, 43240, 47923, 48962, 54397, 62806, 63773, 69236, 72...
[ 0.0301513671875, 0.1650390625, 0.041259765625, 0.062255859375, 0.150390625, 0.05859375, 0.0732421875, 0.010986328125, 0.04052734375, 0.0947265625, 0.09765625, 0.0147705078125, 0.0380859375, 0.052734375, 0.1220703125, 0.000244140625, 0.1005859375, 0.1142578125, 0.240234375, 0.09...
89f1b20c-0972-50c1-9dde-68462a1ade14
29,856
0
Title: Install Python to match directory layout in OS X 10.5 The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from...
175
175
[ "python" ]
[ "python", "macos", "64-bit" ]
{"accepted_answer_id":31384,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-27T10:22:09.427000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2017-04-10T18:29:51.837000+00:00","last_edit_date":"2017-04-10T18:29:51.837000+00:0...
[ -0.035919189453125, -0.004608154296875, -0.043487548828125, -0.028472900390625, -0.022918701171875, -0.01300048828125, -0.008331298828125, 0.0244598388671875, 0.0128173828125, -0.037567138671875, -0.0021572113037109375, 0.0168914794921875, 0.0197296142578125, -0.00022339820861816406, 0.0...
[ 21, 47, 53, 54, 83, 98, 136, 360, 373, 532, 683, 758, 759, 787, 1193, 1295, 1340, 1430, 1764, 1810, 2241, 2663, 2789, 3444, 3701, 3917, 4068, 4488, 4785, 7911, 8035, 9795, 9969, 11015, 11249, 11675, 11787, 12233, 13736, 14364, 14858, ...
[ 0.0791015625, 0.072265625, 0.1259765625, 0.0169677734375, 0.0087890625, 0.0291748046875, 0.083984375, 0.0177001953125, 0.06591796875, 0.07373046875, 0.038330078125, 0.23046875, 0.099609375, 0.1201171875, 0.1279296875, 0.034423828125, 0.032470703125, 0.126953125, 0.068359375, 0....
c7725b30-d61b-5ac4-aa3e-b32ccc154678
31,340
0
Title: How do threads work in Python, and what are common Python-threading specific pitfalls? I've been trying to wrap my head around how threads work in Python, and it's hard to find good information on how they operate. I may just be missing a link or something, but it seems like the official documentation isn't ver...
152
160
[ "python" ]
[ "python", "multithreading" ]
{"accepted_answer_id":31398,"answer_count":7,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-27T23:44:47.843000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2018-03-30T11:47:11.123000+00:00","last_edit_date":"2010-09-11T20:31:26.950000+00:0...
[ 0.0007200241088867188, 0.0221099853515625, -0.03369140625, 0, 0.0208282470703125, -0.043060302734375, -0.00015175342559814453, -0.00334930419921875, 0.0233917236328125, -0.0144500732421875, -0.0115203857421875, 0.032989501953125, -0.0207061767578125, 0.01175689697265625, 0.03065490722656...
[ 7, 23, 54, 90, 209, 214, 221, 678, 831, 927, 1632, 1836, 3126, 3642, 4127, 4488, 4677, 4734, 7941, 10336, 11249, 11675, 11907, 13380, 17368, 24145, 26267, 29458, 36457, 39116, 39210, 44402, 48962, 49269, 51042, 51521, 86997, 101089, 132283,...
[ 0.162109375, 0.08056640625, 0.07568359375, 0.03173828125, 0.142578125, 0.0400390625, 0.017578125, 0.043701171875, 0.07568359375, 0.07373046875, 0.142578125, 0.0299072265625, 0.0205078125, 0.051025390625, 0.002197265625, 0.1640625, 0.04296875, 0.05078125, 0.0380859375, 0.0163574...
827261f8-170e-5ffa-9e21-feeac3317ac7
31,412
0
Title: Proprietary plug-ins for GPL programs: what about interpreted languages? I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is what the FSF has to say on the issue: If a program released under the GPL uses plug-ins, what are t...
390
464
[ "python" ]
[ "python", "plugins", "open-source", "licensing", "interpreted-language" ]
{"accepted_answer_id":31421,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":"2015-06-16T03:57:01.813000+00:00","creation_date":"2008-08-28T00:26:35.390000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2018-06-19T16:14:02.490000+00:00","last_edit_date":"20...
[ -0.006191253662109375, -0.00039267539978027344, 0.01149749755859375, -0.0020294189453125, 0.025482177734375, -0.0177764892578125, -0.01404571533203125, 0.0218048095703125, -0.0283203125, -0.02227783203125, -0.0260772705078125, 0.049774169921875, 0.01345062255859375, 0.00004607439041137695,...
[ 7, 9, 18, 23, 53, 64, 73, 92, 100, 110, 150, 214, 297, 527, 563, 645, 1119, 1272, 1379, 1528, 1672, 1940, 2053, 2367, 2396, 2737, 2965, 3126, 3173, 3240, 3714, 4092, 4527, 5201, 5425, 6635, 8110, 9969, 11001, 11782, 12008, 15277, 15...
[ 0.037841796875, 0.12890625, 0.03369140625, 0.00927734375, 0.072265625, 0.0712890625, 0.1787109375, 0.15625, 0.162109375, 0.021728515625, 0.009765625, 0.041748046875, 0.087890625, 0.1083984375, 0.0245361328125, 0.041748046875, 0.08203125, 0.138671875, 0.10546875, 0.169921875, ...
0cb1ffb2-41db-510a-a782-0ab07c5376b9
31,875
0
Title: Is there a simple, elegant way to define singletons? There seem to be many ways to define singletons in Python. Is there a consensus opinion on Stack Overflow?
38
41
[ "python" ]
[ "python", "design-patterns", "singleton" ]
{"accepted_answer_id":31887,"answer_count":21,"chunk_count":1,"chunk_index":0,"closed_date":"2018-05-28T15:26:22.057000+00:00","creation_date":"2008-08-28T09:03:09.827000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2024-07-18T20:04:37.760000+00:00","last_edit_date":"2...
[ 0.030731201171875, 0.0128631591796875, -0.004703521728515625, 0.006908416748046875, 0.035003662109375, -0.02667236328125, -0.0190582275390625, 0.0114898681640625, 0.01482391357421875, 0.0019350051879882812, -0.0296478271484375, 0.0189361572265625, -0.0005655288696289062, 0.0018901824951171...
[ 7, 47, 2594, 3917, 5941, 6512, 8781, 9578, 11001, 27650, 33153, 48322, 48903, 61924, 67772, 118664, 133238, 145581 ]
[ 0.040283203125, 0.0048828125, 0.0242919921875, 0.049560546875, 0.04443359375, 0.00634765625, 0.12890625, 0.0257568359375, 0.228515625, 0.171875, 0.0888671875, 0.080078125, 0.0078125, 0.19921875, 0.2578125, 0.09228515625, 0.107421875, 0.2431640625 ]
7286f734-bb92-5292-a9ee-8010c4b92173
32,044
0
Title: How can I render a tree structure (recursive) using a django template? I have a tree structure in memory that I would like to render in HTML using a Django template. class Node(): name = "node name" children = [] There will be some object root that is a Node, and children is a list of Nodes. root will ...
122
129
[ "python" ]
[ "python", "django" ]
{"accepted_answer_id":32125,"answer_count":10,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-28T11:43:10.287000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2019-11-06T09:41:23.303000+00:00","last_edit_date":null,"question_id":32044,"score...
[ 0.017303466796875, 0.0105743408203125, -0.02691650390625, 0.006336212158203125, -0.0065460205078125, -0.040374755859375, -0.0022068023681640625, 0.0160980224609375, 0.0228271484375, 0.0369873046875, 0.01898193359375, 0.0273895263671875, -0.0034542083740234375, 0.024749755859375, 0.004684...
[ 23, 87, 107, 112, 157, 438, 831, 988, 1884, 3917, 4127, 5303, 5844, 9351, 10941, 11249, 11522, 13648, 17368, 18507, 19097, 20020, 27803, 36049, 36746, 39424, 40908, 42459, 45646, 48650, 48962, 53201, 65998, 69307, 74855, 89159, 98323, 107473,...
[ 0.044189453125, 0.001220703125, 0.0615234375, 0.1611328125, 0.10205078125, 0.1220703125, 0.036865234375, 0.1162109375, 0.0390625, 0.0301513671875, 0.041015625, 0.1103515625, 0.1591796875, 0.087890625, 0.10546875, 0.045654296875, 0.052490234375, 0.004150390625, 0.06396484375, 0....
3de8d510-699b-54c1-83e2-1918c4091d5f
32,385
0
Title: Programmatically editing Python source This is something that I think would be very useful. Basically, I'd like there to be a way to edit Python source programmatically without requiring human intervention. There are a couple of things I would like to do with this: Edit the configuration of Python apps that ...
176
187
[ "python" ]
[ "python", "file-io" ]
{"accepted_answer_id":32402,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-28T14:23:00.247000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2015-05-03T02:57:26.957000+00:00","last_edit_date":"2015-05-03T02:57:26.957000+00:0...
[ 0.0024776458740234375, 0.00838470458984375, -0.0198211669921875, 0.006038665771484375, 0.017120361328125, -0.049468994140625, 0.017120361328125, 0.05322265625, 0.0006375312805175781, 0.0012531280517578125, -0.015716552734375, 0.046417236328125, 0.014068603515625, -0.003620147705078125, 0...
[ 10, 12, 18, 23, 25, 47, 54, 71, 100, 112, 126, 186, 214, 221, 257, 333, 450, 678, 765, 831, 903, 1257, 1884, 2499, 2685, 2806, 2982, 3293, 3917, 4027, 4527, 4552, 5115, 5351, 5423, 5426, 5809, 5915, 7730, 8966, 9803, 9844, 10644, ...
[ 0.00830078125, 0.001708984375, 0.1376953125, 0.109375, 0.03662109375, 0.0155029296875, 0.057373046875, 0.06103515625, 0.0274658203125, 0.087890625, 0.002197265625, 0.0140380859375, 0.0771484375, 0.0029296875, 0.1474609375, 0.04736328125, 0.008544921875, 0.03271484375, 0.015014648...
4b25d6e0-3b5b-5c62-9e02-d8c2c697759c
32,404
0
Title: How do you run a Python script as a service in Windows? I am sketching the architecture for a set of programs that share various interrelated objects stored in a database. I want one of the programs to act as a service which provides a higher level interface for operations on these objects, and the other progra...
258
275
[ "python" ]
[ "python", "windows", "cross-platform" ]
{"accepted_answer_id":32440,"answer_count":14,"chunk_count":1,"chunk_index":0,"closed_date":"2025-03-23T08:29:14.307000+00:00","creation_date":"2008-08-28T14:28:04.493000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2022-06-15T07:51:59.157000+00:00","last_edit_date":"2...
[ -0.0079345703125, 0.0033721923828125, -0.01169586181640625, -0.00978851318359375, 0.01384735107421875, -0.049652099609375, -0.0128326416015625, 0.041290283203125, -0.0034160614013671875, -0.033660888671875, -0.020050048828125, 0.019927978515625, 0.01300811767578125, 0.00232696533203125, ...
[ 10, 23, 24, 48, 54, 71, 73, 111, 136, 217, 237, 398, 442, 678, 759, 1300, 1528, 1940, 2071, 2831, 3444, 3642, 3773, 4034, 4331, 4343, 4516, 5426, 5608, 7722, 8060, 8305, 10176, 11249, 11374, 11675, 12008, 14578, 15490, 16981, 17203, 1...
[ 0.0908203125, 0.1259765625, 0.044189453125, 0.046142578125, 0.02490234375, 0.04345703125, 0.0211181640625, 0.026123046875, 0.010986328125, 0.1171875, 0.150390625, 0.009765625, 0.005615234375, 0.00146484375, 0.003662109375, 0.030029296875, 0.1767578125, 0.009033203125, 0.011230468...
a8f0a904-69df-5be5-ac27-67e543eac942
32,899
0
Title: How do you generate dynamic (parameterized) unit tests in Python? I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this: import unittest l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]] class TestSequence(unittest.TestCase): def te...
159
186
[ "python" ]
[ "python", "unit-testing", "parameterized-unit-test" ]
{"accepted_answer_id":32939,"answer_count":25,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-28T17:49:02.293000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2023-08-11T19:17:40.967000+00:00","last_edit_date":"2021-01-06T01:04:03.107000+00:...
[ 0.01165771484375, 0.0204010009765625, -0.0212554931640625, 0.006134033203125, 0.016998291015625, -0.03302001953125, 0.0007967948913574219, 0.01141357421875, 0.0081329345703125, 0.003520965576171875, 0.01001739501953125, 0.029510498046875, 0.0196685791015625, 0.016998291015625, 0.01001739...
[ 10, 11, 23, 31, 54, 96, 98, 100, 217, 275, 309, 441, 756, 903, 944, 1299, 1632, 1884, 2053, 2203, 2806, 3034, 3444, 3584, 5117, 6276, 6528, 6954, 6991, 7565, 8647, 8752, 9351, 11249, 11627, 12403, 12638, 15970, 18507, 24927, 24931, 25...
[ 0.001953125, 0.054931640625, 0.043212890625, 0.083984375, 0.0029296875, 0.046630859375, 0.0361328125, 0.06591796875, 0.07421875, 0.048828125, 0.109375, 0.02978515625, 0.012939453125, 0.01171875, 0.0240478515625, 0.0986328125, 0.09619140625, 0.061767578125, 0.080078125, 0.002197...
f5fe5e53-770f-5232-8a01-3c9ce26cc823
33,475
0
Title: ssh hangs when command invoked directly, but exits cleanly when run interactive I need to launch a server on the remote machine and retrieve the port number that the server process is lsitening on. When invoked, the server will listen on a random port and output the port number on stderr. I want to automate t...
354
410
[ "python" ]
[ "python", "ssh" ]
{"accepted_answer_id":33486,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-28T21:48:09.363000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2013-05-27T07:43:56.187000+00:00","last_edit_date":null,"question_id":33475,"score"...
[ -0.01236724853515625, -0.019927978515625, -0.0252227783203125, 0.0192108154296875, -0.00411224365234375, -0.027862548828125, 0.0108642578125, -0.0045318603515625, 0.0084075927734375, -0.0021762847900390625, -0.0080413818359375, 0.0211334228515625, 0.027374267578125, 0.007534027099609375, ...
[ 7, 9, 11, 13, 23, 42, 73, 91, 98, 237, 277, 297, 420, 456, 459, 915, 1003, 1010, 1264, 1284, 1295, 1495, 1528, 1614, 1660, 2021, 2256, 2389, 2886, 3134, 3229, 3355, 3444, 3650, 3871, 3996, 4527, 5570, 6138, 6493, 6835, 7643, 9433, ...
[ 0.09765625, 0.055908203125, 0.061767578125, 0.043212890625, 0.0703125, 0.0625, 0.07568359375, 0.076171875, 0.08740234375, 0.00830078125, 0.0419921875, 0.04931640625, 0.1083984375, 0.1279296875, 0.046630859375, 0.0419921875, 0.06396484375, 0.0244140625, 0.03759765625, 0.03222656...
b7cbeae8-d6d8-5e1f-85be-68eadb5101f0
33,534
0
Title: Extending base classes in Python I'm trying to extend some "base" classes in Python: class xlist (list): def len(self): return len(self) def add(self, *args): self.extend(args) return None class xint (int): def add(self, value): self += value return self ...
340
326
[ "python" ]
[ "python" ]
{"accepted_answer_id":33563,"answer_count":5,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-28T22:18:02.740000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2022-02-16T10:55:42.467000+00:00","last_edit_date":"2009-01-16T01:18:26.587000+00:0...
[ 0.0026454925537109375, 0.0243988037109375, 0.0127410888671875, 0.0090789794921875, 0.0399169921875, -0.05841064453125, 0.00962066650390625, 0.01424407958984375, 0.0019388198852539062, -0.008056640625, -0.0088958740234375, 0.01983642578125, 0.01442718505859375, 0.001705169677734375, -0.00...
[ 8, 18, 23, 67, 71, 90, 138, 190, 209, 420, 425, 510, 661, 903, 997, 1022, 1737, 1977, 2811, 3098, 3355, 3647, 3664, 3687, 3917, 4000, 4028, 4288, 5303, 5443, 5885, 6562, 7225, 7722, 9451, 10461, 10644, 11205, 15190, 15490, 15970, 1850...
[ 0.0712890625, 0.126953125, 0.0625, 0.162109375, 0.115234375, 0.041748046875, 0.0693359375, 0.08984375, 0.06689453125, 0.05517578125, 0.08203125, 0.1376953125, 0.033447265625, 0.05029296875, 0.09326171875, 0.1044921875, 0.0068359375, 0.111328125, 0.08984375, 0.1279296875, 0.04...
d57d2c71-0120-5307-b64c-3c1dc52b03c2
33,813
0
Title: What are some useful TextMate features? I noticed that many people here use TextMate for coding on OS X. I've recently started using it, and although I like its minimalistic interface, it makes it harder to stumble upon cool features if you don't know what you're looking for. So, what feature have you found m...
97
108
[ "python" ]
[ "python", "macos", "text-editor", "textmate" ]
{"accepted_answer_id":36316,"answer_count":17,"chunk_count":1,"chunk_index":0,"closed_date":"2012-03-06T03:03:17.723000+00:00","creation_date":"2008-08-29T02:03:34.070000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2011-02-22T13:29:30.193000+00:00","last_edit_date":"2...
[ 0.0051422119140625, -0.00655364990234375, -0.0122222900390625, 0.00499725341796875, 0.01486968994140625, -0.0298614501953125, 0.031280517578125, 0.0099945068359375, 0.0031452178955078125, 0.002071380615234375, -0.041595458984375, 0.0243377685546875, 0.0203399658203125, 0.01727294921875, ...
[ 98, 100, 182, 442, 552, 820, 1193, 1577, 1771, 1884, 2684, 3060, 3395, 3688, 3714, 4527, 4865, 5941, 6238, 6863, 11787, 14037, 16487, 17368, 18784, 21185, 24129, 26859, 50960, 57134, 60213, 66139, 71983, 78684, 80234, 98893, 99201, 101758, ...
[ 0.001708984375, 0.05859375, 0.023193359375, 0.0556640625, 0.203125, 0.04052734375, 0.10400390625, 0.0986328125, 0.01123046875, 0.0927734375, 0.052734375, 0.021728515625, 0.01123046875, 0.005126953125, 0.019287109375, 0.1220703125, 0.002197265625, 0.052734375, 0.146484375, 0.007...
17b65bb8-06d1-52a3-a63a-3de2e0571c26
33,978
0
Title: Find out how much memory is being used by an object in Python How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want.
73
73
[ "python" ]
[ "python", "performance", "memory-profiling" ]
{"accepted_answer_id":35645,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":"2016-11-28T23:35:43.137000+00:00","creation_date":"2008-08-29T04:59:31.200000+00:00","has_accepted_answer":true,"is_closed":true,"languages":["python"],"last_activity_date":"2024-08-23T11:31:14.657000+00:00","last_edit_date":"20...
[ 0.0306396484375, 0.004009246826171875, -0.03326416015625, 0.01027679443359375, -0.00433349609375, -0.01116180419921875, -0.004482269287109375, 0.00244903564453125, 0.0258941650390625, -0.031829833984375, -0.042999267578125, -0.0008759498596191406, 0.002079010009765625, -0.00191497802734375...
[ 10, 23, 83, 111, 390, 442, 738, 959, 1672, 1810, 2367, 2806, 3444, 3642, 3714, 5045, 6032, 6897, 7413, 7722, 8035, 11814, 18151, 20271, 26040, 34648, 36746, 46389, 48962, 90791, 98323, 145581 ]
[ 0.005859375, 0.0306396484375, 0.08203125, 0.00634765625, 0.04833984375, 0.000244140625, 0.009521484375, 0.041748046875, 0.07177734375, 0.109375, 0.004638671875, 0.041748046875, 0.0595703125, 0.0966796875, 0.02978515625, 0.1533203125, 0.04541015625, 0.08154296875, 0.09814453125, ...
3a136417-9085-5a72-ad26-5c6ed8f3c6b0
34,020
0
Title: Are Python threads buggy? A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor?
40
48
[ "python" ]
[ "python", "multithreading" ]
{"accepted_answer_id":34060,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-29T05:43:16.960000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2011-09-09T07:39:39.910000+00:00","last_edit_date":"2010-09-10T22:32:11.640000+00:0...
[ 0.0239715576171875, 0.02459716796875, -0.031524658203125, 0.0211334228515625, 0.041534423828125, -0.036834716796875, -0.0137176513671875, 0.01322174072265625, -0.003910064697265625, -0.00017571449279785156, -0.031646728515625, 0.00691986083984375, 0.0191650390625, 0.0163116455078125, 0.0...
[ 7, 47, 83, 163, 214, 373, 450, 552, 820, 831, 903, 927, 2804, 6024, 15901, 17368, 20174, 30745, 34391, 39116, 43581, 48962, 67192, 71864, 86997, 107282, 145581, 147115, 208124, 215543, 239483 ]
[ 0.083984375, 0.0234375, 0.08544921875, 0.006591796875, 0.04150390625, 0.1455078125, 0.010986328125, 0.08984375, 0.048828125, 0.02001953125, 0.021240234375, 0.1220703125, 0.04296875, 0.1748046875, 0.0947265625, 0.09619140625, 0.076171875, 0.0546875, 0.103515625, 0.21484375, 0....
8fce1a98-6715-5724-8777-e6e8eaa0c7ca
34,079
0
Title: How to specify an authenticated proxy for a python http connection? What's the best way to specify a proxy with username and password for an http connection in python?
36
45
[ "python" ]
[ "python", "http", "proxy" ]
{"accepted_answer_id":41920303,"answer_count":6,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-29T06:55:54.977000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2018-04-18T13:28:14.933000+00:00","last_edit_date":"2008-09-17T07:54:47.407000+0...
[ -0.01377105712890625, -0.0136566162109375, -0.044647216796875, -0.01323699951171875, -0.0135955810546875, -0.016387939453125, -0.03515625, 0.01216888427734375, -0.0179290771484375, -0.003101348876953125, -0.0298004150390625, 0.00890350341796875, 0.0389404296875, -0.0125274658203125, 0.01...
[ 7, 10, 100, 136, 502, 678, 1621, 2965, 3917, 11249, 11627, 17198, 18929, 27686, 38937, 40140, 48962, 50828, 50878, 78506, 94878, 195734 ]
[ 0.007568359375, 0.00146484375, 0.0291748046875, 0.052490234375, 0.169921875, 0.053955078125, 0.1904296875, 0.080078125, 0.023681640625, 0.0771484375, 0.1015625, 0.1103515625, 0.1015625, 0.0810546875, 0.10498046875, 0.1533203125, 0.044677734375, 0.189453125, 0.29296875, 0.212890...
8fce3d72-a600-5075-a729-af67f3d08bab
34,209
0
Title: Django ImageField core=False in newforms admin In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields. I get the following error: TypeError: __init__() got an unexpected keyword argument 'core' [Edit] However, by just removing the core argument I get ...
102
123
[ "python" ]
[ "python", "django", "django-models" ]
{"accepted_answer_id":35633,"answer_count":3,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-29T09:03:27.883000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2013-10-14T14:31:04+00:00","last_edit_date":"2013-10-14T14:31:04+00:00","question_i...
[ 0.01332855224609375, -0.01160430908203125, -0.01558685302734375, -0.01409912109375, 0.004016876220703125, -0.0111846923828125, -0.017608642578125, 0.022247314453125, 0.0021572113037109375, 0.01190185546875, -0.0029010772705078125, 0.0111236572265625, 0.0228424072265625, -0.01409912109375, ...
[ 7, 23, 70, 73, 83, 132, 217, 1369, 1614, 3525, 4163, 5037, 6159, 10750, 11971, 14005, 17647, 18022, 18468, 18499, 18929, 19388, 21150, 22710, 25632, 26747, 27803, 30854, 31611, 34844, 39424, 40140, 44457, 48962, 49146, 56065, 56458, 60457, ...
[ 0.05419921875, 0.022216796875, 0.000244140625, 0.06298828125, 0.099609375, 0.015869140625, 0.1220703125, 0.0732421875, 0.107421875, 0.119140625, 0.046142578125, 0.259765625, 0.150390625, 0.21484375, 0.232421875, 0.0223388671875, 0.1787109375, 0.2060546875, 0.095703125, 0.162109...
f22e3662-1bc8-5a97-a056-619f08d81b00
34,243
0
Title: Python descriptor protocol analog in other languages? Is there something like the Python descriptor protocol implemented in other languages? It seems like a nice way to increase modularity/encapsulation without bloating your containing class' implementation, but I've never heard of a similar thing in any other ...
74
88
[ "python" ]
[ "python", "language-features", "encapsulation" ]
{"accepted_answer_id":34266,"answer_count":2,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-29T09:24:08.583000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2014-03-29T21:09:33.247000+00:00","last_edit_date":null,"question_id":34243,"score"...
[ 0.0087738037109375, 0.00652313232421875, -0.00972747802734375, 0.007770538330078125, 0.0215911865234375, -0.0308380126953125, -0.0026531219482421875, 0.038177490234375, 0.0181427001953125, 0.00031685829162597656, -0.0226593017578125, 0.0195770263671875, 0.0193328857421875, -0.0145874023437...
[ 7, 23, 33, 70, 104, 147, 442, 645, 1884, 2037, 3789, 3917, 6713, 8306, 9844, 13580, 15490, 15644, 17055, 18507, 21373, 26267, 29479, 29695, 31251, 37202, 46876, 47041, 49782, 51312, 60223, 70541, 72403, 91363, 121707, 145581, 146291, 208124 ]
[ 0.041015625, 0.00927734375, 0.010498046875, 0.0177001953125, 0.0947265625, 0.059814453125, 0.02490234375, 0.0191650390625, 0.078125, 0.06494140625, 0.0810546875, 0.035400390625, 0.02587890625, 0.0283203125, 0.04150390625, 0.000244140625, 0.0230712890625, 0.11328125, 0.13671875, ...
965a9d8a-d8da-595f-af21-719aa0c5e4c0
34,328
0
Title: How do I make Windows aware of a service I have written in Python? In another question I posted yesterday, I got very good advice on how a Python script could be run as a service in Windows. What I'm left wondering is: How is Windows aware of the services that can be managed in the native tools ("services" wind...
101
107
[ "python" ]
[ "python", "windows", "cross-platform" ]
{"accepted_answer_id":34418,"answer_count":4,"chunk_count":1,"chunk_index":0,"closed_date":null,"creation_date":"2008-08-29T10:18:21.167000+00:00","has_accepted_answer":true,"is_closed":false,"languages":["python"],"last_activity_date":"2008-11-03T18:03:37.790000+00:00","last_edit_date":"2017-05-23T11:47:16.490000+00:0...
[ -0.004169464111328125, -0.02276611328125, -0.0056304931640625, -0.00959014892578125, 0.0157318115234375, -0.049591064453125, -0.023956298828125, 0.0305023193359375, -0.0093536376953125, -0.021331787109375, -0.0159759521484375, 0.023590087890625, 0.0144195556640625, 0.0095367431640625, 0....
[ 5, 10, 23, 24, 70, 71, 73, 83, 111, 217, 237, 248, 450, 765, 831, 1379, 2367, 3249, 3773, 4034, 4127, 4516, 4552, 4935, 5809, 9655, 11249, 11374, 11675, 19111, 22584, 25737, 26499, 29908, 48962, 59121, 67660, 72977, 76896, 103268, 10741...
[ 0.010986328125, 0.0159912109375, 0.0556640625, 0.123046875, 0.012939453125, 0.052490234375, 0.037109375, 0.0537109375, 0.08056640625, 0.091796875, 0.087890625, 0.0244140625, 0.00537109375, 0.0546875, 0.0908203125, 0.1025390625, 0.007568359375, 0.0888671875, 0.220703125, 0.11718...