# \[Python API\] Channel naming

**URL:** <https://discuss.saleae.com/t/python-api-channel-naming/1926>\
**Category:** Support\
**Created:** [November 17, 2022, 7:21pm UTC](https://discuss.saleae.com/t/python-api-channel-naming/1926 "2022-11-17T19:21:17Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![BitBob](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.saleae.com/bitbob/32/2292_2.png) [@BitBob](https://discuss.saleae.com/u/BitBob)\
**Post date:** [September 29, 2024, 8:44pm UTC](https://discuss.saleae.com/t/python-api-channel-naming/1926/21 "2024-09-29T20:44:19Z")

</div>

Hi @itay.work94, @pawel, @gautam.nbhat, @albert.caba and anyone else interested –

Try out this python script:

> **[GitHub - b1tb0b/saleae-rename-channels: Python script to rename channels in a Saleae...](https://github.com/b1tb0b/saleae-rename-channels)**
>
> Python script to rename channels in a Saleae Logic2 capture file (\*.sal)

You could embed the function `sal_rename_channels()` within your Automation API python script, or call this script separately as a standalone program.

Note: I’m still quite new to python, so any feedback is quite welcome 🙂

PS: This is based on a concept discussed in another thread:

> [@Applying a preset to Logic2 Automation API Capture](https://discuss.saleae.com/t/applying-a-preset-to-logic2-automation-api-capture/3022/3):
>
> For what its worth, I did a quick experimental hack – given that the \*.sal file is really just a ZIP archive with a set of \*.bin analog and/or digital files and a meta.json file describing everything stored. If you want to rename the channels manually, you can just: open the \*.sal file in the Logic 2 software manually rename the channels save the changes back to a \*.sal file Likewise, you can also rename the channels by the following steps: unzip the \*.sal file modify the label/strings in …

… and as I wanted to explore python a bit more, I finally tried it out myself.

---

_[View the full topic](https://discuss.saleae.com/t/python-api-channel-naming/1926)._
