Quantcast

Perl API printing output

classic Classic list List threaded Threaded
3 messages Options
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Perl API printing output

JD Wong
Is there a way to get a program written in the intermine perl api to write the items output to a file rather than printed to the output of the terminal that ran it.  Looking through the documentation there doesn't seem like an obvious way.

Thanks in advance!
-JD

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Perl API printing output

Radek Stepan
Hi JD, are you looking for this:

Input/Output Redirection in Unix -
http://www.codecoffee.com/tipsforlinux/articles2/042.html

Radek

On Wed, Sep 14, 2011 at 9:10 PM, JD Wong <[hidden email]> wrote:

> Is there a way to get a program written in the intermine perl api to write
> the items output to a file rather than printed to the output of the terminal
> that ran it.  Looking through the documentation there doesn't seem like an
> obvious way.
> Thanks in advance!
> -JD
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
>
>

_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
| Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Perl API printing output

Alex Kalderimis
In reply to this post by JD Wong
The output file can be specified directly in the Perl processing code:

  my $document = InterMine::Item::Document->new(
    model => $model,
    output => $out_file
  );

Then when you call "$document->write" the named file will be written.

There is documentation for these Perl modules at:  
  http://www.intermine.org/wiki/ItemsAPIPerl

I hope this answers your questions,

Alex Kalderimis


On Wed, 2011-09-14 at 16:10 -0400, JD Wong wrote:

> Is there a way to get a program written in the intermine perl api to
> write the items output to a file rather than printed to the output of
> the terminal that ran it.  Looking through the documentation there
> doesn't seem like an obvious way.
>
>
> Thanks in advance!
> -JD
> _______________________________________________
> dev mailing list
> [hidden email]
> http://mail.intermine.org/cgi-bin/mailman/listinfo/dev

--
Alex Kalderimis
Software Developer
InterMine
Cambridge Systems Biology Centre
Tennis Court Road - CB2 1QR
University of Cambridge
[hidden email]


_______________________________________________
dev mailing list
[hidden email]
http://mail.intermine.org/cgi-bin/mailman/listinfo/dev
Loading...