pre-loading with script containing user written routines?

Questions and problems about using polymake go here.
uramakrishna
Posts: 8
Joined: 13 May 2011, 18:13

pre-loading with script containing user written routines?

Postby uramakrishna » 26 May 2011, 19:03

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

sherrmann
Developer
Posts: 27
Joined: 26 Dec 2010, 15:46

Re: pre-loading with script containing user written routines

Postby sherrmann » 26 May 2011, 19:17

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.

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: pre-loading with script containing user written routines

Postby gawrilow » 27 May 2011, 16:22

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.


Return to “Helpdesk”