How To Change Package Representation on Shell?

Rhodri James rhodri at kynesim.co.uk
Wed Apr 1 16:36:04 EDT 2020


On 01/04/2020 21:22, Abdur-Rahmaan Janhangeer wrote:
> Greetings list,
> 
> I have a custom package.
> 
>>>> import package
>>>> package
> <module 'package' from '<path>'>
> 
> what do i have to modify from my package to have like
> 
>>>> package
> Hi!

Do you mean "How do I override the str() or repr() of a module"?  I 
don't think you can.

-- 
Rhodri James *-* Kynesim Ltd


More information about the Python-list mailing list