<div dir="ltr">Actually, it might be a good idea to use a batch file...<div><br><div>I've created the following batch file named gdal_calc.bat in the scripts folder:</div><div>@python %~dp0\gdal_calc.py %*<br></div><div><br></div><div>Then running gdal_calc works even if *.py is associated with PyCharm.</div><div>Do you think this issue justifies creating this kind of batch files for the scripts to distribute in binary windows wheels ?</div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 Feb 2021 at 11:41, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/25/21 10:15 AM, Idan Miara wrote:<br>
<br>
> I guess that because I had `scripts` in my path I expected that `python gdal_calc.py` would also work (unrelated to which application is associated with py files), but it seems that it only works for files in the current dir or when providing a full path, and it doesn't work for files in the path (unless you cd to that dir).<br>
> Richard - I'm not sure which batch files you were referring to, which gdal distribution created gdal_calc.bat files for you?<br>
<br>
Hi Idan,<br>
<br>
no worries: I was just guessing. I'm a Linux user, but sometimes Windows user at clients..<br>
<br>
I thought to have seen that some Python packages install small 'bat-files in the Python Scripts folder, just to be able to call the actual python scripts.<br>
<br>
So I was guessing that on Windows there would be a gdal_calc.bat script to call the actual gdal_calc.py.. but apparently I was wrong ;-~<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
</blockquote></div>