From charlesreid1

Line 68: Line 68:




=Removing=


==Removing Python.org Python==


Via http://bugs.python.org/issue7107:
<pre>
tmpfile=/tmp/generate_file_list
cat <<"NOEXPAND" > "${tmpfile}"
#!/bin/sh
version="${1:-"2.6"}"
file -h /usr/local/bin/* | grep \
"symbolic link to ../../../Library/Frameworks/Python.framework/"\
"Versions/${version}" | cut -d : -f 1
echo "/Library/Frameworks/Python.framework/Versions/${version}"
echo "/Applications/Python ${version}"
set -- Applications Documentation Framework ProfileChanges \
        SystemFixes UnixTools
for package do
  echo "/Library/Receipts/Python${package}-${version}.pkg"
done
NOEXPAND
chmod  ug+x ${tmpfile}
</pre>
This script lists all files/top-level directories to be removed:
<pre>
  ${tmpfile} 2.6
</pre>
To actually delete the files:
<pre>
  ${tmpfile} 2.6 | sed -e "s/^.*$/sudo rm -r \"&\"/g" | sh
</pre>




[[Category:Python]]
[[Category:Python]]

Revision as of 06:46, 10 May 2017

Python - the computer language

Python Modules

Security/Networking

Scapy

Olipy

Pyrit

Computing/Numerics

Numpy

Cantera

Fipy

Python Sundials

Data

Pandas

Images

Python Imaging Library

Profiling

Profiling Python Code

See Python/Profiling

Timing Python Code

See Python/Timing

Resources

This Wiki

All pages on this wiki categorized Python: Category:Python

The old Python page: Old Python Page

Awesome Python

Awesome-python: https://awesome-python.com/ (github repo here: [1])

Wow, just... wow.

Learning Python

# it's about damn time
alias python='python3'

Why you shouldn't use "Learn Python the Hard Way": http://sopython.com/wiki/LPTHW_Complaints

List of recommended Python tutorials: http://sopython.com/wiki/What_tutorial_should_I_read%3F

Ebook: Dive Into Python 3: http://www.diveintopython3.net/


Removing

Removing Python.org Python

Via http://bugs.python.org/issue7107:

tmpfile=/tmp/generate_file_list
cat <<"NOEXPAND" > "${tmpfile}"
#!/bin/sh
version="${1:-"2.6"}"
file -h /usr/local/bin/* | grep \
"symbolic link to ../../../Library/Frameworks/Python.framework/"\
"Versions/${version}" | cut -d : -f 1
echo "/Library/Frameworks/Python.framework/Versions/${version}"
echo "/Applications/Python ${version}"
set -- Applications Documentation Framework ProfileChanges \
         SystemFixes UnixTools
for package do
  echo "/Library/Receipts/Python${package}-${version}.pkg"
done
NOEXPAND
chmod  ug+x ${tmpfile}

This script lists all files/top-level directories to be removed:

  ${tmpfile} 2.6

To actually delete the files:

  ${tmpfile} 2.6 | sed -e "s/^.*$/sudo rm -r \"&\"/g" | sh