# Show python script on perspective in VSC kind of format

**URL:** <https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 5, 2024, 12:11am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455 "2024-12-05T00:11:12Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 12:11am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/1 "2024-12-05T00:11:12Z")

</div>

I have a piece of python script, I want to be able to read from this script and display the content on perspective in it's coding format.

is it possible?

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [December 5, 2024, 12:23am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/2 "2024-12-05T00:23:16Z")

</div>

Can you share the script and highlight the data you are wanting to show?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 5, 2024, 12:26am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/3 "2024-12-05T00:26:33Z")

</div>

The markdown component will display text placed between triple backtick blocks as code (monospace font), but no syntax highlighting.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 12:26am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/4 "2024-12-05T00:26:56Z")

</div>

I want to be able to display any python script. It will be even better if I can also edit the script as well.

1. open a python script.
2. copy the content.
3. paste it to a either a string or dataset tag.
4. use this tag content to display on perspective view in a python coding format.

or from perspective, embedded with VSC console for direct display or edit.

These are the ways I can think of, not sure either way can work.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 12:27am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/5 "2024-12-05T00:27:47Z")

</div>

thanks, I will have a try. am I able to edit and save the script as well?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 5, 2024, 12:27am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/6 "2024-12-05T00:27:53Z")

</div>

Nope.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 12:34am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/7 "2024-12-05T00:34:07Z")

</div>

just had quick look at the markdown component.  
Correct me if I am wrong.  
here's the procedure I need to do:

1. open the python script.
2. take the content.
3. apply markdown format, "#", "##", etc
4. pass the content to the markdown component

I think I need to ask my sweetheart "chatgpt" to automate this procedure.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [December 5, 2024, 12:45am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/8 "2024-12-05T00:45:53Z")

</div>

You might be better off making a module that is a perspective wrapper for one of the open source javascript code editors for this, then you can do the edits and saving as well as syntax highlighting and autocomplete etc.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 12:47am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/9 "2024-12-05T00:47:35Z")

</div>

good idea.

---

<div class="post-metadata">

**Author:** ![Ryan\_Bein](https://avatars.discourse-cdn.com/v4/letter/r/ecccb3/32.png) [@Ryan\_Bein](https://forum.inductiveautomation.com/u/Ryan_Bein)\
**Post date:** [December 5, 2024, 6:32am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/10 "2024-12-05T06:32:34Z")

</div>

It might be worth looking into the Jupyter Kernel on the exchange.  
You mentioned you wanted to edit and save the scripts as well.

> **[Ignition Exchange](https://inductiveautomation.com/exchange/2563/overview)**
>
> Discover, share, and download community made Ignition resources in collaboration with your organization or the Ignition community.

---

<div class="post-metadata">

**Author:** ![chaoliang](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@chaoliang](https://forum.inductiveautomation.com/u/chaoliang)\
**Post date:** [December 5, 2024, 6:46am UTC](https://forum.inductiveautomation.com/t/show-python-script-on-perspective-in-vsc-kind-of-format/99455/11 "2024-12-05T06:46:29Z")

</div>

champion
