In [1]:
!ls


Defensive 4.ipynb
DefensiveProgramming.ipynb
DefensiveProgramming_2.ipynb
DefensiveProgramming_3.ipynb
DefensiveProgramming_3.py
DefensiveProgramming_3_andrew.py
notes
python-overlapping-ranges.svg

In [2]:
import DefensiveProgramming_3_andrew


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-2-239b1f2b2375> in <module>()
----> 1 import DefensiveProgramming_3_andrew

C:\Users\Jonathan\desktop\2015-08-26-leeds-defensive\DefensiveProgramming_3_andrew.py in <module>()
    117 import sys
    118 
--> 119 start = float(sys.argv[1])
    120 end = float(sys.argv[2])
    121 

ValueError: could not convert string to float: -f

This is how to bring a python script into another and run the functions. E.g.


In [3]:
import DefensiveProgramming_3_andrew

In [4]:
DefensiveProgramming_3_andrew.range_overlap([(10.0,11.0),(9.0,10.5)])


Out[4]:
(10.0, 10.5)

In [ ]: