[Scilab-users] how to get list of object that are present in scilab script file
I want to know is there exist any way to get the list of objects like variable names, matrices, plots that are present in scilab script file. Thanks -- View this message in context: http://mailinglists.scilab.org/how-to-get-list-of-object-that-are-present-in-scilab-script-file-tp4027336.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] how to get list of object that are present in scilab script file
Hello, De la part de hilife5 Envoyé : mardi 3 septembre 2013 12:20 I want to know is there exist any way to get the list of objects like variable names, matrices, plots that are present in scilab script file. Does help_from_sci() fulfill your need? Regards -- Christophe Dang Ngoc Chan Mechanical calculation engineer __ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. __ ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] how to get list of object that are present in scilab script file
Le 03/09/13 17:27, Serge Steer a écrit : Le 03/09/2013 12:20, hilife5 a écrit : I want to know is there exist any way to get the list of objects like variable names, matrices, plots that are present in scilab script file. for script file, no but it is possible for functions using the macrovar function Serge Steer Thanks -- View this message in context: http://mailinglists.scilab.org/how-to-get-list-of-object-that-are-present-in-scilab-script-file-tp4027336.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users All the variables created by foo.sce at the workspace level can be obtained like this : clear names=who('local'); exec('foo.sce',-1); names=setdiff(names,who('local')); This trick is a basis for a more clever method (e.g. by using typeof a posteriori). S. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] how to get list of object that are present in scilab script file
Le 03/09/2013 12:20, hilife5 a écrit : I want to know is there exist any way to get the list of objects like variable names, matrices, plots that are present in scilab script file. for script file, no but it is possible for functions using the macrovar function Serge Steer Thanks -- View this message in context: http://mailinglists.scilab.org/how-to-get-list-of-object-that-are-present-in-scilab-script-file-tp4027336.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users
Re: [Scilab-users] how to get list of object that are present in scilab script file
Le 03/09/13 17:27, Serge Steer a écrit : Le 03/09/2013 12:20, hilife5 a écrit : I want to know is there exist any way to get the list of objects like variable names, matrices, plots that are present in scilab script file. for script file, no but it is possible for functions using the macrovar function Serge Steer Thanks -- View this message in context: http://mailinglists.scilab.org/how-to-get-list-of-object-that-are-present-in-scilab-script-file-tp4027336.html Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users Maybe a brute force method could work : all the variables created by a script 'foo.sce' at the workspace level can be obtained like this : clear names=who('local'); exec('foo.sce',-1); names=setdiff(who('local'),'names'); This trick is a basis for a more clever method (e.g. by using typeof a posteriori). You could also on the fly encapsulate the script in a function and use macrovar. S. ___ users mailing list users@lists.scilab.org http://lists.scilab.org/mailman/listinfo/users