<p>Is it possible to import a python file more than once in a python script because i run a loop back to my driver file in a function by using the import command but it only works once? thanks</p>

<p><strong>edit:</strong> Resolved myself thanks</p>

The easiest answer is to put the code you are trying to run inside a function like this
(inside your module that you are importing now):
```
```
def main():
    # All the code that currently does work goes in here 
    # rather than just in the module
```
```
(The module that does the importing)
```
```
import your_module #used to do the work

your_module.main() # now does the work (and you can call it multiple times)
# some other code
your_module.main() # do the work again
```
```