Vimãã¢ãããã¼ããããVimããPythonã®lxmlã使ããªããªã£ãã®ã§Vimãéå»çã«æ»ãã
ã¡ããã¨èª¿ã¹ããã¦ããªãã®ã§æççãªæ å ±ã«ãªããã©ã¡ã¢
ãã¶ãã³ã³ãã¤ã©ãVC9ããVC10ã«å¤ãã£ããã¨ã§Pythonã¨ã³ã³ãã¤ã©ãåããDLLã®èªã¿è¾¼ã¿ã§ã¨ã©ã¼
Vimã®ã³ã³ãã¤ã©ãVC9æ代ã®kaoriyaããã®ã¨ããã®æ§ãã¼ã¸ã§ã³7.2ã«æ»ããã¨ããèªã¿è¾¼ããããã«ãªã£ã
ä»ã®ã¨ããPython2.7/2.6ã¯VC9ã³ã³ãã¤ã©ã«ãªã£ã¦ããã®ã§VimããPythonã使ãå ´åã§pydãèªã¿è¾¼ãã¿ã¤ãã®ã©ã¤ãã©ãªã使ãããå ´åã¯PythonãVimãèªåã§ãã«ãããããVimã7.2ã«æ»ãå¿
è¦ãããã¿ããã
Windows 7ã§IPythonã使ãå ´åã®è£å®
IPythonã§è£å®ã使ç¨ããå ´åã«ãWindows XPã§ã¯TABã§è£å®æã«ã¦ãã¼ã¯ã§ãªãã£ã
å ´åã¯åè£ã表示ãããããWindows 7ã«ãªã£ã¦ããã¯ãªã¹ããåºãªãã¦ä½¿ãã«ããã£
ãã®ã解決ããã
åè£ãè¤æ°ããå ´åã¯Ctrl+lã§åè£ã表示ãããã
vimã§Pythonã使ãã¨ãã«ã¤ã³ãã¼ãã¨ã©ã¼
vimã¹ã¯ãªãããä½ããã¨ãããã¨ã©ã¼
:py import lxml.html Traceback (most recent call last): File "", line 1, in File "C:\Python26\lib\site-packages\lxml-2.3beta1-py2.6-win32.egg\lxml\html\__init__.py", line 12, in from lxml import etree ImportError: DLL load failed: æå®ãããã¢ã¸ã¥ã¼ã«ãè¦ã¤ããã¾ããã
lxmlã®ã¢ã¸ã¥ã¼ã«ãèªããªãã¿ããã
pythonåä½ã§ã®importã¯ãã¾ããããããvimã¨pythonã§ç¸æ§ãæªãã®ããªï¼ï¼
ã©ãããããããã®ããããã
11/12 追è¨
å¥ã®ç°å¢ã§ã¯åä½ããã
C:\Python26ã«PATHãéã£ã¦ãªããããããããªãã
PATHãéãã¦ããã¯ãåä½ããªãã
éãã¨ããã°åä½ããã®ã¯XPã§ä»åããªãã®ã¯7ã¨ãããã¨ãããããªï¼
11/19 追è¨
gvimã7.3.62ã«ãã¼ã¸ã§ã³ã¢ãããããåä½ããã
åè¨å·ã®æ±ã
åè¨å·(0xA5)ãsjisã§ã¯è§£éã§ãããã©ãcp932ã§ã¯è§£éã§ããªãã
sjisã§ã¯éã«æ ªã¨ãã解éã§ããªãã®ã§å°ãã
ã¨ããããã¯mbcsã§ã¨ã³ã³ã¼ããããã¨ã§åé¿ããã
>>> print u'\xa5'.encode('sjis')
-
- > print(u'\xa5'.encode('sjis'))
-
- > print(u'\xa5'.encode('cp932'))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- > print(u'\xa5'.encode('cp932'))
-
- > print(u'\xa5'.encode('mbcs'))
vimwikiãåä½ããªãã¦å°ã£ã
åå ã¯vimball_homeã§ã¯ãªã$VIMRUNTIME/ftpluginã«vimwiki.vimããã£ããã¨ã
ãã£ã¨ã¢ãããã¼ãã«å¤±æãã¦ãããã ã¨ãããã
vimwikiãã¢ãããã¼ãããã¨ãã¯æåãã¡ã¤ã«ã³ãã¼ããããã«ãããã
[Python]os.walkã§Unicodeã®ãã¡ã¤ã«åãæ¤ç´¢ãã
os.walkã§Shift_JISã§æ±ããªãæåã®ãã¡ã¤ã«ãåå¨ããå ´åã«stringã§ãã©ã«ãã
æ¤ç´¢ããã¨æåãï¼ï¼ï¼ã«ãªãã
>>> for root,dirs,files in os.walk('c:\\temp\\unicode'): ... print root ... print files ... c:\temp\unicode ['?.txt']
os.walkã«æ¸¡ãæååãUnicodeæååã¨ãã¦æ¸¡ãã°æ£ããåå¾ã§ããã
>>> for root,dirs,files in os.walk(u'c:\\temp\\unicode'): ... print root ... print files ... c:\temp\unicode [u'\u2661.txt']
netrwã¨shellslash
ã¡ãã£ã¨ã¯ã¾ã£ã¦ãã®ã§ã¡ã¢
shellslashãè¨å®ããã¨windowsã§ãvimã®ãã¡ã¤ã«åè£å®ãªã©ã§ãã£ã¬ã¯ããªã®åºåãæåãã¹ã©ãã·ã¥ã«ãªãã
ãªããåé¡ããã£ã¦ã¹ã©ãã·ã¥ã«å¤æ´ãã¦ããã¨æã£ããã ãã©shellslashãè¨å®ããã¨shellescape()ã§ã³ãã³ãã©ã¤ã³ç¨ã®ã¯ã©ã¼ããããã«ã¯ã©ã¼ãããã·ã³ã°ã«ã¯ã©ã¼ãã«å¤æ´ããã¦netrwã§http:ããªã©ãéããã¨ãã«ã¨ã©ã¼ã«ãªããããã