# Add auto-completion and a stored history file of commands for the Python repl.  Requires Python 2.0+ readline.  Autocomplete is bound to the Esc key by default.

# This file should be linked to ~/.pystartup, and set with an environment variable to point to it.

# fish "set -gx PYTHONSTARTUP ~/.pystartup"
# bash "export PYTHONSTARTUP=~/.pystartup"

# NOTE: machomebrew, ~/Library/Python/3.9/lib/python/site-packages/

# TODO: somethin is wrong, stalling the launch of the python REPL

# import atexit
# import os
# import readline
# import rlcompleter # completion function provided by GNU readline
# import fancycompleter # module that extends rlcompleter
# import pprint

# historyPath = os.path.expanduser("~/.py_repl_history")

# # `freecad -c` specific
# fancycompleter.interact(persist_history=True)

# # Tab completion
# # readline.parse_and_bind('tab: complete')

# def save_history(historyPath=historyPath):
#     import readline
#     readline.write_history_file(historyPath)

# if os.path.exists(historyPath):
#     readline.read_history_file(historyPath)

# atexit.register(save_history)
# del os, atexit, readline, rlcompleter, save_history, historyPath
# {% endhight %}

def hello():
    print('hello world')
