'Python'에 해당되는 글. 2건

  1. 2008/02/01 Infinite Streams in Python (2)
  2. 2008/01/07 IronPython Studio December 2007 CTP Release

 C#, C++에 이어서.. Infinite Streams를 이번에는 Python으로 구현 해보았습니다.
 최근에 사내에서 Python으로 프로젝트를 하나 진행하고 있는데..
 Python도 참 매력적인 언어라는 생각이 듭니다.

 Python에는 언어자체에서 infinite를 지원하고 있습니다.
 따라서 이전에 C++로 삽질을 한 것에 비하면 아래 처럼 매우 쉽게 구현할 수 있습니다.

from itertools import *

def fibs():
    yield 1;
    yield 1;
    h, t = tee(fibs())
    t.next()
    for i in imap(lambda (a,b):a+b, izip(h, t)):
            yield i

for i in islice(ifilter(lambda x:x%2==0, fibs()), 10): print i
 C# 코드와 사실상 별 다를바가 없는 코드지만... 언어에서 지원해주는 것이 많은 만큼 코드가 약간 깔끔해졌다(?)는 느낌이 드네요 .

Posted by U∙Seung





약간 지난 소식 이지만.. Visual Studio 2008 Shell Runtime을 기반으로하여 IronPython 프로그래밍을 할 수 있는 IDE가 나왔습니다. IronPython Studio라는 녀석이고요, 설치용 다운로드 및 소스코드 다운로드도 가능합니다.

동영상을 보시면 빠른 이해가 되시리라 봅니다만 지원되는 기능을 간략히 나열 해보면...
- Project creation
 -Syntax coloring
- Intellisense
- Debug supporting (break point, watch, locals, autos .. )
- Immediate window
- IronPython console window
  * intellisense in console window
- WinForm Application
- WPF Application
- Code Snippets


설치 방법은...
#1. Microsoft Visual Studio 2008 Shell (isolated mode) Redistributable Package
#2. IronPython Studio December 2007 CTP Setup

을 순서대로 설치하면 됩니다.


Known Issues more...

Posted by U∙Seung