Re: Using Inline Python to import Python vars

2013-04-09 Thread sisyphus1
-Original Message- From: sisyph...@optusnet.com.au Sent: Tuesday, April 09, 2013 12:44 PM To: Chris Nighswonger ; inline@perl.org Subject: Re: Using Inline Python to import Python vars -Original Message- From: Chris Nighswonger @{$DATA{$pkg}} = split /(?m)(__\S

Re: Using Inline Python to import Python vars

2013-04-09 Thread Chris Nighswonger
Hi Rob, On Tue, Apr 9, 2013 at 4:15 AM, sisyph...@optusnet.com.au wrote: -Original Message- From: sisyph...@optusnet.com.au Sent: Tuesday, April 09, 2013 12:44 PM To: Chris Nighswonger ; inline@perl.org Subject: Re: Using Inline Python to import Python vars -Original

Re: Using Inline Python to import Python vars

2013-04-09 Thread Chris Nighswonger
On Tue, Apr 9, 2013 at 4:15 AM, sisyph...@optusnet.com.au wrote: -Original Message- From: sisyph...@optusnet.com.au Sent: Tuesday, April 09, 2013 12:44 PM To: Chris Nighswonger ; inline@perl.org Subject: Re: Using Inline Python to import Python vars -Original Message

Re: Using Inline Python to import Python vars

2013-04-09 Thread sisyphus1
From: Chris Nighswonger This fixes the problem! Fantastic! It's possibly a little convoluted at the moment ... maybe someone can improve on that. Is there any case where the marker would not be on a line by itself? If it's not on a line by itself, it will be deemed to *not* be a marker.

Re: Using Inline Python to import Python vars

2013-04-09 Thread Chris Nighswonger
On Tue, Apr 9, 2013 at 6:48 PM, sisyph...@optusnet.com.au wrote: Thanks for pursuing this, Chris, Stefan. Many thanks to Stefan for helping me along and to Rob for fixing things up. Kind Regards, Chris

Re: Using Inline Python to import Python vars

2013-04-08 Thread Chris Nighswonger
On Mon, Apr 1, 2013 at 12:57 PM, Chris Nighswonger cnighswon...@foundations.edu wrote: However, this code borks: use Inline Python = 'DATA', DIRECTORY = '/usr/share/webmin/pykota/.Inline/', NAME= 'PyKota::Test'; print pykota_version(); 1;

Re: Using Inline Python to import Python vars

2013-04-08 Thread Stefan Seifert
Hi Chris, On Monday 08 April 2013 14:45:40 Chris Nighswonger wrote: However, this code borks: ... __DATA__ __Python__ def pykota_version(): from pykota.version import __version__ return __version__ The error is: File string, line 3 from

Re: Using Inline Python to import Python vars

2013-04-08 Thread Chris Nighswonger
On Mon, Apr 8, 2013 at 4:25 PM, Chris Nighswonger cnighswon...@foundations.edu wrote: On Mon, Apr 8, 2013 at 3:14 PM, Stefan Seifert n...@detonation.orgwrote: I've never used DATA file handles in Perl much less with Inline::Python, so I'm not exactly sure. But the debug output looks like

Re: Using Inline Python to import Python vars

2013-04-08 Thread sisyphus1
-Original Message- From: Chris Nighswonger Sent: Tuesday, April 09, 2013 6:39 AM To: inline@perl.org Subject: Re: Using Inline Python to import Python vars So it does look as though the DATA splitting algorithm is a bit loose. In Inline.pm abt line 354: @{$DATA{$pkg}} = split

Using Inline Python to import Python vars

2013-04-01 Thread Chris Nighswonger
I seem to be misunderstanding something about importing Python package vars with Inline. I'm thinking it may be some syntax problem. This code returns the value of __version__ as expected: use Inline Python = from pykota.version import __version__; print __version__;; However, this code