windows & python & Emacs
ÉèÖÃEmacsµÄHOME,¿ÉÒÔÔÚscratch bufferÖÐÊäÈ룺(insert (getenv "HOME"))²é¿´
ÏÂÔØpython-mode.el
ÓÃEmacs´ò¿ªpython-mode.elÈ»ºóM-x byte-compile-file±àÒëpython-mode.elΪelc
C-h v²é¿´load-path±äÁ¿
ÔÚHOME/.emacs.d/init.elÖÐÌí¼Ó(setq load-path (cons "D:\\emacs-23.1-bin-i386" load-path))
½«pyÎļþÓëpython mode ¹ØÁª£¬½«python½âÊÍÆ÷Óëpython-mode¹ØÁª
ÏÂÔØcolor-theme.el£¬·ÅÈëload-path£¬ÔÚinit.elÖмÓÈ룺(require ‘color-theme)£¬È»ºó¾Í¿ÉÒÔÓà M-x color-theme-select À´Ñ¡ÔñÄãϲ»¶µÄÑÕÉ«Ö÷ÌâÁË£¬Ëü»á´ò¿ªÒ»¸öÁÐ±í£¬ÔÚÿ¸öÁбíÏîÄ¿Éϻسµ»áÓ¦ÓÃÄǸöÑÕÉ«Ö÷Ì⣬Èç¹ûÑ¡ÉÏÁËij¸öÖ÷Ì⣬°´Ò»Ï d £¬»á³öÏÖÀàËÆ£º
color-theme-sitaramv-nt is an interactive compiled Lisp function in `color-theme.el'.
(color-theme-sitaramv-nt)
Black foreground on white background.
Includes faces for font-lock, widget, custom, speedbar.
[back]
µÄ¶«Î÷£¬ÆäÖÐÄǾä (color-theme-sitaramv-nt) ¼ÓÈëµ½ÄãµÄ ~/.emacs ÀïÃæÈ¥£¬¾Í¿ÉÒÔÓÀ¾ÃÓ¦ÓÃÕâ¸öÑÕÉ«Ö÷ÌâÁË¡£
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\GNU\Emacs]
"HOME"="D:\\emacs-23.1-bin-i386"
(setq load-path (cons "E:\\emacs-23.1-bin-i386" load-path))
(setq auto-mode-alist
(cons '("\\.py$". python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python". python-mode) interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(require 'color-theme)
(color-theme-gnome2)
Ïà¹ØÎĵµ£º
ÀµÓºƣ¨http://laiyonghao.com£©
¹Ø¼ü×Ö£ºpython, easy_install, setuptools, myentunnel, polipo, windows, linux, socks5, http, proxy
ÒòΪһЩÖÚËùÖÜÖªµÄÔÒò£¬ÎÒÃÇÓÐÐ©ÍøÕ¾ÎÞ·¨·ÃÎÊ£¬Ôì³ÉÉú»îºÍÉú²úµÄ¾Þ´ó²»±ã¡£ÆäÖжÔÎÒÓ°Ïì±È½Ï´óµÄÒ»¸ö¾ÍÊǰ²×°Ä³Ð© Python Ä£¿éµÄʱºò£¬easy_install ÎÞ·¨·ÃÎʵ½ÍøÕ¾¡£ÔÚÕâÀï·ÖÏíÈ ......
PythonÄÚ½¨Òì³£Ìåϵ½á¹¹
BaseException
+--¡¡SystemExit
+--¡¡KeyboardInterrupt
+--¡¡GeneratorExit
+--¡¡Exception
+--¡¡StopIteration
+--¡¡StandardError
|¡¡¡¡¡¡¡¡+--¡¡BufferError
|¡¡¡¡¡¡¡¡+--¡¡ArithmeticError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡FloatingPointError
|¡¡¡¡¡¡¡¡|¡¡¡¡¡¡¡¡+--¡¡OverflowError
|¡¡¡¡ ......
´úÂë+½á¹û£¬²»×ö½âÊÍ
µ±È»£¬¶ÔÓÚpythonûÓÐvirtual functionһ˵£¬¹À¼Æµ±×÷¶Ô±ÈÒ»¸öÀý×Ó¿´¿´°É¡£
#include <iostream>
using namespace std;
class base
{
public:
virtual void foo() { cout << "base" << endl; }
base() { foo() ;}
};
class derive: public base
{
pub ......
µ±pythonÖм䴦Àí·ÇASCII±àÂëʱ£¬¾³£»á³öÏÖÈçÏ´íÎó£º
UnicodeDecodeError: 'ascii' codec can't decode byte 0x?? in position 1: ordinal not in range(128)
0x??Êdz¬³ö128µÄÊý×Ö£¬pythonÔÚĬÈϵÄÇé¿öÏÂÈÏΪÓïÑԵıàÂëÊÇascii±àÂ룬ËùÒÔÎÞ·¨´¦ÀíÆäËû±àÂ룬ÐèÒªÉèÖÃpythonµÄĬÈϱàÂëΪËùÐèÒªµÄ±àÂë¡£
Ò»¸ö½â¾öµÄ·½°¸ÊÇ ......
def retrive_emails(pop3_server, user_name, passwd, server_port):
#POP3
pop_client = poplib.POP3(pop3_server, port=server_port)
pop_client.user(user_name)
pop_client.pass_(passwd)
......