[GRASS-user] i.maxlik
Margherita Di Leo
diregola at gmail.com
Wed Feb 13 01:51:09 PST 2013
On Wed, Feb 13, 2013 at 10:50 AM, Margherita Di Leo <diregola at gmail.com>wrote:
> Hi,
>
> On Wed, Feb 13, 2013 at 10:36 AM, Rebecca Stedham <
> rlstedham at btinternet.com> wrote:
>
>> Hello,
>>
>> I am running i.maxlik in python - attempting to automate a processing
>> chain.
>> I use the command:
>>
>> grass.run_command('i.maxlik', group= group, subgroup=subgroup,
>> class='classification', sigfile = sigfile, verbose = True)
>>
>> Infuriatingly, however 'class' is a python keyword and it doesn't run
>> due to 'invalid syntax'.
>>
>> Would you know a way to work around this?
>>
>
> yes there is a workaround, although not recommended, more or less sounds
> like:
>
> import os
>
> ...
>
> os.system("i.maxlik group=group subgroup=subgroup class'classification'
> sigfile=sigfile --v")
>
> BTW I would suggest to report the issue in the trac, in order to prevent
> the use of reserved python keywords in the modules.
>
> Thanks,
> madi
>
>>
>> Regards
>>
>> Becky
>>
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>>
>
>
> --
> Margherita DI LEO
> Postdoctoral Researcher
>
> European Commission - DG JRC
> Institute for Environment and Sustainability (IES). Unit H03 – FRC
> Via Fermi, 2749
> I-21027 Ispra (VA) - Italy - TP 261
>
> Tel. +39 0332 78 3600
> margherita.di-leo at jrc.ec.europa.eu
>
> Disclaimer: The views expressed are purely those of the writer and may not
> in any circumstance be regarded as stating an official position of the
> European Commission.
>
--
Margherita DI LEO
Postdoctoral Researcher
European Commission - DG JRC
Institute for Environment and Sustainability (IES). Unit H03 – FRC
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261
Tel. +39 0332 78 3600
margherita.di-leo at jrc.ec.europa.eu
Disclaimer: The views expressed are purely those of the writer and may not
in any circumstance be regarded as stating an official position of the
European Commission.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130213/31391e72/attachment.html>
More information about the grass-user
mailing list