"C:" is a windows-specific notation, programs run under Linux subsystem do not understand it. Your home directory is physically located at C:\Users\qweas", it's where you can find your files using Windows tools, like file explorer. However, within your Linux subsystem, the home directory is mounted as "/home/qweas". You can simply use the "~" notation within polymake shell, e.g.
Code: Select all
save_data($p->FACETS, "~/mypoly.txt");
, then you'll find the resulting file at C:\Users\qweas\mypoly.txt.
Please note that save_data() creates a JSON file, not the plain output that you see when you use the print command in the polymake shell. If you want to redirect the output of the print command, you should type the following sequence:
Code: Select all
open MY_FILE, ">", "$ENV{HOME}/my_poly.txt" or die "can't create file: $!\n"; print MY_FILE $p->FACETS; close MY_FILE;
Unfortunately, "open" function does not understand the "~" notation directly, it's a small perl deficiency. That's why you should use the explicit reference to the HOME environment variable. save() and save_data() are polymake custom commands, they understand "~".
Please also keep in mind that Linux and Windows use different conventions for line ends in text files; viewing Linux files with some ancient Windows tools might be uncomfortable (the whole file might appear as a single long line).