<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>plusHa &#187; Python</title>
	<atom:link href="http://plusha.com/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://plusha.com</link>
	<description>in the light</description>
	<lastBuildDate>Sat, 31 Dec 2011 01:57:59 +0000</lastBuildDate>
	<language>ko</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='plusha.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>plusHa &#187; Python</title>
		<link>http://plusha.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://plusha.com/osd.xml" title="plusHa" />
	<atom:link rel='hub' href='http://plusha.com/?pushpress=hub'/>
		<item>
		<title>Quick backup</title>
		<link>http://plusha.com/2009/04/14/quick-backup/</link>
		<comments>http://plusha.com/2009/04/14/quick-backup/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 05:07:29 +0000</pubDate>
		<dc:creator>plusha</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[backup]]></category>

		<guid isPermaLink="false">http://plusha.wordpress.com/2009/04/14/quick-backup/</guid>
		<description><![CDATA[수치해석을 위한 프로그래밍을 주로 하는 제 경험상 프로그램들을 크게 수정하기 전후로 backup을 해야겠는데 CVS, Subversion, Git과 같은 version관리 프로그램은 쓰기가 거추장스럽더군요. 그렇다고 매번 복사하기는 귀찮고 해서 빠르고 간단하게 backup 할 수 있는 python script를 작성하여 사용하고 있습니다. quickBackup.py라는 script로, 실행하면 현재 디렉토리 아래에 ./bak라는 디렉토리를 만들고 파일을 backup해줍니다. 파일 이름이 source.f90일 경우 ./bak/source.bak01.f90 과 같이 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=229&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>수치해석을 위한 프로그래밍을 주로 하는 제 경험상 프로그램들을 크게 수정하기 전후로 backup을 해야겠는데 <a href="http://www.nongnu.org/cvs/" target="_blank">CVS</a>, <a href="http://subversion.tigris.org/" target="_blank">Subversion</a>, <a href="http://git-scm.com/" target="_blank">Git</a>과 같은 version관리 프로그램은 쓰기가 거추장스럽더군요. 그렇다고 매번 복사하기는 귀찮고 해서 빠르고 간단하게 backup 할 수 있는 python script를 작성하여 사용하고 있습니다. <a href="http://sites.google.com/site/libgpl/Home/files/quickBackup.py?attredirects=0" target="_blank">quickBackup.py</a>라는 script로, 실행하면 현재 디렉토리 아래에 ./bak라는 디렉토리를 만들고 파일을 backup해줍니다. 파일 이름이 source.f90일 경우 ./bak/source.bak01.f90 과 같이 복사를 하는 것이죠.</p>
<p>Backup 파일 이름은 option으로 조절할 수 있고, 자동으로 log file을 만들어 언제 어떤 파일을 backup했는지 알려줍니다. 원한다면 backup하면서 간단한 comment도 달 수 있습니다. 가장 마지막에 backup한 파일과 지금 backup하려는 파일이 동일할 경우에는 backup하지 않습니다. 한번에 여러 개의 파일을 backup할 수도 있습니다.^^</p>
<p>&#160;</p>
<blockquote><p>Gpl Quick Backup     <br />&#160;&#160;&#160; make &#8216;./bak&#8217; directory and backup files      <br />Usage :      <br />&#160;&#160;&#160; quickBackup.py [-h/-b/-t] filename</p>
<p>Required parameters :     <br />&#160;&#160;&#160; filename </p>
<p>Optional parameters :&#160; <br />&#160;&#160;&#160; -h&#160;&#160; : place backup number at head ( bak01.filename.extension )      <br />&#160;&#160; -b&#160;&#160; : place backup number between filename and extension ( filename.bak01.extension )      <br />&#160;&#160;&#160; -t&#160;&#160; : place backup number at tail ( filename.extension.bak01 )      <br />&#160;&#160;&#160; ** default : -b      <br />&#160;&#160;&#160; -c&#160;&#160; : add comment to the log file ( ./bak/quickBackup.log ) </p>
<p>Examples :     <br />&#160;&#160;&#160; quickBackup.py file1.f90 file2.f      <br />&#160;&#160;&#160; (edit file1.f90)      <br />&#160;&#160;&#160; quickBackup.py file1.f90      <br />&#160;&#160;&#160; ls ./bak      <br />&#160;&#160;&#160; -&gt; file1.bak01.f90&#160; file1.bak02.f90&#160; file2.bak01.f&#160; quickBackup.log</p>
</blockquote>
<br /> Tagged: backup, Python <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/plusha.wordpress.com/229/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/plusha.wordpress.com/229/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/plusha.wordpress.com/229/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=229&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://plusha.com/2009/04/14/quick-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">plusha</media:title>
		</media:content>
	</item>
		<item>
		<title>PyX example &#8211; Typecurve, Reserve</title>
		<link>http://plusha.com/2008/12/16/pyx-example-type-curve/</link>
		<comments>http://plusha.com/2008/12/16/pyx-example-type-curve/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 02:45:20 +0000</pubDate>
		<dc:creator>plusha</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[PyX]]></category>

		<guid isPermaLink="false">http://plusha.com/?p=152</guid>
		<description><![CDATA[위 그림을 그리기 위한 python code는 다음과 같습니다. 그리고 데이터를 만들기 위한 code는 다음과 같습니다. 아래의 그림들은 다음의 data를 이용하여 그렸습니다. 6 2070 12 1755 18 1510 24 1315 30 1155 36 1025 42 915 Log scale로 그리기 적분 그림 넣기 다음 그림은 아래의 data를 이용하여 그렸습니다. 6 39.42857 12 42.97959 18 46.46154 24 49.3125 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=152&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_154" class="wp-caption aligncenter" style="width: 460px"><a href="http://plusha.files.wordpress.com/2008/12/typecurve.png"><img class="size-full wp-image-154" title="typecurve" src="http://plusha.files.wordpress.com/2008/12/typecurve.png?w=500" alt="Arps typecurve"   /></a><p class="wp-caption-text">Arps typecurve</p></div>
<p>위 그림을 그리기 위한 python code는 다음과 같습니다.</p>
<p><pre class="brush: python;">
from pyx import *

g=graph.graphxy(width=10,
                x=graph.axis.log(
                        title='$t_{Dd}$',min=0.01,max=1000,
                        painter=graph.axis.painter.regular(gridattrs=[color.gray(0.5)],tickattrs=[color.gray(0.5)])
                        ),
                x2=graph.axis.log(min=0.01,max=1000,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.gray(0.5)])),
                y=graph.axis.log(
                        title='$q_{Dd}$',min=0.001,max=10,
                        painter=graph.axis.painter.regular(gridattrs=[color.gray(0.5)],tickattrs=[color.gray(0.5)]))
                ,y2=graph.axis.log(min=0.001,max=10,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.gray(0.5)]))
                        )
g.plot([graph.data.file(&quot;arps.dat&quot;,x=1,y=j) for j in [3,4,5,6,8,9,10,11]],
                [graph.style.line([style.linestyle.solid,style.linewidth.Thin,color.gray(0.3)])])
g.plot([graph.data.file(&quot;arps.dat&quot;,x=1,y=j) for j in [2,7,12]],[graph.style.line([style.linestyle.solid,style.linewidth.Thick])])

g.text(5,0.5,r&quot;$b=0.0$&quot;)
g.text(6.7,0.5,r&quot;$b=0.5$&quot;)
g.text(8.8,0.5,r&quot;$b=1.0$&quot;)

g.writeEPSfile('typeCurve')
</pre></p>
<p>그리고 데이터를 만들기 위한 code는 다음과 같습니다.</p>
<p><pre class="brush: python;">
import math
fout='arps.dat'
f=open(fout,'w')

for it in range(-30,40):
        tdd=10.0**(it/10.0)
        q=range(11)
        q[0]=math.exp(-tdd)
        for ib in range(1,11):
                b=ib*0.1
                q[ib]=(1+b*tdd)**(-1/b)

        f.write(&quot;%s&quot;%tdd)
        for j in range(0,11):
                f.write(&quot; %s&quot;%q[j])
        f.write(&quot;\n&quot;)

f.close()
</pre></p>
<p>아래의 그림들은 다음의 data를 이용하여 그렸습니다.<br />
<span id="more-152"></span></p>
<blockquote><p>6       2070<br />
12      1755<br />
18      1510<br />
24      1315<br />
30      1155<br />
36      1025<br />
42      915</p></blockquote>
<div id="attachment_162" class="wp-caption aligncenter" style="width: 460px"><a href="http://plusha.files.wordpress.com/2008/12/hwlin.png"><img class="size-full wp-image-162" title="hwlin" src="http://plusha.files.wordpress.com/2008/12/hwlin.png?w=500" alt="linear"   /></a><p class="wp-caption-text">linear</p></div>
<p><pre class="brush: python;">from pyx import *

g=graph.graphxy(width=10,
                x=graph.axis.lin(
                        title='$t \ (month)$',min=1,max=100,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange])
                        ),
                x2=graph.axis.lin(min=1,max=100,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange])),
                y=graph.axis.lin(
                        title='$q(t) \ (bbls/day)$',min=1,max=3000,texter=graph.axis.texter.decimal(),
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange]))
                ,y2=graph.axis.lin(min=1,max=15000,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange]))
                        )
g.plot( [graph.data.file(&quot;hwb05535.dat&quot;,x=1,y=2)],
                [graph.style.symbol(graph.style.symbol.circle, size=0.1,
                        symbolattrs=[deco.stroked([color.rgb.blue])])]
                )   

g.writeEPSfile('hwlin.eps')</pre></p>
<p>Log scale로 그리기</p>
<div id="attachment_164" class="wp-caption aligncenter" style="width: 460px"><a href="http://plusha.files.wordpress.com/2008/12/hwlog.png"><img class="size-full wp-image-164" title="hwlog" src="http://plusha.files.wordpress.com/2008/12/hwlog.png?w=500" alt="logarithmic"   /></a><p class="wp-caption-text">logarithmic</p></div>
<p><pre class="brush: python;">from pyx import *

g=graph.graphxy(width=10,
                x=graph.axis.log(
                        title='$t \ (month)$',min=1,max=100000,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange])
                        ),
                x2=graph.axis.log(min=1,max=100000,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange])),
                y=graph.axis.log(
                        title='$q(t) \ (bbls/day)$',min=10,max=100000,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange]))
                ,y2=graph.axis.log(min=10,max=100000,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange]))
                        )

g.plot( [graph.data.file(&quot;hwb05535.dat&quot;,x=1,y=2)],
                [graph.style.symbol(graph.style.symbol.circle, size=0.1,
                        symbolattrs=[deco.stroked([color.rgb.blue])])]
                )       

g.writeEPSfile('hwlog.eps')</pre></p>
<p>적분 그림 넣기</p>
<div id="attachment_163" class="wp-caption aligncenter" style="width: 460px"><a href="http://plusha.files.wordpress.com/2008/12/hwlinintegral.png"><img class="size-full wp-image-163" title="hwlinintegral" src="http://plusha.files.wordpress.com/2008/12/hwlinintegral.png?w=500" alt="integral"   /></a><p class="wp-caption-text">integral</p></div>
<p><pre class="brush: python;">from pyx import *

Xmin=0
Xmax=350
Ymin=0
Ymax=2500
g=graph.graphxy(width=10,
                x=graph.axis.lin(
                        title='$t \ (month)$',min=Xmin,max=Xmax,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange])
                        ),
                x2=graph.axis.lin(min=Xmin,max=Xmax,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange])),
                y=graph.axis.lin(
                        title='$q(t) \ (bbls/day)$',min=Ymin,max=Ymax,texter=graph.axis.texter.decimal(),
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange]))
                ,y2=graph.axis.lin(min=Ymin,max=Ymax,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange]))
                        )
g.plot( [graph.data.file(&quot;hwb05535.dat&quot;,x=1,y=2)],
                [graph.style.symbol(graph.style.symbol.circle, size=0.1,
                        symbolattrs=[deco.stroked([color.rgb.blue])])]
                )
d=g.plot( graph.data.function(&quot;y(x)=2311*(1+0.0276*0.5535*x)**(-1.0/0.5535)&quot;))
g.finish()
p=d.path        

pa=g.xgridpath(42)
pb=g.xgridpath(307)
(splita,),(splitpa,)=p.intersect(pa)
(splitb,),(splitpb,)=p.intersect(pb)
area=(pa.split([splitpa])[0] &lt; &lt;
                p.split([splita,splitb])[1] &lt;&lt;
                pb.split([splitpb])[0].reversed())
area[-1].close()
g.stroke(area,[deco.filled([color.cmyk.RoyalBlue])])

g.text(2,2.3,r&quot;Reserves:&quot;,textattrs=[text.size.Large])
g.text(4.2,2.3,r&quot;\int_{t_{now}}^{t_{el}}q(t)dt&quot;,textattrs=[text.size.Large,text.mathmode])
g.text(8,0.5,r&quot;t_{el}=307&quot;,textattrs=[text.size.large,text.mathmode])

g.writeEPSfile('hwlinintegral.eps')</pre></p>
<p>다음 그림은 아래의 data를 이용하여 그렸습니다.</p>
<blockquote><p>6       39.42857<br />
12      42.97959<br />
18      46.46154<br />
24      49.3125<br />
30      53.30769<br />
36      55.90909</p>
<div id="attachment_165" class="wp-caption aligncenter" style="width: 460px"><a href="http://plusha.files.wordpress.com/2008/12/nind.png"><img class="size-full wp-image-165" title="nind" src="http://plusha.files.wordpress.com/2008/12/nind.png?w=500" alt="Nind's method"   /></a><p class="wp-caption-text">Nind&#39;s method</p></div>
<p><pre class="brush: python;">from pyx import *

Xmin=0
Xmax=50
Ymin=30
Ymax=60
g=graph.graphxy(width=10,
                x=graph.axis.lin(
                        title='$t \ (month)$',min=Xmin,max=Xmax,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange])
                        ),
                x2=graph.axis.lin(min=Xmin,max=Xmax,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange])),
                y=graph.axis.lin(
                        title='$ 1/D \ (month)$',min=Ymin,max=Ymax,texter=graph.axis.texter.decimal(),
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange],tickattrs=[color.cmyk.Orange]))
                ,y2=graph.axis.lin(min=Ymin,max=Ymax,parter=None,
                        painter=graph.axis.painter.regular(gridattrs=[color.cmyk.Orange]))
                        )
g.plot( [graph.data.file(&quot;nind.dat&quot;,x=1,y=2)],
                [graph.style.symbol(graph.style.symbol.circle, size=0.1,
                        symbolattrs=[deco.stroked([color.rgb.blue])])]
                )
g.plot( [graph.data.function(&quot;y(x)=0.5535*x+36.276&quot;)]
                )

g.text(4.5,3.15,r&quot;$1/D=0.5535t+36.276$&quot;,textattrs=[text.size.Large])
g.text(4.55,2.2,r&quot;$b=0.5535$&quot;,textattrs=[text.size.Large])
g.text(4.2,1.65,r&quot;$D_i=0.0276/month$&quot;,textattrs=[text.size.Large])

g.writeEPSfile('nind.eps')</pre></p>
<br /> Tagged: Python, PyX <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/plusha.wordpress.com/152/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/plusha.wordpress.com/152/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/plusha.wordpress.com/152/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=152&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://plusha.com/2008/12/16/pyx-example-type-curve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">plusha</media:title>
		</media:content>

		<media:content url="http://plusha.files.wordpress.com/2008/12/typecurve.png" medium="image">
			<media:title type="html">typecurve</media:title>
		</media:content>

		<media:content url="http://plusha.files.wordpress.com/2008/12/hwlin.png" medium="image">
			<media:title type="html">hwlin</media:title>
		</media:content>

		<media:content url="http://plusha.files.wordpress.com/2008/12/hwlog.png" medium="image">
			<media:title type="html">hwlog</media:title>
		</media:content>

		<media:content url="http://plusha.files.wordpress.com/2008/12/hwlinintegral.png" medium="image">
			<media:title type="html">hwlinintegral</media:title>
		</media:content>

		<media:content url="http://plusha.files.wordpress.com/2008/12/nind.png" medium="image">
			<media:title type="html">nind</media:title>
		</media:content>
	</item>
		<item>
		<title>Python plotting libraries</title>
		<link>http://plusha.com/2008/12/16/python-plotting-libraries/</link>
		<comments>http://plusha.com/2008/12/16/python-plotting-libraries/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 01:25:17 +0000</pubDate>
		<dc:creator>plusha</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Matplotlib]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[PyX]]></category>
		<category><![CDATA[PyXPlot]]></category>

		<guid isPermaLink="false">http://plusha.com/?p=147</guid>
		<description><![CDATA[제가 접해본 python을 이용한 그림 그리기 프로그램 중 쓸만한 것으로는 Matplotlib과 PyX가 있습니다. 둘 다 python으로 코드를 짜면 그림을 그려주는 프로그램으로, paper에 출판할 수 있을 정도의 그림을 그릴 수 있습니다. 그 외에 PyXPlot이라고, gnuplot과 유사한 interface를 이용하면 자체적으로 PyX를 이용해 그림을 그려주는 프로그램이 있습니다. Matplotlib은 제일 처음에 접했는데, 잠깐 쓰다가 말았습니다. 당시에는 기능이 떨어졌는데, 얼마 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=147&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>제가 접해본 python을 이용한 그림 그리기 프로그램 중 쓸만한 것으로는 <a href="http://matplotlib.sourceforge.net/" target="_blank">Matplotlib</a>과 <a href="http://pyx.sourceforge.net/" target="_blank">PyX</a>가 있습니다. 둘 다 python으로 코드를 짜면 그림을 그려주는 프로그램으로, paper에 출판할 수 있을 정도의 그림을 그릴 수 있습니다. 그 외에 <a href="http://www.pyxplot.org.uk/" target="_blank">PyXPlot</a>이라고, gnuplot과 유사한 interface를 이용하면 자체적으로 PyX를 이용해 그림을 그려주는 프로그램이 있습니다.</p>
<p>Matplotlib은 제일 처음에 접했는데, 잠깐 쓰다가 말았습니다. 당시에는 기능이 떨어졌는데, 얼마 전에 보니 많이 upgrade 되었더군요. 앞으로 많이 사용하게 될 듯 합니다.</p>
<p>PyX는 eps, pdf 파일을 만들어줍니다. 상당히 자세한 부분까지 수정할 수 있어서 개인적으로 좋아하는 프로그램입니다. 하지만 update가 잘 안 되고, contour 그리기 기능이 없네요.</p>
<p>PyXPlot은 gnuplot을 써 보신 분들께서는 쉽게 쓰실 수 있는 프로그램으로, 간편하게 (gnuplot에 비하면 훨씬) 고품질의 그림을 그릴 수 있습니다. 쉽긴 하지만, PyX를 직접 쓰는 경우처럼 자세한 수정은 힘들죠.</p>
<p>앞으로 제가 그림을 그리기 위해 사용했던 코드와 그림들을 나중에 다시 참고하기 위해 블로그에 올릴 생각입니다.</p>
<br /> Tagged: Matplotlib, Python, PyX, PyXPlot <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/plusha.wordpress.com/147/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/plusha.wordpress.com/147/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/plusha.wordpress.com/147/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=147&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://plusha.com/2008/12/16/python-plotting-libraries/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">plusha</media:title>
		</media:content>
	</item>
		<item>
		<title>GnuQuickPlot</title>
		<link>http://plusha.com/2008/10/11/gnuquickplot/</link>
		<comments>http://plusha.com/2008/10/11/gnuquickplot/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:22:43 +0000</pubDate>
		<dc:creator>plusha</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Gnuplot]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://plusha.wordpress.com/2008/10/11/gnuquickplot/</guid>
		<description><![CDATA[GNU Quick Plot Gnuplot은 리눅스에서 텍스트파일에 저장된 값을 빠르게 그림으로 그려주는 프로그램입니다. 다양한 기능을 가지고 있지만, 제 경우에는 주로 수치해석 후 결과 확인용으로 씁니다. gnuplot으로 그림을 그릴 때에는 command line 상에서 &#8216;gnuplot&#8217;이라고 치고 들어가서 gnuplot 명령어들을 이용하여 그림을 그리고 &#8216;q&#8217;를 입력하여 빠져나옵니다. 그런데 간단히 결과를 확인해보기 위해서 gnuplot에 들어가서 p 'file1' w l,'file1' u 1:3 w l,'file1' [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=26&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>GNU Quick Plot</h2>
<p><a class="external" title="http://www.gnuplot.info" href="http://www.gnuplot.info">Gnuplot</a>은 리눅스에서 텍스트파일에 저장된 값을 빠르게 그림으로 그려주는 프로그램입니다.</p>
<p>다양한 기능을 가지고 있지만, 제 경우에는 주로 수치해석 후 결과 확인용으로 씁니다.</p>
<p>gnuplot으로 그림을 그릴 때에는 command line 상에서 &#8216;gnuplot&#8217;이라고 치고 들어가서 gnuplot 명령어들을 이용하여 그림을 그리고 &#8216;q&#8217;를 입력하여 빠져나옵니다.</p>
<p>그런데 간단히 결과를 확인해보기 위해서 gnuplot에 들어가서<br />
<code>p 'file1' w l,'file1' u 1:3 w l,'file1' u 1:4 w p</code><br />
또는<br />
<code>set grid<br />
set xrange[:10]<br />
set log y<br />
p 'file1' w l,'file2' w l,'file3' w l</code><br />
과 같이 매번 치려니 귀찮다는 생각이 들었습니다.</p>
<p>그래서 이 script를 만들게 되었습니다. 처음에는 ruby로 만들어 사용하다가 안 쓰는 기능은 빼고 python script로 바꿨습니다.</p>
<p>이 script를 사용하면 command line 상에서 바로 gnuplot 명령어를 사용하여 그림을 그릴 수 있습니다. 사용 방법은 아래와 같습니다.</p>
<h4>Usage :</h4>
<p><code>./gnuqp.py [options] filename1 [u 1:2] [w l], filename2 [u 1:2] [w l], filename3 ...</code><br />
실행파일 이름, 몇 가지 setting 관련 옵션들, 이후에는 gnuplot의 plot 명령어를 입력합니다.</p>
<h4>Required parameters :</h4>
<p><code>filename1<br />
Empty filename[2,3,...] will be replaced by the filename1</code><br />
두 번째 위치부터는 파일명을 생략하면 첫 번째 파일명으로 대체합니다. 하나의 파일에서 여러 column들을 그릴 때 편리합니다.</p>
<h4>Optional parameters :</h4>
<p><code>u 1:2   : columns you want to plot<br />
w [lp..]: line style- line, point, dot or impulse ..etc (default: w l)</code><br />
plot 명령어의 옵션들 중에는 using (columns)과 with (line style)만 지원합니다. 그 외의 명령은 잘 안 쓰더라고요^^.</p>
<p>위의 옵션을 주지 않았을 때 기본적으로 &#8221;with line&#8221; 옵션으로 그립니다.<br />
<code>-p      : do not run gnuplot. just print the gnuplot command<br />
-c      : no comma seperation - the arguments are filenames seperated with a blank- use with glob pattern<br />
-l       : set logscale y<br />
-g      : set grid<br />
-x[:10] : set xrange [:10]<br />
-y[1:5] : set yrange [1:5]</code><br />
위의 옵션들은 gnuplot의 setting을 간편하게 하기 위해 만들었습니다.</p>
<p>-p 옵션을 붙이면 gnuplot의 명령어만 출력하고 그림은 안 그립니다.</p>
<p>-c 옵션을 붙이면 파일들을 기본 옵션(with line)으로 그립니다. 이 때 파일명들 사이의 &#8220;,&#8221;를 생략하고 파일명만 씁니다. command line상에서 glob pattern을 이용하여 여러 그림을 그릴 수 있도록 하기 위한 옵션입니다.</p>
<p>나머지 gnuplot setting들은 위의 설명으로 충분할 것이라 생각합니다.</p>
<h4>Examples :</h4>
<p><code>./gnuqp.py -p "file1", u 1:3 w p<br />
-&gt; p 'file1' u 1:2 w l, 'file1' u 1:3 w p<br />
./gnuqp.py -p -c file.00*<br />
-&gt; p 'file.0010' w l,'file.0020' w l,'file.0030' w l</code><br />
Download: <a class="attachment" title="gnuqp.py" href="http://plusha.springnote.com/pages/1911426/attachments/845870?dummy=1223881326777">gnuqp.py</a></p>
<p style="text-align:right;">이 글은 <a href="http://plusha.springnote.com/pages/1911426">스프링노트</a>에서 작성되었습니다.</p>
<br /> Tagged: Gnuplot, Python <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/plusha.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/plusha.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/plusha.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=26&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://plusha.com/2008/10/11/gnuquickplot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">plusha</media:title>
		</media:content>
	</item>
		<item>
		<title>SConstruct basic (SCons)</title>
		<link>http://plusha.com/2008/06/03/sconstruct-basic-scons/</link>
		<comments>http://plusha.com/2008/06/03/sconstruct-basic-scons/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 13:23:34 +0000</pubDate>
		<dc:creator>plusha</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SCons]]></category>
		<category><![CDATA[SConstruct]]></category>

		<guid isPermaLink="false">http://plusha.wordpress.com/?p=17</guid>
		<description><![CDATA[SConstruct은 Makefile과 비슷한 역할을 하는, Python script입니다. 따라서 Python이라는 언어의 강력한 기능들을 그대로 가져다 쓸 수 있다는 장점이 있습니다. Makefile을 make라는 명령어로 실행하듯이, SConstruct는 scons라는 명령어로 실행합니다. SConstruct file의 작성법은 Makefile이나 Rakefile의 작성법과는 차이가 있습니다. 작성법을 살펴보기 전에 먼저 &#8216;Environment&#8217;와 &#8216;Builder&#8217;라는 개념에 대해 살펴보겠습니다. Environments Makefile에서는 기본적으로 Shell의 환경변수들을 가져다가 썼습니다. 물론 PATH 환경변수도 가지고 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=17&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>SConstruct은 Makefile과 비슷한 역할을 하는, Python script입니다. 따라서 Python이라는 언어의 강력한 기능들을 그대로 가져다 쓸 수 있다는 장점이 있습니다. Makefile을 make라는 명령어로 실행하듯이, SConstruct는 scons라는 명령어로 실행합니다. SConstruct file의 작성법은 Makefile이나 Rakefile의 작성법과는 차이가 있습니다. 작성법을 살펴보기 전에 먼저 &#8216;Environment&#8217;와 &#8216;Builder&#8217;라는 개념에 대해 살펴보겠습니다.</p>
<p><strong>Environments</strong></p>
<p>Makefile에서는 기본적으로 Shell의 환경변수들을 가져다가 썼습니다. 물론 PATH 환경변수도 가지고 오기 때문에 compiler의 절대경로를 써주지 않아도 알아서 잘 compile을 했었습니다.<br />
반면에, scons는 기본적으로 Shell의 환경변수들을 가져오지 않습니다. scons를 설치할 때 기본적인 compiler들(gcc, gfortran 등)은 알아서 찾아내기 때문에 보통은 문제가 없지만 특정한 compiler(icc, ifort 등)를 사용하고 싶은 경우 compile 관련 환경변수(construction variables)에 절대경로를 지정해주거나 Shell의 환경변수를 가지고 옵니다. Shell의 환경변수들을 전부 가지고 오고 compiler로 ifort를 사용할 경우 script에 다음과 같이 써줍니다.</p>
<p><pre class="brush: python;">import os
DefaultEnvironment(ENV=os.environ,FORTRAN='ifort',
    FORTRANFLAGS='-assume byterecl -O2',LINK='ifort')
</pre></p>
<p>scons에는 위에 사용한 Default Environment외에도 사용자가 마음대로 Environment를 만들 수 있습니다. 아래와 같이 쓸 경우 myEnv라는 새로운 Environment를 만들어 사용할 수 있습니다. 이런 식으로 여러 개의 Environment들을 만들어 필요에 따라 같은 프로그램도 옵션을 바꿔가며 compile할 수 있습니다.</p>
<p><pre class="brush: python;">import os
myEnv=Environment(ENV=os.environ,CFLAGS='-O3',
    FORTRANFLAGS='-O1')
</pre></p>
<p><strong>Builders</strong></p>
<p>scons는 기본적으로 많이 사용되는 프로그램들의 compile 방법들을 알고 있습니다. Compile하는 object를 builder라고 하는데, c/c++, fortran, java, TeX, LaTeX, tar, zip 등 <a href="http://www.scons.org/doc/0.98.4/HTML/scons-user/a7185.html">다수의 builder들</a>이 존재합니다. 따라서 원하는 builder에 알맞은 target과 source 이름만 넣어주면 scons가 알아서 compile합니다. 필요한 변수(옵션)들은 해당 Environment에서 가지고 옵니다. 기본적인 작성법은 다음과 같습니다.</p>
<p><pre class="brush: python;">Program('target1.e','source1.f')
myEnv.Program('target2.e','source2.c')
</pre></p>
<p>첫 번째 줄은 &#8216;source1.f&#8217;라는 파일로부터 &#8216;target1.e&#8217; 라는 파일을 생성하는 명령입니다. 이 때 필요한 변수들은 Default Environment에서 가지고 옵니다. 두 번째 줄은 &#8216;source2.c&#8217;라는 파일로부터 &#8216;target2.e&#8217;라는 파일을 생성하는 명령이고, 필요한 변수는 myEnv라는 Environment에서 가지고 옵니다. 위에서 Program이라는 명령은 source code에 해당하는 builder를 불러오는 역할을 하죠. 지금까지의 SConstruct script와 실행 결과를 살펴볼까요?</p>
<p><pre class="brush: python;">import os
DefaultEnvironment(ENV=os.environ,FORTRAN='ifort',
    FORTRANFLAGS='-assume byterecl -O2',LINK='ifort')
myEnv=Environment(ENV=os.environ,CFLAGS='-O3',
    FORTRANFLAGS='-O1')

Program('target1.e','source1.f')
myEnv.Program('target2.e','source2.c')</pre></p>
<p><code>scons</code>라고 실행하면,<br />
<code>scons: Reading SConscript files ...<br />
scons: done reading SConscript files.<br />
scons: Building targets ...<br />
ifort -o source1.o -c -assume byterecl -O2 source1.f<br />
gcc -o source2.o -c -O3 source2.c<br />
ifort -o target1.e source1.o<br />
gcc -o target2.e source2.o<br />
scons: done building targets.</code><br />
와 같은 화면을 얻게 됩니다. 복잡한 내용은 빼고 실행 결과만 보고 싶을 경우 <code>scons -Q</code> 라고 실행하면 결과를 다음과 같이 보여줍니다.<br />
<code>ifort -o source1.o -c -assume byterecl -O2 source1.f<br />
gcc -o source2.o -c -O3 source2.c<br />
ifort -o target1.e source1.o<br />
gcc -o target2.e source2.o</code><br />
위의 실행 결과를 보면 source file의 확장자에 따라 필요한 compiler를 사용하고 필요한 환경변수들을 가져다가 사용했음을 알 수 있습니다. 특정 Compiler가 사용하는 환경변수는 <a href="http://www.scons.org/doc/0.98.4/HTML/scons-user/a7741.html">scons user manual</a>에서 찾아볼 수 있습니다.</p>
<p>그럼 <a href="http://plusha.com/2008/05/08/makefile-basic/">앞에서 살펴보았던 예제</a> &#8211; main.f, sub1.f, sub2.f 는 어떻게 compile하는지 살펴보겠습니다.</p>
<p><pre class="brush: python;">import os
DefaultEnvironment(ENV=os.environ,FORTRAN='ifort',
    FORTRANFLAGS='-assume byterecl -O2',LINK='ifort')

Program('main.e',['main.f','sub1.f','sub2.f'])
</pre></p>
<p>위와 같이 source file이 여러 개인 경우 source file들을 list로 묶어줍니다. 다른 방법으로 아래와 같이 쓸 수도 있습니다. Split이라는 함수는 문자열을 나눠서 list로 만들어줍니다.</p>
<p><pre class="brush: python;">import os
DefaultEnvironment(ENV=os.environ,FORTRAN='ifort',
    FORTRANFLAGS='-assume byterecl -O2',LINK='ifort')

obj=Split('main.f sub1.f sub2.f')
Program('main.e',obj)
</pre></p>
<p>Makefile이나 Rakefile에 비해 상당히 간단하죠? 실행 결과는 다음과 같습니다.<br />
<code>ifort -o main.o -c -assume byterecl -O2 main.f<br />
ifort -o sub1.o -c -assume byterecl -O2 sub1.f<br />
ifort -o sub2.o -c -assume byterecl -O2 sub2.f<br />
ifort -o main.e main.o sub1.o sub2.o</code><br />
또 앞의 Makefile, Rakefile 예제들과는 달리 clean 이라는 target이 없습니다. <code>scons -c</code> 라고 실행하면 scons는 compile 과정에서 새로 생긴 파일들을 알아서 지워줍니다. 실행 결과는 다음과 같습니다.<br />
<code>scons: Reading SConscript files ...<br />
scons: done reading SConscript files.<br />
scons: Cleaning targets ...<br />
Removed main.o<br />
Removed sub1.o<br />
Removed sub2.o<br />
Removed main.e<br />
scons: done cleaning targets.</code><br />
물론 특정 target만 만들고 싶을 때는 <code>scons main.o</code>와 같이 실행하여 하나의 target만 만들 수도 있습니다. main.o라는 target은 script 내에서 지정해준 적이 없지만 확장자 규칙에 따라 compile 중에 생기는 파일이기 때문에 앞에서와 같이 실행하면 알아서 만들어줍니다. 또한, 많은 경우 dependency도 알아서 check해줍니다.</p>
<p>만약 Program()에서 target을 생략하고 source만 적어주면 list의 첫 번째 source file 이름을 기준으로 target file 이름을 만들어 줍니다. 하지만 경험상 target file 이름을 적어주는 것이 좋더군요.</p>
<p><pre class="brush: python;">Program(['main.f','sub.f']) ## -&gt; target='main'</pre></p>
<p>오늘은 가장 기초적인 사용법을 알아보았습니다. 다음에는 scons에 대해 좀 더 자세히 살펴보겠습니다.</p>
<p><a href="http://www.scons.org/">SCons Homepage</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/plusha.wordpress.com/17/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/plusha.wordpress.com/17/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/plusha.wordpress.com/17/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/plusha.wordpress.com/17/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/plusha.wordpress.com/17/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=plusha.com&amp;blog=174108&amp;post=17&amp;subd=plusha&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://plusha.com/2008/06/03/sconstruct-basic-scons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">plusha</media:title>
		</media:content>
	</item>
	</channel>
</rss>
