CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 09:57:33 GMT
content-type: text/html; charset=utf-8
cf-ray: 965b45f09baf1ec2-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=a2a50073-a4fb-4327-a92a-57412eacafd0; expires=Mon, 27 Jul 2026 09:57:33 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: 4b2c99e9-b395-4164-a687-c8fc34780c32
x-worker-origin-response-time: 522000000
x-dns-prefetch-control: off
set-cookie: prov=a2a50073-a4fb-4327-a92a-57412eacafd0; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=Ui_5TWHGVYIkKXGxxTdiM45MZ9FOWhh5a33cElg5dOQ-1753610253-1.0.1.1-RkezSwSt4AgCFJuH07GUKlM6cbIrDVIRhGfBzYA6eH2w6P0AKoiKspSQNI9T0IJ_el..7XRJI84NA1_Slkli5x7B1jm_k9VEq4c14vctfIs; path=/; expires=Sun, 27-Jul-25 10:27:33 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=UrjoCqTKqqdsdaD60aVF_7wiFU6efNmbziSQioVg8lw-1753610253433-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
638
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
- Symbols for A.P. Morse's book in Set Theory
- Is there such a thing as 'aerospace grade software'?
- I am looking for a French mathematician who contributed to complex analysis
- Balancing a Holy Water Bomb
- What's the meaning of a function, going from one set to another?
- leftmargin in enumerate
- Class for validating code in different Conda environments with PyTorch
- What is the citation for Augustine's "consensus, non concubitus..."
- Is it possible to use the PC power button to pre-select the OS in rEFInd UEFI dual boot setup?
- “Unclear step in a math book for entertainment”
- What were the two colored keys on a MUPID for?
- When and why is fwait necessary when using the 8087 coprocessor?
- Forces applied to a car hood while driving
- In Fantastic Four 2025 shouldn't this thing have taken years?
- About Harp Pedaling for a Pentatonic Glissando
- Do TeX engines support Shavian OpenType fonts?
- Story that taught cryptography in the form of a manga
- When was the last time all humans were on the ground not in the air?
- spots / stains on tubeless tire
- Are you required to protect trade secrets revealed to you even if you didn't sign an NDA?
- What is the weight of holy water?
- How to navigate in the Universe's Heat Death
- Will an error in two of my published papers affect my PhD thesis evaluation?
- In Jurassic Park, is the lysine dependency intentionally fake (in-universe)?