# Get the full text of a project script?

**URL:** <https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310>\
**Category:** Module Development\
**Tags:** ignition81\
**Created:** [June 20, 2023, 9:55pm UTC](https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310 "2023-06-20T21:55:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_McIlvenna](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert_mcilvenna/32/80238_2.png) [@Robert\_McIlvenna](https://forum.inductiveautomation.com/u/Robert_McIlvenna)\
**Post date:** [June 20, 2023, 9:55pm UTC](https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310/1 "2023-06-20T21:55:36Z")

</div>

Trying to get the full text of a python script in the project library, how would I go about doing that?

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 20, 2023, 10:19pm UTC](https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310/2 "2023-06-20T22:19:56Z")

</div>

I need clarification; are you wanting to decompile a script at runtime, and view it somewhere as plain text, or are you wanting to call and run a project script function, or are you wanting to know how to put a script into the library?

---

<div class="post-metadata">

**Author:** ![Robert\_McIlvenna](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert_mcilvenna/32/80238_2.png) [@Robert\_McIlvenna](https://forum.inductiveautomation.com/u/Robert_McIlvenna)\
**Post date:** [June 21, 2023, 1:12pm UTC](https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310/3 "2023-06-21T13:12:31Z")

</div>

View script as plain text and I just figured it out.  
resource.getData("code.py"), just need to cast or otherwise turn that into a string

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 21, 2023, 8:50pm UTC](https://forum.inductiveautomation.com/t/get-the-full-text-of-a-project-script/75310/4 "2023-06-21T20:50:48Z")

</div>

If you want a forward-compatible, agnostic means:  
`com.inductiveautomation.ignition.common.script.ModuleLibrary#deserializeScript`

Accepts a `ProjectResource` and returns a (non-null) `String`.
