How to invoke PyCharm from command-line with file name and line number?

Hi,

I want to invoke PyCharm from command line with specifying file name and line number, similar to emacsclient.

For example, emacsclient command invokes Emacs such as:

  $ emacsclient -n +123 example.py

Or mate command to invoke Textmate:

  $ mate -l 123 example.py

Is there any equvarent command to emacsclient or mate for PyCharm?

Thank you.

3 comments
Comment actions Permalink

Hello makoto,

Not yet. It's likely that we'll support this in PyCharm 1.1.

I want to invoke PyCharm from command line with specifying file name

and line number, similar to emacsclient.

For example, emacsclient command invokes Emacs such as:

$ emacsclient -n +123 example.py

Or mate command to invoke Textmate:

$ mate -l 123 example.py

Is there any equvarent command to emacsclient or mate for PyCharm?

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

This is very good to know! Thanks for this feature!

0
Comment actions Permalink

Hi Dmitry, thank you for your replay.

I wonder that it may be a little hard to create 'mate'-like command for PyCharm because it is implemented in Java which is os-independent language.

Eclipse also doesn't provide 'mate'-like command, but it has a small plug-in to accept file name and line number via TCP port.

eclipsecall: http://www.jaylib.org/eclipsecall/

This plugin invokes a small server in Eclipse, and client can send file name and line number to it.

  ## client program example

  import socket

  sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

  sock.connect(('localhost', 2341))

  sock.send('file.txt|123')

  sock.close()

I hope this will help you to implement 'mate'-like command for PyCharm.

0

Please sign in to leave a comment.