execfile(filename, namespace)


File "C:\Apps\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 89, in execfile

exec(compile(f.read(), filename, 'exec'), namespace)


File "//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py", line 1, in <module>

from lecture6_high import *


File "\\filestore.soton.ac.uk\users\oh1m12\mydocuments\20172018\Lecture6\lecture6_high.py", line 119, in <module>

p.plot(x, y, 'r')


NameError: name 'p' is not defined



In [96]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')



In [97]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]



In [98]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

Reloaded modules: lecture6_high



In [99]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]



In [100]: dir()

Out[100]:

['In',

'Out',

'_',

'_11',

'_13',

'_15',

'_17',

'_19',

'_21',

'_25',

'_28',

'_30',

'_32',

'_34',

'_35',

'_37',

'_38',

'_4',

'_48',

'_49',

'_5',

'_54',

'_55',

'_61',

'_62',

'_63',

'_64',

'_65',

'_69',

'_70',

'_75',

'_76',

'_77',

'_8',

'_82',

'_83',

'_87',

'__',

'___',

'__builtin__',

'__builtins__',

'__doc__',

'__loader__',

'__name__',

'__package__',

'__spec__',

'_dh',

'_i',

'_i1',

'_i10',

'_i100',

'_i11',

'_i12',

'_i13',

'_i14',

'_i15',

'_i16',

'_i17',

'_i18',

'_i19',

'_i2',

'_i20',

'_i21',

'_i22',

'_i23',

'_i24',

'_i25',

'_i26',

'_i27',

'_i28',

'_i29',

'_i3',

'_i30',

'_i31',

'_i32',

'_i33',

'_i34',

'_i35',

'_i36',

'_i37',

'_i38',

'_i39',

'_i4',

'_i40',

'_i41',

'_i42',

'_i43',

'_i44',

'_i45',

'_i46',

'_i47',

'_i48',

'_i49',

'_i5',

'_i50',

'_i51',

'_i52',

'_i53',

'_i54',

'_i55',

'_i56',

'_i57',

'_i58',

'_i59',

'_i6',

'_i60',

'_i61',

'_i62',

'_i63',

'_i64',

'_i65',

'_i66',

'_i67',

'_i68',

'_i69',

'_i7',

'_i70',

'_i71',

'_i72',

'_i73',

'_i74',

'_i75',

'_i76',

'_i77',

'_i78',

'_i79',

'_i8',

'_i80',

'_i81',

'_i82',

'_i83',

'_i84',

'_i85',

'_i86',

'_i87',

'_i88',

'_i89',

'_i9',

'_i90',

'_i91',

'_i92',

'_i93',

'_i94',

'_i95',

'_i96',

'_i97',

'_i98',

'_i99',

'_ih',

'_ii',

'_iii',

'_oh',

'_sh',

'a',

'd',

'e',

'exit',

'g',

'get_ipython',

'h',

'i',

'l6',

'lecture6_high',

'm',

'myfun',

'myfun1',

'myfun2',

'myfun3',

'myfun4',

'p',

'print_vals',

'quad',

'quit',

'x',

'x1',

'x2',

'y',

'y1',

'y2']


In [101]: print('__name__')

__name__


In [102]: print(__name__)

__main__


In [103]: dir()

Out[103]:

['In',

'Out',

'_',

'_100',

'_11',

'_13',

'_15',

'_17',

'_19',

'_21',

'_25',

'_28',

'_30',

'_32',

'_34',

'_35',

'_37',

'_38',

'_4',

'_48',

'_49',

'_5',

'_54',

'_55',

'_61',

'_62',

'_63',

'_64',

'_65',

'_69',

'_70',

'_75',

'_76',

'_77',

'_8',

'_82',

'_83',

'_87',

'__',

'___',

'__builtin__',

'__builtins__',

'__doc__',

'__loader__',

'__name__',

'__package__',

'__spec__',

'_dh',

'_i',

'_i1',

'_i10',

'_i100',

'_i101',

'_i102',

'_i103',

'_i11',

'_i12',

'_i13',

'_i14',

'_i15',

'_i16',

'_i17',

'_i18',

'_i19',

'_i2',

'_i20',

'_i21',

'_i22',

'_i23',

'_i24',

'_i25',

'_i26',

'_i27',

'_i28',

'_i29',

'_i3',

'_i30',

'_i31',

'_i32',

'_i33',

'_i34',

'_i35',

'_i36',

'_i37',

'_i38',

'_i39',

'_i4',

'_i40',

'_i41',

'_i42',

'_i43',

'_i44',

'_i45',

'_i46',

'_i47',

'_i48',

'_i49',

'_i5',

'_i50',

'_i51',

'_i52',

'_i53',

'_i54',

'_i55',

'_i56',

'_i57',

'_i58',

'_i59',

'_i6',

'_i60',

'_i61',

'_i62',

'_i63',

'_i64',

'_i65',

'_i66',

'_i67',

'_i68',

'_i69',

'_i7',

'_i70',

'_i71',

'_i72',

'_i73',

'_i74',

'_i75',

'_i76',

'_i77',

'_i78',

'_i79',

'_i8',

'_i80',

'_i81',

'_i82',

'_i83',

'_i84',

'_i85',

'_i86',

'_i87',

'_i88',

'_i89',

'_i9',

'_i90',

'_i91',

'_i92',

'_i93',

'_i94',

'_i95',

'_i96',

'_i97',

'_i98',

'_i99',

'_ih',

'_ii',

'_iii',

'_oh',

'_sh',

'a',

'd',

'e',

'exit',

'g',

'get_ipython',

'h',

'i',

'l6',

'lecture6_high',

'm',

'myfun',

'myfun1',

'myfun2',

'myfun3',

'myfun4',

'p',

'print_vals',

'quad',

'quit',

'x',

'x1',

'x2',

'y',

'y1',

'y2']


In [104]: dir(lecture6_high)

Out[104]:

['__builtins__',

'__cached__',

'__doc__',

'__file__',

'__loader__',

'__name__',

'__package__',

'__spec__',

'm',

'myfun',

'myfun1',

'myfun2',

'myfun3',

'myfun4',

'print_vals',

'x2']


In [105]: lecture6_high(__name__)

Traceback (most recent call last):


File "<ipython-input-105-00cddf2e4c3a>", line 1, in <module>

lecture6_high(__name__)


TypeError: 'module' object is not callable



In [106]: lecture6_high.__name__

Out[106]: 'lecture6_high'


In [107]: __name__

Out[107]: '__main__'


In [108]: lecture6_high.__name__

Out[108]: 'lecture6_high'


In [109]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

Reloaded modules: lecture6_high

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]

__main__



In [110]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

Reloaded modules: lecture6_high

__main__



In [111]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

lecture6_high

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]

__main__



In [112]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

Reloaded modules: lecture6_high



In [113]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]

__main__



In [114]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

Reloaded modules: lecture6_high

__main__



In [115]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6_high.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

This is from the module __main__



In [116]: runfile('//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6/lecture6B.py', wdir='//filestore.soton.ac.uk/users/oh1m12/mydocuments/20172018/Lecture6')

This is from the module lecture6_high

[0, 1, 4, 9, 16, 25]

[0, 1, 4, 9, 16, 25]

__main__



In [117]: