Page 1 of 1
pre-loading with script containing user written routines?
Posted: 26 May 2011, 19:03
by uramakrishna
Hello Polymake users,
I have a couple of routines to print my polytopes in a separate file. Is there anyway I can make polymake load this file when I start polymake by giving this file name at command line?
I tried with --script option, but it seems to be doing something else.
Thanks for the help
Regards
Ramakrishna
Re: pre-loading with script containing user written routines
Posted: 26 May 2011, 19:17
by sherrmann
What do you mean by "a couple routines to print my polytopes"? I these are polymake commands you want to execute, then the --script option is the right thing. However, you need to properly format your file as a polymake script, see
http://www.polymake.org/doku.php/scripting/start for details. However, using this option will not start the interactive shell. If you want this behaviour you could just start polymake in the normal way and then use the script function to load your script, see also the above link for details.
Re: pre-loading with script containing user written routines
Posted: 27 May 2011, 16:22
by gawrilow
polymake --script does not start an interactive session. Instead, it executes your script and terminates. What you presumable want is to load some additional perl source files at the beginning of the interactive session. You can do this manually by executing the script command in the interactive shell; if you want this happen in every interactive session, you can also put this command in ~/.polymake/prefer.pl below the appropriate "application" command.