# Calling slicer module from a python file

**URL:** <https://discourse.slicer.org/t/calling-slicer-module-from-a-python-file/12720>\
**Category:** Support\
**Tags:** python, module\
**Created:** [July 24, 2020, 2:28pm UTC](https://discourse.slicer.org/t/calling-slicer-module-from-a-python-file/12720 "2020-07-24T14:28:27Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 24, 2020, 9:36pm UTC](https://discourse.slicer.org/t/calling-slicer-module-from-a-python-file/12720/8 "2020-07-24T21:36:52Z")

</div>

> [@Anand\_Mulay](#):
>
> if folder name start with A or T it didn’t work

Backslash `\` is an escape character in Python string literals. See in this post how you can use backslash characters:

> [@Subprocess.call does not work!](https://discourse.slicer.org/t/subprocess-call-does-not-work/2837/14):
>
> FYI, since backslash (\) is an escape character in Python, you cannot simply use it in a string literal in Python. The easiest is to indicate that you specify a raw string by prepending an r character before the string. This is correct: somePath = r"F:\someFolder\python.exe" If you need to use a regular string then backslash can be entered by typing double-backslash. This is correct: somePath = "F:\\someFolder\\python.exe" You may also use Unix-type separators. This is correct: somePath = …

---

_[View the full topic](https://discourse.slicer.org/t/calling-slicer-module-from-a-python-file/12720)._
