[IPython-user] cluster file syntax

Brian Granger bgranger at scu.edu
Thu Mar 16 13:56:14 CST 2006


Fernando,

While we are making this change, do we want to also change the format
of this file?  It would be nice to have it be human readable/editable.
 My preference would have it be a valid python file, but I am not sure
of the best way of doing this.  You have thought a lot more about
config files than I have.  Any thoughts?

Brian

On 3/16/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
> Brian Granger wrote:
> > Do you think we should have it first look in the cwd?
>
> The right thing to do is:
>
> if os.path.isfile(filename):
>    load(filename)
> else:
>    try:
>      load(ipythondir+filename)
>    except file_not_found:
>      print error_msg
>
> This means that a bare name will be looked up in cwd automatically, and if
> it's a fully qualified path name, it will also work.  ipythondir (which is
> properly computed by ipython on all platforms, honoring user reconfigurations
> and whatnot) will be a fallback.
>
> Cheers,
>
> f
>
> This message scanned for viruses and SPAM at SCU (MGW2)
>


--
Brian Granger
Santa Clara University
ellisonbg at gmail.com




More information about the IPython-user mailing list