Thursday, November 25, 2010

Re: makeprg and path arguments containing spaces

Am 25.11.2010 03:45, schrieb Jean-Rene David:
> * Wolfgang Schmidt [2010.11.24 12:50]:
>> So I tried the following:
>>
>> setlocal makeprg=c:\sdk\win32\1.1\Python26\Scripts/pylint.bat\
>> --rcfile=C:\Program\ Files\ (x86)\vim\pylintrc\
>> --output-format=parseable\ --reports=n\ %
>>
>> The problem seem to be the spaces in the --rcfile path argument. If I
>> put the pylintrc directly to my c: drive and change the command
>> accordingly:
>>
>> setlocal makeprg=c:\sdk\win32\1.1\Python26\Scripts/pylint.bat\
>> --rcfile=c:\pylintrc\ --output-format=parseable\ --reports=n\ %
> You don't say what error you get so I'll take a stab in the dark:
> are you sure it's not pylint who's barfing on the arguments?

@ Jean-Rene: Thanx for your reply. I get the following traceback:

|| No config file found, using default configuration
|| Traceback (most recent call last):
|| File "c:\sdk\win32\1.1\Python26\Scripts\pylint.bat", line 12, in
<module>
|| lint.Run(sys.argv[1:])
|| File "c:\sdk\win32\1.1\Python26\lib\site-packages\pylint\lint.py",
line 901, in __init__
|| linter.check(args)
|| File "c:\sdk\win32\1.1\Python26\lib\site-packages\pylint\lint.py",
line 457, in check
|| filemods = self.expand_files(files_or_modules)
|| File "c:\sdk\win32\1.1\Python26\lib\site-packages\pylint\lint.py",
line 527, in expand_files
|| self.set_current_module(modname)
|| File "c:\sdk\win32\1.1\Python26\lib\site-packages\pylint\lint.py",
line 552, in set_current_module
|| self.stats['by_module'][modname] = {}
|| TypeError: 'NoneType' object is unsubscriptable

This is the same traceback that I get if I call pylint from the
commandline (omitting the backslashes). In the commandline I can fix
this behaviour by wrapping the pylintrc path into double quotes as follows:

c:\sdk\win32\1.1\Python26\Scripts/pylint.bat --rcfile="C:\Program Files\
(x86)\vim\pylintrc" etc.

But how can I pass this through Vim? Do I have to mask the double quotes?

Thanx in advance

Wolfgang

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: