Skip to content

Instantly share code, notes, and snippets.

@mgedmin
mgedmin / .pythonrc
Created December 30, 2010 20:37
snippets for export PYTHONSTARTUP=~/.pythonrc
# This is the actual file that combines all of the other snippets
# I've been using it for a while, so it's officially Bug Free (TM)
# Python startup script. vim: set ft=python :
# from http://www.norvig.com/python-iaq.html
# also see Tarek Ziade's _Expert_Pythom_Programming_ page 19
import os, sys
# Coloured prompt
if os.getenv('TERM') in ('xterm', 'vt100', 'rxvt', 'Eterm', 'putty'):
Copyright (c) 2012, Miguel Araujo
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,