[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/sengupta/Scilab-Python/master/etc/Python.start [Back]  [Original]

// Copyright (C) 2008 - INRIA
// Copyright (C) 2009 - DIGITEO

// This file is released into the public domain

mprintf("Starting the Python Toolbox\n");

if isdef("Pythonlib") then
	warning("The Python Toolbox is already loaded");
	return;
end

etc_tlbx  = get_absolute_file_path("Python.start");
etc_tlbx  = getshortpathname(etc_tlbx);
root_tlbx = strncpy( etc_tlbx, length(etc_tlbx)-length("\etc\") );

//Load  functions library
// =============================================================================
mprintf("\tLoad macros\n");
pathmacros = pathconvert( root_tlbx ) + "macros" + filesep();
Pythonlib = lib(pathmacros);
clear pathmacros;

// Load and add help chapter
// =============================================================================
// if or(getscilabmode() == ["NW";"STD"]) then
// 	mprintf("\tLoad help\n");
// 	path_addchapter = pathconvert(root_tlbx+"/jar");
//	if ( isdir(path_addchapter)  [] ) then
// 		add_help_chapter("Toolbox skeleton", path_addchapter, %F);
//		clear add_help_chapter;
//	end
//	clear path_addchapter;
// end

// Load demos
// =============================================================================
// if or(getscilabmode() == ["NW";"STD"]) then
// 	mprintf("\tLoad demos\n");
//     pathdemos = pathconvert(root_tlbx+"/demos/toolbox_skeleton.dem.gateway.sce",%F,%T);
//	add_demo("Toolbox skeleton",pathdemos);
//	clear pathdemos add_demo;
// end

pathsrc = pathconvert( root_tlbx ) + "src" + filesep();
function_list = ["py_start"; "py_end"; "py_evaluate_expression"; "py_import"];
linked_lib = link(pathsrc + "libscipython.so", function_list, 'c');
call("py_start");

clear root_tlbx;
clear etc_tlbx;

Web Proxy Viewer  |  New URL  |  Original Page