google / pyringe

Debugger capable of attaching to and injecting code into python processes.
Other
1.63k stars 78 forks source link

unclear message when gdb is not installed #10

Open sandlbn opened 10 years ago

sandlbn commented 10 years ago

When gdb is not installed pyringe returns unclear message. Gdb is not installed by default in MacOS 10.9 .

sandlbn commented 10 years ago

I apologize for this amount of commits and small question, why indentations are incompatible with the pep8 ?

vinitkumar commented 10 years ago

Google uses different indentation than pep8. You might want to check Google Python Style Guide here http://google-styleguide.googlecode.com/svn/trunk/pyguide.html

If you use Vim, you might want to use this setting:\

" Indent Python in the Google way.

setlocal indentexpr=GetGooglePythonIndent(v:lnum)

let s:maxoff = 50 " maximum number of lines to look backwards.

function GetGooglePythonIndent(lnum)

  " Indent inside parens.
  " Align with the open paren unless it is at the end of the line.
  " E.g.
  "   open_paren_not_at_EOL(100,
  "                         (200,
  "                          300),
  "                         400)
  "   open_paren_at_EOL(
  "       100, 200, 300, 400)
  call cursor(a:lnum, 1)
  let [par_line, par_col] = searchpairpos('(\|{\|\[', '', ')\|}\|\]', 'bW',
        \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
        \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
        \ . " =~ '\\(Comment\\|String\\)$'")
  if par_line > 0
    call cursor(par_line, 1)
    if par_col != col("$") - 1
      return par_col
    endif
  endif

  " Delegate the rest to the original function.
  return GetPythonIndent(a:lnum)

endfunction

let pyindent_nested_paren="&sw*2"
let pyindent_open_paren="&sw*2"
sandlbn commented 10 years ago

@vinitkumar : Thanks. This file should help me http://google-styleguide.googlecode.com/svn/trunk/google_python_style.vim :)

vinitkumar commented 10 years ago

@sandlbn Yes, what I pasted was content of that file ;)

jack17529 commented 7 years ago

Anybody working? Or should I take it?