CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 04:26:40 GMT
content-type: text/html; charset=utf-8
cf-ray: 965961416d31c469-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=eaac6b56-ee91-4249-97c2-172a269af4d4; expires=Mon, 27 Jul 2026 04:26:40 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: f158974e-6b3f-425d-90a6-9ab92c3b86df
x-worker-origin-response-time: 521000000
x-dns-prefetch-control: off
set-cookie: prov=eaac6b56-ee91-4249-97c2-172a269af4d4; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=KeAAFLJimUOdonc_yJrICyBqz5xiYWQr216aLVoiBYA-1753590400-1.0.1.1-8J.sjGOYT05njTK.X0eAzGJDvHdSLcgA8UAJNbOTEcsK450KFCcaL0RfwtFZGnKklcvZ_jthNv_zpkYsUAqWpw6iwSlZvyTJSkjhm9ZdXTI; path=/; expires=Sun, 27-Jul-25 04:56:40 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=j3CT83v_h6lbJZ_d7ukUb_FySYq1pEQiWC3xv_HhUIo-1753590400771-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'python-2.x' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [python-2.x]
Python 2 is the predecessor of Python 3 and its last version, Python 2.7 was formally released on July 3, 2010. Use this tag along with the main python tag to denote programs that are meant to be run on a Python 2 interpreter only. Do not mix this tag with the python-3.x tag.
1,232 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
1
answer
117
views
Database design using Closure Table for tagging system
I created these database tables with the inspiration in NjDevPro github repository. The design uses Closure Table for implementation of hierarchical tagging system in ...
3
votes
2
answers
305
views
JSON Lexer code
How does the following look for a json lexer? Are there any things that can be improved upon? Does the pattern look general-purpose enough to be able to generalize it to make it into a useful program, ...
1
vote
1
answer
2k
views
Function to add a new key pair value to my JSON file
As you can see I am using a counter variable to iterate through my JSON file and it's a dictionary that has a list of dictionaries. Once I find the key normalHours I divide it and add it to my ...
1
vote
1
answer
149
views
Register/Login for Rock/Paper/Scissors
Recently I have been learning Python after years of putting it off, and I am having a really fun time with it. However after I spent a few hours making something that I thought was pretty cool, I ...
1
vote
1
answer
215
views
Loop through polyline vertices and update coordinate
I have a Python 2.7 script that loops through GIS polylines and updates a coordinate.
The coordinate is called an "M" coordinate (aka a "Measure-value"). M coordinates are similar ...
1
vote
1
answer
80
views
Checks for removing files after X amount of days
I am trying to remove files in my directory if they are over 30 days. However, I don't know what other checks I need to do. The examples I found online weren't very thorough besides just subtracting ...
1
vote
1
answer
3k
views
What is the pythonic way to update my nested dictionary?
So I need to update my nested dictionary where the key is "compensationsDeltaEmployee". I created a string cost_perhour to hold the value of my conditional statements. Now that I am done ...
1
vote
2
answers
1k
views
Is there a faster way to write dictionary values to csv?
I have a dictionary that I am writing to a csv file, however I am only writing the values. I want to know if there is a faster way than using a for loop. I am using python 2.7 here is my code.
...
3
votes
4
answers
2k
views
Find differences between two directories
Coming from another language than Python, I would like to see if my code is "pythonic" enough and follows good practices.
It compares two directories, showing all files that are in one and ...
8
votes
3
answers
3k
views
Calculate evapotranspiration
I am trying to create a code for the Basic evapotranspiration equation by Hargreaves. I have attached a screenshot of the equation to be replicated.
I want to create a class wherein I can input data ...
5
votes
1
answer
1k
views
Send email with attachments, including in memory zipped attachments
The below class implementing a simple way to create emails with attachments, including the option to create in-memory zip files and attach them to the email.
Because I am not a professional programmer ...
8
votes
2
answers
3k
views
log setup using RotatingFileHandler and basicConfig
I am new to python, and developing a moderate application for which I need to setup a logging mechanism.
The below program sets up log handling, which gives the user an option to specify whether log ...
3
votes
1
answer
65
views
Interactive, real-time bikeshare web application with Bokeh
As a side project, I'm working on a Bokeh web application to display public bikeshare data on a map. The data is updated every 2 minutes using a periodic callback. Below is the full implementation.
I'...
3
votes
0
answers
68
views
Python script that getting list of all files with specific ext starting from the current folder. Using timer for reporting about the process
I am using a function that returns a list of all files (full path for each of them) with the given extension in the given folder and all subfolders.
As the process is quite long and user can get ...
2
votes
3
answers
629
views
Bifurcating recursive calculation with redundant calculations
def T(n):
if n <= 0:
return 1
else:
return T(n-1) + (n-1) * T(n-2)
print T(4)
I need an effective way to print out the output of the function <...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
python × 1232
performance × 166
algorithm × 163
beginner × 148
strings × 47
game × 38
object-oriented × 37
csv × 35
time-limit-exceeded × 35
numpy × 32
hash-map × 27
file × 26
parsing × 23
random × 23
regex × 22
file-system × 21
sorting × 21
tree × 21
pygame × 20
json × 19
web-scraping × 19
graph × 18
pandas × 18
recursion × 18
more related tags
Hot Network Questions
- rock paper scissors game with randomized system choices. NOT using rnd()
- Likelihood of the data in a Ornstein-Uhlenbeck-like process
- Is it okay to email researchers if I’m a high school student?
- Why is time reversal not a natural part of the Galilean group?
- Anonymizing a submission for double-blind review
- Why am I winning always? A coincidence perhaps?
- Blinded despite Blindsight?
- “Unclear step in a math book for entertainment”
- What is the best interpretation of Psalm 6:4? Does "Turn" or "Return" capture the intended meaning?
- When was the last time all alive humans stayed on earth?
- What is the weight of holy water?
- Upload open access pdfs or link to publisher for visibility?
- Civilian airplanes with inside fuselage jet engines
- Meaning of 芭蕉 in Tang age
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- Does SZNUD3160 really eliminate the need for diode?
- Can a minor run a business by having an adult act on their behalf?
- Pairwise comparisons with emmeans in a linear mixed-effects model
- Why is 0.0 printed as 0.00001 when rounding upward?
- Why exactly do full-flow rocket engine's turbopumps run cooler?
- What is the meaning of 'Tel.......,qui......'
- How can I translate tariff rates to changes in trade flow?
- Why aren't there baleen whales at about the size of a dolphin?
- Why does the node Bounding Box suddenly produce a different result in version 4.5?