Best way to avoid stale *.pyc files?

0 votes
How do I avoid stale *.pyc files? Sometimes, especially when switching branches in version control, some *.pyc files are left there which are later used by Python instead of the source files.

What's the best way to make sure that I don't create or unknowingly use any stale *.pyc files?
May 16, 2019 in Python by ana1504.k
• 7,890 points
58 views

1 answer to this question.

0 votes
There is a useful environment variable for that: PYTHONDONTWRITEBYTECODE

export PYTHONDONTWRITEBYTECODE=true
answered May 16, 2019 by SDeb
• 13,230 points

Related Questions In Python

0 votes
1 answer

Best way to create a simple python web service

web.py is probably the simplest web framework ...READ MORE

answered Jul 20, 2018 in Python by Priyaj
• 57,510 points
51 views
0 votes
1 answer

What's the right way to concatenate files and appending the New Line character in Python? Text or binary mode?

It seems like you're using the wrong ...READ MORE

answered Nov 13, 2018 in Python by Anirudh
• 2,070 points

edited Dec 14, 2018 by Anirudh 136 views
+3 votes
5 answers

How to read multiple data files in python

Firstly we will import pandas to read ...READ MORE

answered Apr 6, 2018 in Python by DeepCoder786
• 1,720 points
3,763 views
0 votes
1 answer

.pyc files in python

.pyc files contain the bytecode which are ...READ MORE

answered Jun 22, 2018 in Python by Hamartia's Mask
• 1,580 points
125 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
305 views
0 votes
1 answer
0 votes
1 answer

Best way to open a socket in Python

Opening sockets in python is pretty simple. ...READ MORE

answered Feb 21, 2019 in Python by SDeb
• 13,230 points
65 views
0 votes
1 answer

Is arr.__len__() the preferred way to get the length of an array in Python?

my_list = [1,2,3,4,5,6,7] len(my_list) # 7 The same works for ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 13,230 points
101 views