[BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Amit Saha
Hello: I have been using CPython as a calculator, while I do all those number crunching in C. SO, 'import math' is a must. This is what I did: - Create a file: .pythonrc in my $HOME and place this line: import math - Now in your BASH, .bashrc or similar: export PYTHONSTARTUP= $HOME/.

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Roshan Mathews
On Thu, Oct 22, 2009 at 6:43 PM, Amit Saha wrote: > - Create a file: .pythonrc in my $HOME and place this line: > Thanks for the tip. I don't use this myself, but I had read this in Peter Norvig's Python IAQ, which makes interesting reading. It's available online at http://norvig.com/python-iaq.

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Amit Saha
Roshan Mathews wrote: On Thu, Oct 22, 2009 at 6:43 PM, Amit Saha wrote: - Create a file: .pythonrc in my $HOME and place this line: Thanks for the tip. I don't use this myself, but I had read this in Peter Norvig's Python IAQ, which makes interesting reading. It's available online at http:/

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Noufal Ibrahim
On Thu, Oct 22, 2009 at 6:43 PM, Amit Saha wrote: > Hello: > > I have been using CPython as a calculator, while I do all those number > crunching in C. SO, 'import math' is a must. > > This is what I did: > > - Create a file: .pythonrc in my $HOME and place this line: There are other goodies you

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Anil
Noufal Ibrahim wrote: There are other goodies you can put there as well. I used to have import readline readline.parse_and_bind("tab: complete") in there so that the default interpreter would get tab completion. Neat !! :) btw does Ubuntu come with readline by default?? Anil

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Noufal Ibrahim
On Thu, Oct 22, 2009 at 7:46 PM, Anil wrote: > Noufal Ibrahim wrote: >> >> There are other goodies you can put there as well. I used to have >> >> import readline >> readline.parse_and_bind("tab: complete") >> >> in there so that the default interpreter would get tab completion. > > Neat !! :) > b

Re: [BangPypers] 2-cent Tip: Load modules at Startup

2009-10-22 Thread Anil
Noufal Ibrahim wrote: On Thu, Oct 22, 2009 at 7:46 PM, Anil wrote: Noufal Ibrahim wrote: There are other goodies you can put there as well. I used to have import readline readline.parse_and_bind("tab: complete") in there so that the default interpreter would get tab completion.