python: Add pywrapinit to basic_example.py
This commit is contained in:
7
ortools/linear_solver/samples/basic_example.py
Normal file → Executable file
7
ortools/linear_solver/samples/basic_example.py
Normal file → Executable file
@@ -15,6 +15,7 @@
|
||||
# [START program]
|
||||
# [START import]
|
||||
from ortools.linear_solver import pywraplp
|
||||
from ortools.init import pywrapinit
|
||||
# [END import]
|
||||
|
||||
|
||||
@@ -62,5 +63,11 @@ def main():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
pywrapinit.CppBridge.InitLogging('basic_example.py')
|
||||
cpp_flags = pywrapinit.CppFlags()
|
||||
cpp_flags.logtostderr = True
|
||||
cpp_flags.log_prefix = False
|
||||
pywrapinit.CppBridge.SetFlags(cpp_flags)
|
||||
|
||||
main()
|
||||
# [END program]
|
||||
|
||||
Reference in New Issue
Block a user