convenience

Custom convenience functions/methods

Convenience functions are functions that perform a specific task, independant of the program, code or whatever that called it. Here's an example in PHP: function currentDateTime(){ list($micro, $Unixtime) = explode(" ",microtime()); $sec= $micro + date("s", $Unixtime); $sec = mb_ereg_replace(sprintf('%d', $sec), "", ($micro + dat...

How do you import your own convenience function modules in Python?

Python can only import files from the current working directory, or from its path, I guess, but this means that if I'm working in a subdirectory on a certain project, I can't import stuff from a parent directory that I wrote to simplify things or provide shortcuts. This is more for interactive work in IPython and the like, not developin...

How to configure GHCi to automatically import modules

When I use GHCi, I almost always end up importing Control.Applicative, Data.List, etc. . Is there a way to configure GHCi to automatically import those modules. Also, after importing them, how do I keep the prompt from being insanely long? Prelude Control.Applicative Data.List Database.HDBC Database.HDBC.Sqlite3 System.Directory> ...