Skip to content

Instantly share code, notes, and snippets.

View enlavin's full-sized avatar

Miguel Hernandez Martos enlavin

View GitHub Profile
./boost/wave/grammars/cpp_expression_value.hpp: In member function ‘typename boost::spirit::classic::match_result<ScannerT, ContextResultT>::type boost::spirit::classic::impl::concrete_parser<ParserT, ScannerT, AttrT>::do_parse_virtual(const ScannerT&) const [with ParserT = boost::spirit::classic::alternative<boost::spirit::classic::action<boost::spirit::classic::rule<boost::spirit::classic::scanner<std::_List_const_iterator<boost::wave::cpplexer::lex_token<boost::wave::util::file_position<boost::wave::util::flex_string<char, std::char_traits<char>, std::allocator<char>, boost::wave::util::CowString<boost::wave::util::AllocatorStringStorage<char, std::allocator<char> >, char*> > > > >, boost::spirit::classic::scanner_policies<boost::spirit::classic::skip_parser_iteration_policy<boost::spirit::classic::alternative<boost::spirit::classic::alternative<boost::spirit::classic::chlit<boost::wave::token_id>, boost::spirit::classic::chlit<boost::wave::token_id> >, boost::spirit::classic::chlit<boost::wave::token_id>
@enlavin
enlavin / which.py
Created November 8, 2010 16:31
Simple "which" implementation in python featuring partial matching
#!python.exe
"""which command substitute with partial matching search"""
import glob
import os
import sys
try:
partial_fname = sys.argv[1]
except IndexError:
print "which.py <filename>"
@echo off
rem Windows version of http://gist.github.com/320272
if "%1" == "" goto noargs
set MODULE_LOCATION=
for /f %%f in ('python -c "import %1; print %1.__file__.rstrip('c')"') do set MODULE_LOCATION=%%f > NUL 2>&1
if "%MODULE_LOCATION%" == "" goto nomodule