search for: pyrun_simplefileex

Displaying 5 results from an estimated 5 matches for "pyrun_simplefileex".

2019 Nov 22
3
Re: Shebang sh plugins (was: Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.)
...gins. > > For (eg) python plugins it works like this: > > #!/usr/sbin/nbdkit python > -> runs nbdkit python <script name> > -> <script name> is interpreted as magic script= parameter > -> the python plugin works by loading the script using > PyRun_SimpleFileEx which interprets the contents of the > script as python code > > However for shell it doesn't work: > > #!/usr/sbin/nbdkit sh > -> runs nbdkit sh <script name> > -> <script name> is interpreted as magic script= parameter > -> the sh plug...
2019 Nov 22
0
Shebang sh plugins (was: Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.)
...#39;s not possible to do it for sh plugins. For (eg) python plugins it works like this: #!/usr/sbin/nbdkit python -> runs nbdkit python <script name> -> <script name> is interpreted as magic script= parameter -> the python plugin works by loading the script using PyRun_SimpleFileEx which interprets the contents of the script as python code However for shell it doesn't work: #!/usr/sbin/nbdkit sh -> runs nbdkit sh <script name> -> <script name> is interpreted as magic script= parameter -> the sh plugin works by actually executing the scr...
2019 Nov 23
0
Re: Shebang sh plugins (was: Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.)
...n plugins it works like this: > > > > #!/usr/sbin/nbdkit python > > -> runs nbdkit python <script name> > > -> <script name> is interpreted as magic script= parameter > > -> the python plugin works by loading the script using > > PyRun_SimpleFileEx which interprets the contents of the > > script as python code > > > > However for shell it doesn't work: > > > > #!/usr/sbin/nbdkit sh > > -> runs nbdkit sh <script name> > > -> <script name> is interpreted as magic script=...
2019 Nov 22
8
Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.
On 11/22/19 1:53 PM, Richard W.M. Jones wrote: > To avoid breaking existing plugins, Python plugins wishing to use > version 2 of the API must opt in by declaring: > > def api_version(): > return 2 > > (Plugins which do not do this are assumed to want API version 1). Could we also permit the python code to declare a global variable instead of a function? But a
2019 Nov 24
1
Re: Shebang sh plugins (was: Re: [PATCH nbdkit v2 03/10] python: Implement nbdkit API version 2.)
...> > > > > > #!/usr/sbin/nbdkit python > > > -> runs nbdkit python <script name> > > > -> <script name> is interpreted as magic script= parameter > > > -> the python plugin works by loading the script using > > > PyRun_SimpleFileEx which interprets the contents of the > > > script as python code > > > > > > However for shell it doesn't work: > > > > > > #!/usr/sbin/nbdkit sh > > > -> runs nbdkit sh <script name> > > > -> <script name&...