<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/python/samba/colour.py, branch talloc-2.3.0</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>python/colour: add colourizing and switch functions</title>
<updated>2018-05-30T23:57:17+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2018-04-19T02:12:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e58719d13cbaa16c9fa454d5653b4a7dd6915777'/>
<id>e58719d13cbaa16c9fa454d5653b4a7dd6915777</id>
<content type='text'>
When samba.colour is first imported, the function

colour.c_BLUE("samba")

will give you the string "\033[1;34msamba\033[0m", which will show up
as blue on an ANSI terminal. If you then go:

colour.switch_colour_off()
colour.c_BLUE("samba")

the c_BLUE call will return the uncoloured string "samba".

This is so things like samba-tool can do this sort of thing:

    if not os.isatty(self.outf):
        switch_colour_off()

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When samba.colour is first imported, the function

colour.c_BLUE("samba")

will give you the string "\033[1;34msamba\033[0m", which will show up
as blue on an ANSI terminal. If you then go:

colour.switch_colour_off()
colour.c_BLUE("samba")

the c_BLUE call will return the uncoloured string "samba".

This is so things like samba-tool can do this sort of thing:

    if not os.isatty(self.outf):
        switch_colour_off()

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>samba_kcc: kcc.debug module defers to samba.colour</title>
<updated>2018-01-13T16:37:07+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas@halo.gen.nz</email>
</author>
<published>2018-01-02T20:20:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=e579d5bd48dfc7bc93ecc126d42fd4389ded0e28'/>
<id>e579d5bd48dfc7bc93ecc126d42fd4389ded0e28</id>
<content type='text'>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>python: module containing ANSI colour sequences</title>
<updated>2018-01-13T16:37:07+00:00</updated>
<author>
<name>Douglas Bagnall</name>
<email>douglas.bagnall@catalyst.net.nz</email>
</author>
<published>2018-01-07T10:17:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a46c4a39c4d3be88f76c295b0719c025a1c39c3b'/>
<id>a46c4a39c4d3be88f76c295b0719c025a1c39c3b</id>
<content type='text'>
This is going to be used by `samba-tool visualize` and samba_kcc.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is going to be used by `samba-tool visualize` and samba_kcc.

Signed-off-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
