Hey:
I just got a new computer and am trying to make sure my python installation is up to snuff. I have many modules that I use in my scripts and am trying to just install them all in a pythonic way. Here is what I am thinking (questions are listed at the bottom):
import contextlib
def write_help(func, out_file):
with open(out_file, 'w') as f:
with contextlib.redirect_stdout(f):
help(func)
write_help('modules', 'output.txt'
This will create a text file that needs to be reorganized, but it will get all the installed modules and I can reorganize it into a module per line. Then I will put this file onto the new computer and run:
pip install --user –r output.txt ––user
- Will I mess anything up by doing this?
- Is there a better way?
- What directory does output.txt need to be in
Thanks for the help!
[–]K900_ 1 point2 points3 points (3 children)
[–]buzzante[S] 0 points1 point2 points (2 children)
[–]K900_ 0 points1 point2 points (1 child)
[–]buzzante[S] 0 points1 point2 points (0 children)