These are chat archives for ipython/ipython

7th
Oct 2016
Joshua Milas
@DeepHorizons
Oct 07 2016 03:50
Hey all,
I'm thinking of using traitlets configuration system for a project in working on, I like the config file generation and the usage of default values. Would using traitlets for this purpose be a bad idea?
Joshua Milas
@DeepHorizons
Oct 07 2016 03:56
Also, how does the application class in traitlets work? And how does it relate to the configurable class?
Min RK
@minrk
Oct 07 2016 07:58
@DeepHorizons that's totally reasonable. In a traitlets-based application, the Application is generally what's responsible for:
  1. loading configuration
  2. instantiating (configurable) objects
it's 100% okay to use Configurables and config files with a simple argparse entrypoint. You don't have to use Application.
but Application implements some conventions we use in IPython and Jupyter:
  1. loading config files
  2. parsing command-line options
  3. generating help output
tomVeloso
@tomVeloso
Oct 07 2016 09:09
@jldiaz thanks .. since I did a ctrl+p ctrl+q the bash actually did not stop that's way I was wondering if there were a way to retrive it as the one of a tmux attach for example
Joshua Milas
@DeepHorizons
Oct 07 2016 12:24
@minrk Is it possible to load a config file with just a configurable object?
Min RK
@minrk
Oct 07 2016 12:43
@DeepHorizons Configurable doesn't have a method to to the loading, but you can definitely do that
Or you can have the config-file-loading in your entrypoint, and pass it to the constructor of your Configurables
Joshua Milas
@DeepHorizons
Oct 07 2016 12:59
This is great! Thank you!