File: ipython

package info (click to toggle)
python-bumps 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,776 kB
  • sloc: python: 24,586; ansic: 4,973; cpp: 4,849; javascript: 639; xml: 493; makefile: 143; perl: 108; sh: 94
file content (22 lines) | stat: -rwxr-xr-x 768 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# Find directory of the original file, following symlinks.
# The ${parameter%/*} expansion strips the filename portion.
LINK=`readlink "${0}"`
if [ -z "${LINK}" ]; then BASE="${0%/*}"; else BASE="${LINK%/*}"; fi
ROOT=`(cd "${BASE}" 2>/dev/null && pwd)`
#echo LINK: ${LINK}
#echo BASE: ${BASE}
#echo ROOT: ${ROOT}

PYTHON="$ROOT/Contents/MacOS/python"
PYTHONHOME="$ROOT/Contents/Resources"
PYTHONPATH="$ROOT/Contents/Resources"
DYLD_FRAMEWORK_PATH="$ROOT/Contents/Frameworks"
DYLD_LIBRARAY_PATH="$ROOT/Contents/Frameworks"
export PYTHONHOME PYTHONPATH DYLD_FRAMWORK_PATH DYLD_LIBRARY_PATH

cmd="from IPython.frontend.terminal.ipapp import launch_new_instance as _; _()"
#cmd="import IPython.Shell; IPython.Shell.start().mainloop()"

exec "$PYTHON" -c "$cmd"