[PATCH 4 of 7 WIPv2] cli: convert 'gearbox ishell' into 'kallithea-cli ishell'

Mads Kiilerich mads at kiilerich.com
Fri Oct 12 20:01:40 UTC 2018


On 10/12/18 8:32 PM, Thomas De Schampheleire wrote:
> El mar., 9 oct. 2018 a las 12:02, Mads Kiilerich
> (<mads at kiilerich.com>) escribió:
>> On 10/8/18 9:57 PM, Thomas De Schampheleire wrote:
>>> # HG changeset patch
>>> # User Thomas De Schampheleire <thomas.de_schampheleire at nokia.com>
>>> # Date 1538422696 -7200
>>> #      Mon Oct 01 21:38:16 2018 +0200
>>> # Node ID 14d0a7fc45f3c5dd7333d3f93335d5b556e7c4f0
>>> # Parent  4208df04508892ce4612b0a392345176fe946e6c
>>> cli: convert 'gearbox ishell' into 'kallithea-cli ishell'
>>>
>>> --
>>>
>>> Question: what is the purpose of the imports 'used in IPython shell' ?
>>> I don't see a difference when e.g. removing the import of datetime.
>>
>> I guess it is to explicitly make sure datetime can be used in ishell
>> without importing it first. datetime is probably already imported
>> through other dependencies. So, perhaps nice to have explicit ... but it
>> also doesn't seem like a very essential module, so perhaps not worth it
>> to have explicit ...
> Yes, I don't see much value for default imports of time, datetime and shutil.
> Importing kallithea.model.db.* but not 'kallithea' itself seems odd too.
> It feels like these imports are tailored to some specific use case
> that can be carried out with ishell.
> Personally I have not yet used it, did you? How/why?


No, I have not really used it. The shell with colors and auto completion 
looks awesome, and could probably be helpful for some kinds of 
debugging. But it is also very easy and powerful to just edit and add 
extra logging or print statements and test fixes, so that is what I tend 
to use for all the things ishell seems to be useful for.


/Mads



More information about the kallithea-general mailing list