<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>This is the way it works in scilab for libraries:</p>
<pre style="font-family:Monospaced;font-style:normal;font-size:15.0;"><span style="color:rgb(174,92,176);text-decoration:underline;">mkdir</span> <span style="color:rgb(188,143,143);">lib1</span>
<span style="color:rgb(50,185,185);">mputl</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">function y=foo(x);y=x;end</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib1/foo.sci</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">genlib</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib1</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib1</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(174,92,176);text-decoration:underline;">mkdir</span> <span style="color:rgb(188,143,143);">lib2</span>
<span style="color:rgb(50,185,185);">mputl</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">function y=foo(x);y=2*x;end</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib2/foo.sci</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">genlib</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib2</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(0,0,0);">,</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib2</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">lib</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib1</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">lib</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(188,143,143);">lib2</span><span style="color:rgb(188,143,143);">"</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(92,92,92);">-</span><span style="color:rgb(92,92,92);">></span> <span style="color:rgb(0,0,0);">lib1</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">foo</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">ans</span> <span style="color:rgb(92,92,92);">=</span>
<span style="color:rgb(188,143,143);">1.</span>
<span style="color:rgb(92,92,92);">-</span><span style="color:rgb(92,92,92);">-</span><span style="color:rgb(92,92,92);">></span> <span style="color:rgb(0,0,0);">lib2</span><span style="color:rgb(92,92,92);">.</span><span style="color:rgb(170,170,170);">foo</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">1</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">ans</span> <span style="color:rgb(92,92,92);">=</span>
<span style="color:rgb(188,143,143);">2.</span></pre>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">S.</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">Le 03/12/2020 à 17:28, Antoine
Monmayrant a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:ab231ba3-0699-3061-4106-36ffa49c35e7@laas.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><br>
</p>
<div class="moz-cite-prefix">On 03/12/2020 02:10, TanCL wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1606957806191-0.post@n3.nabble.com">
<pre class="moz-quote-pre" wrap="">Hi, my previous message seems like not able to get posted due to some reason,
just to add some comment on this, I think the functions with same name under
2 different modules could be possibly called by:
</pre>
</blockquote>
<p>That is exactly how things are working in Ada:</p>
<blockquote>
<p>myfunc : local definition in the current file<br>
somepackage.myfunc : definition one can find in somepackage
that is included in the current file by "with somepackage;"</p>
</blockquote>
<p>And one can rename the package with "package S renames
somepackage" which allow writting "s.myfunc"<br>
I assume it's similar in Python too.<br>
</p>
<p>Antoine<br>
</p>
<blockquote type="cite"
cite="mid:1606957806191-0.post@n3.nabble.com">
<pre class="moz-quote-pre" wrap="">moduleA.myfunc
moduleB.myfunc
______________________
Start Toolbox A
Load macros
Start Toolbox B
Load macros
--> toolboxAlib.scilab_sum(2,1)
"This is function from ToolboxA"
ans =
3.
--> toolboxBlib.scilab_sum(2,1)
"This is function from ToolboxB"
ans =
3.
--
Sent from: <a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html" moz-do-not-send="true">http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a>
_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users">https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/~mottelet">http://www.utc.fr/~mottelet</a>
</pre>
</body>
</html>