# HowTo Change/Alter Function Call Path to script library?

**URL:** <https://forum.inductiveautomation.com/t/howto-change-alter-function-call-path-to-script-library/44625>\
**Category:** Ignition\
**Tags:** scripting, ignition80\
**Created:** [March 18, 2021, 1:10pm UTC](https://forum.inductiveautomation.com/t/howto-change-alter-function-call-path-to-script-library/44625 "2021-03-18T13:10:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tobiasatats](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tobiasatats](https://forum.inductiveautomation.com/u/tobiasatats)\
**Post date:** [March 18, 2021, 1:10pm UTC](https://forum.inductiveautomation.com/t/howto-change-alter-function-call-path-to-script-library/44625/1 "2021-03-18T13:10:14Z")

</div>

Hi,  
I’d like to implement a versioning in the script library for long term development. (git is no option at the moment, sry)  
Idea is to user a “folder” structure for separated “modules” like  
Module1 / V1-0-0 / Scripts with functions  
Module2 / V1-0-0 / Scripts with functions  
Module3 / V1-0-0 / Scripts with functions  
Module3 / V1-1-0 / Scripts with functions

Question: When calling a script, how is it possible to alter the path to the correct function?  
Let’s assume, I use a tag containing the version string. How do I get from  
Module3. **V1-0-0**".MyFunction() to Module3. **V1-1-0**.MyFunction() as these are not strings and cannot be used as some? Any idea? Thanks!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 18, 2021, 2:08pm UTC](https://forum.inductiveautomation.com/t/howto-change-alter-function-call-path-to-script-library/44625/2 "2021-03-18T14:08:04Z")

</div>

python’s builtin function `getattr()` can perform such lookups with string module or package names.

---

<div class="post-metadata">

**Author:** ![tobiasatats](https://avatars.discourse-cdn.com/v4/letter/t/ce7236/32.png) [@tobiasatats](https://forum.inductiveautomation.com/u/tobiasatats)\
**Post date:** [March 22, 2021, 1:45pm UTC](https://forum.inductiveautomation.com/t/howto-change-alter-function-call-path-to-script-library/44625/3 "2021-03-22T13:45:12Z")

</div>

Great! That worked for me.

it is  
getattr(Module3, “V1\_1\_0”).MyScript.MyFunction(param1, param2)  
and so on, then.
