English 中文(简体)
• 采取互动模式
原标题:Making Python Interactive Mode of Emacs Highlight and Indent
  • 时间:2010-01-14 10:09:49
  •  标签:
  • python
  • emacs

我正在使用第23号信标和5.1.0版,以编辑我的假日方案。 有时,在撰写一项方案时,我想要掌握一个小块扔 throw的手法,因此我进行互动移动(C-c!)。 这是一种罚款,但是,它既不是推论,也不是突出法典,如果我试图在守则中采用假装,那么它就不再评价。 因此,我如何确定它,强调它?

问题回答

在我身上添加这些内容似乎已经做到。

在咨询中核对缓冲名称的比照或许会更好,因为它是对由定点-pycomint-keywords确定的缓冲-当地变数的检验,但你会获得这一想法。

(defun set-pycomint-keywords ()
  (setq font-lock-keywords      python-font-lock-keywords))

(add-hook  py-shell-hook  set-pycomint-keywords)



 (defadvice comint-send-input (around block-comint-formatting activate)
  (if (string= (buffer-name) "*Python*")
      (letf (((symbol-function  add-text-properties) (lambda (x y z) nil)))
        ad-do-it))
  ad-do-it)

I don t have time to try it now, but i found you can replace python shell when you press C-c with this that should be more powerful:

http://ipython.scipy.org/moin/

当伤者有时间时,我会给它一个尝试。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签