File tree Expand file tree Collapse file tree 13 files changed +1
-138
lines changed Expand file tree Collapse file tree 13 files changed +1
-138
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- # Activate virtual environment if a venv path has been specified in .venv
6
- # This must be executed only if this file has been executed as a
7
- # script (instead of a module)
8
- if __name__ == '__main__' :
9
- # Check if .venv file exists
10
- if os .path .exists ('.venv' ):
11
- with open ('.venv' , 'r' ) as venv_file :
12
- # Get virtualenv path from .venv file
13
- # and remove trailing newline chars
14
- venv_path = venv_file .read ().rstrip ()
15
- # Get path of the activation script
16
- venv_path = os .path .join (venv_path , 'bin/activate_this.py' )
17
- if not os .path .exists (venv_path ):
18
- print ('Virtual environment path specified in .venv '
19
- 'points to an invalid path\n ' )
20
- exit (- 2 )
21
- with open (venv_path ) as f :
22
- # Read the activation script
23
- code = compile (f .read (), venv_path , 'exec' )
24
- # Execute the activation script to activate the venv
25
- exec (code , {'__file__' : venv_path })
26
-
27
5
import shutil
28
6
from mininet .topo import Topo
29
7
from mininet .node import Host
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- # Activate virtual environment if a venv path has been specified in .venv
6
- # This must be executed only if this file has been executed as a
7
- # script (instead of a module)
8
- if __name__ == '__main__' :
9
- # Check if .venv file exists
10
- if os .path .exists ('.venv' ):
11
- with open ('.venv' , 'r' ) as venv_file :
12
- # Get virtualenv path from .venv file
13
- # and remove trailing newline chars
14
- venv_path = venv_file .read ().rstrip ()
15
- # Get path of the activation script
16
- venv_path = os .path .join (venv_path , 'bin/activate_this.py' )
17
- if not os .path .exists (venv_path ):
18
- print ('Virtual environment path specified in .venv '
19
- 'points to an invalid path\n ' )
20
- exit (- 2 )
21
- with open (venv_path ) as f :
22
- # Read the activation script
23
- code = compile (f .read (), venv_path , 'exec' )
24
- # Execute the activation script to activate the venv
25
- exec (code , {'__file__' : venv_path })
26
-
27
5
from argparse import ArgumentParser
28
6
import python_hosts
29
7
import shutil
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- # Activate virtual environment if a venv path has been specified in .venv
6
- # This must be executed only if this file has been executed as a
7
- # script (instead of a module)
8
- if __name__ == '__main__' :
9
- # Check if .venv file exists
10
- if os .path .exists ('.venv' ):
11
- with open ('.venv' , 'r' ) as venv_file :
12
- # Get virtualenv path from .venv file
13
- # and remove trailing newline chars
14
- venv_path = venv_file .read ().rstrip ()
15
- # Get path of the activation script
16
- venv_path = os .path .join (venv_path , 'bin/activate_this.py' )
17
- if not os .path .exists (venv_path ):
18
- print ('Virtual environment path specified in .venv '
19
- 'points to an invalid path\n ' )
20
- exit (- 2 )
21
- with open (venv_path ) as f :
22
- # Read the activation script
23
- code = compile (f .read (), venv_path , 'exec' )
24
- # Execute the activation script to activate the venv
25
- exec (code , {'__file__' : venv_path })
26
-
27
5
from argparse import ArgumentParser
28
6
import python_hosts
29
7
import shutil
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- # Activate virtual environment if a venv path has been specified in .venv
6
- # This must be executed only if this file has been executed as a
7
- # script (instead of a module)
8
- if __name__ == '__main__' :
9
- # Check if .venv file exists
10
- if os .path .exists ('.venv' ):
11
- with open ('.venv' , 'r' ) as venv_file :
12
- # Get virtualenv path from .venv file
13
- # and remove trailing newline chars
14
- venv_path = venv_file .read ().rstrip ()
15
- # Get path of the activation script
16
- venv_path = os .path .join (venv_path , 'bin/activate_this.py' )
17
- if not os .path .exists (venv_path ):
18
- print ('Virtual environment path specified in .venv '
19
- 'points to an invalid path\n ' )
20
- exit (- 2 )
21
- with open (venv_path ) as f :
22
- # Read the activation script
23
- code = compile (f .read (), venv_path , 'exec' )
24
- # Execute the activation script to activate the venv
25
- exec (code , {'__file__' : venv_path })
26
-
27
5
from argparse import ArgumentParser
28
6
import python_hosts
29
7
import shutil
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
import os
4
4
5
- # Activate virtual environment if a venv path has been specified in .venv
6
- # This must be executed only if this file has been executed as a
7
- # script (instead of a module)
8
- if __name__ == '__main__' :
9
- # Check if .venv file exists
10
- if os .path .exists ('.venv' ):
11
- with open ('.venv' , 'r' ) as venv_file :
12
- # Get virtualenv path from .venv file
13
- # and remove trailing newline chars
14
- venv_path = venv_file .read ().rstrip ()
15
- # Get path of the activation script
16
- venv_path = os .path .join (venv_path , 'bin/activate_this.py' )
17
- if not os .path .exists (venv_path ):
18
- print ('Virtual environment path specified in .venv '
19
- 'points to an invalid path\n ' )
20
- exit (- 2 )
21
- with open (venv_path ) as f :
22
- # Read the activation script
23
- code = compile (f .read (), venv_path , 'exec' )
24
- # Execute the activation script to activate the venv
25
- exec (code , {'__file__' : venv_path })
26
-
27
5
from argparse import ArgumentParser
28
6
import python_hosts
29
7
import shutil
You can’t perform that action at this time.
0 commit comments