<?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>Linux &#38; SO</title>
	<atom:link href="http://maltzsama.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://maltzsama.wordpress.com</link>
	<description>Usando de forma simples!</description>
	<lastBuildDate>Thu, 18 Aug 2011 17:07:45 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='maltzsama.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Linux &#38; SO</title>
		<link>http://maltzsama.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://maltzsama.wordpress.com/osd.xml" title="Linux &#38; SO" />
	<atom:link rel='hub' href='http://maltzsama.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Script para backup de DataBases SQLServer &#8211; parte 01</title>
		<link>http://maltzsama.wordpress.com/2011/08/12/script-para-backup-de-databases-sqlserver-parte-01/</link>
		<comments>http://maltzsama.wordpress.com/2011/08/12/script-para-backup-de-databases-sqlserver-parte-01/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 18:58:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[banco de dados]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[backup]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/08/12/script-para-backup-de-databases-sqlserver-parte-01</guid>
		<description><![CDATA[ProblemUm problema comum no mundo de banco de dados são os backups. Realizar diversos backups de diversas bases manualmente é tarefa de estagiáriocorno. As vezes as coisas podem parecer mais complicadas do que realmente são. Por isso esse tutorial mostrará como fazer o backup de suas bases de seu banco de forma simples e rápida. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=314&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><u><b>Problem</b></u>Um problema comum no mundo de banco de dados são os backups. Realizar diversos backups de diversas bases manualmente é tarefa de estagiário<strike>corno</strike>. As vezes as coisas podem parecer mais complicadas do que realmente são. Por isso esse tutorial mostrará como fazer o backup de suas bases de seu banco de forma simples e rápida. Usar o SQLManager e os planos de manutenção são uma boa. Mas as normalmente o bom e velho script tem um comportamento mais simples e mais fácil de se manobrar.<br />Como podemos gerar backups usando o T-SQL? Simples:<br /><code>BACKUP DATABASE DBNAME TO DISK = "c:\backup.bak"</code><br />Esse seria o mais simples de todos, fazendo de um só banco, vc colocando o nome do seu banco. Mas e se você tiver diversos bancos e não está com a menor paciência pra escrever várias linhas iguais a essa para fazer o backup de cada banco? Ou ainda e se você possuir diversos servidores, com cada servidor com diversos bancos que precisam ter um backup e não terá tempo para escrever nome por nome de banco?<br />Bem, agora sim as coisas poderiam ficar complicada, mas a verdade é que essa complicação não existe. Veja:<br /><code>DECLARE @name VARCHAR(50) -- nome do banco de dados <br />DECLARE @path VARCHAR(256) -- path para o arquivo de backup<br />DECLARE @fileName VARCHAR(256) -- nome do arquivo de backup <br />DECLARE @fileDate VARCHAR(20) -- usado para o nome do arquivo</p>
<p>SET @path = 'C:\Backup\' --diretório onde tudo será salvo</p>
<p>SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)</p>
<p>DECLARE db_cursor CURSOR FOR <br />SELECT name <br />FROM master.dbo.sysdatabases <br />WHERE name NOT IN ('master','model','msdb','tempdb') --não faremos backup dos bancos do SQL Server</p>
<p>OPEN db_cursor  <br />FETCH NEXT FROM db_cursor INTO @name  </p>
<p>WHILE @@FETCH_STATUS = 0  <br />BEGIN  <br />       SET @fileName = @path + @name + '_' + @fileDate + '.BAK' <br />       BACKUP DATABASE @name TO DISK = @fileName </p>
<p>       FETCH NEXT FROM db_cursor INTO @name  <br />END  </p>
<p>CLOSE db_cursor  <br />DEALLOCATE db_cursor</code></p>
<p>Simples e objetivo, resolve seu problema de fazer diversos backups de uma única vez e sem ter que ficar colocando nome por nome. Esse backup é um backup full. Você pode procurar formas de fazer backups incrementais e coisas assim&#8230;</p>
<p>Nos próximos talvez eu me aprofunde nisso.
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/314/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/314/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/314/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=314&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/08/12/script-para-backup-de-databases-sqlserver-parte-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>
	</item>
		<item>
		<title>FreeNAS 8.0</title>
		<link>http://maltzsama.wordpress.com/2011/08/10/freenas-8-0/</link>
		<comments>http://maltzsama.wordpress.com/2011/08/10/freenas-8-0/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 17:02:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[FreeNAS]]></category>
		<category><![CDATA[usando freeNAS]]></category>
		<category><![CDATA[ZFS]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/08/10/freenas-8-0</guid>
		<description><![CDATA[O que há de novo no 8.x FreeNAS™ 8.x representa uma reimplementação completa desde a série .7 do FreeNAS™. Em outras palavras, FreeNAS™ foi reescrito &#8220;from scratch&#8221; e novas funcionalidades foram adicionadas de forma estável. Isso significa que nem todas as funcionalidades da versão .7 foram reimplementadas e nem todas as funcionalidades disponpíveis no FreeNAS™ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=313&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;">O que há de novo no 8.x </div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;">FreeNAS™ 8.x representa uma reimplementação completa desde a série .7 do FreeNAS™. Em outras palavras, FreeNAS™ foi reescrito &#8220;from scratch&#8221; e novas funcionalidades foram adicionadas de forma estável. Isso significa que nem todas as funcionalidades da versão .7 foram reimplementadas e nem todas as funcionalidades disponpíveis no FreeNAS™ .7 estarão disponíveis no FreeNAS™ 8.x.&nbsp; As diferenças mais notáveis entre as duas versões seguem abaixo:</div>
<div style="text-align:justify;"></div>
<div style="text-align:justify;">O versionamento mudou para seguir o mesmo número usado pela versão do FreeBSD. FreeNAS™ 8.0.1 é baseado no FreeBSD 8.2; esse branch do FreeNAS™ vem com funcionalidades completas.Esse número de versão irá ser incrementado depois para 8.1 e depois para 8.2. </div>
<div style="text-align:justify;"></div>
<ul style="text-align:justify;">
<li>Baseado no NanoBSD no lugar do m0n0wall</li>
<li>Design foi modificado de monolitico para modularizado, dessa forma permite a criação de plugins e o usuário pode instalar e configurar apenas os módulos que ele precisa.</li>
<li>GUI reescrita em Django para permitir uma futura expanção.</li>
<li>Nova GUI é a padrão, mas a antiga ainda esta disponível se você configurar no appname e depois FreeNAS™ system&#8217;s URL (e.g. http://192.168.1.1/services)</li>
<li>Melhorado o sistema de permissões, usuários e grupos dos volumes e datasets.</li>
<li>ZFS parametrização por dataset, assim como quotas, onde são adicionados</li>
<li>LSI 6 gbps HBAs agora é suportado</li>
<li>Migrado do rc.d init system</li>
<li>Update dos ports do FreeBSD 8.2</li>
<li>Adicionado suporte ao iSCSI</li>
<li>Suporte do 3ware 6bps RAID controllers foram adicionados com um utilitario CLI utility, tw_cli, para gerenciamento 3ware RAID controller</li>
<li>Adicionada habilidade para agendar snapshots, criar one-time snapshots, clone snapshots, que podem ser exportados e compartilhados como qualquer outro dataset, e é possível fazer rollback para um snapshot anterior</li>
</ul>
<div style="text-align:justify;">Notáveis funcionalidades oferecidas no FreeNAS™ 8.0.1 incluem: </div>
<ul style="text-align:justify;">
<li>suporte a AFP, CIFS, FTP, NFS, SSH (incluindo SFTP), e TFTP como mecanismos de compartilhamento</li>
</ul>
<ul style="text-align:justify;">
<li>supports exporting file or device extents via iSCSI </li>
</ul>
<ul style="text-align:justify;">
<li>suporta Active Directory ou LDAP para autenticação de usuário</li>
</ul>
<ul style="text-align:justify;">
<li>suporta sistema de arquivos UFS2, incluindo gmirror, gstripe, e graid3</li>
</ul>
<ul style="text-align:justify;">
<li> suporta <a class="external text" href="http://en.wikipedia.org/wiki/ZFS" rel="nofollow">ZFS</a>  como principal sistema de arquivos, habilitando muitas funcionalidades não disponiveis UFS2  como sistema de cotas, snapshots, compressão, replicação, e datasets para compartilhamentos de subconfigurações de volumes via CIFS. Suporta zpool versão 15. </li>
</ul>
<ul style="text-align:justify;">
<li><span class="" id="result_box" lang="pt"><span class="hps">procedimento de atualização</span> tira vantagem da capacidade do <span class="hps"></span> <span class="hps">NanoBSD</span> de<span class="hps"> escrever</span> <span class="hps">o sistema operacional</span> <span class="hps">em uma partição</span> <span class="hps">inativa</span><span class="">, permitindo uma</span> <span class="hps">fácil</span> <span class="hps">reversão</span> <span class="hps">de uma atualização</span> <span class="hps">indesejável.</span></span></li>
</ul>
<ul style="text-align:justify;">
<li><span class="" id="result_box" lang="pt"><span class="hps">automática</span> <span class="hps">sistema de notificações&nbsp;</span><span class="hps">sobre eventos</span> do controlador <span class="hps">LSI</span> <span class="hps">RAID</span>&nbsp; <span class="hps">(requer serviço de</span> <span class="hps">e-mail </span><span class="hps">configurado)</span></span></li>
</ul>
<ul style="text-align:justify;">
<li style="text-align:justify;"> <a class="external text" href="http://en.wikipedia.org/wiki/Django_%28Web_framework%29" rel="nofollow">Django</a> interface grafica de gerenciamento</li>
</ul>
<p>Hora de começar os testes com essa nova versão cheia de novidades? Sim e não. Eu indico que deem uma boa lida nos <a href="http://doc.freenas.org/index.php/Known_Issues">problemas conhecidos</a> antes de partirem para fazer o upgrade dos NAS de vocês e também na <a href="http://www.freenas.org/category/version-comparison">comparação entre as duas versões</a>.
<ul style="text-align:justify;"></ul>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-4009350720080458400?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/313/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/313/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/313/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=313&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/08/10/freenas-8-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-4009350720080458400?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Usuários conectados ao seus servidor MySQL</title>
		<link>http://maltzsama.wordpress.com/2011/08/09/usuarios-conectados-ao-seus-servidor-mysql/</link>
		<comments>http://maltzsama.wordpress.com/2011/08/09/usuarios-conectados-ao-seus-servidor-mysql/#comments</comments>
		<pubDate>Tue, 09 Aug 2011 18:05:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[banco de dados]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/08/09/usuarios-conectados-ao-seus-servidor-mysql</guid>
		<description><![CDATA[As vezes se faz extremamente necessário saber quem esta acessando nossa base de dados naquele momento. O MySQL apesar de ter ferramentas gráficas até bem maduras, diferente do postgreSQL(na minha opnião). Você terá sempre a possibilidade de usar tudo via terminal.Apesar de conseguir fazer isso facilmente através do comando &#8220;SHOW PROCESSLIST&#8221;, quando possuo muitos processos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=310&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As vezes se faz extremamente necessário saber quem esta acessando nossa base de dados naquele momento. O MySQL apesar de ter ferramentas gráficas até bem maduras, diferente do postgreSQL(na minha opnião). Você terá sempre a possibilidade de usar tudo via terminal.<br />Apesar de conseguir fazer isso facilmente através do comando &#8220;SHOW PROCESSLIST&#8221;, quando possuo muitos processos fica um tanto difícil de conseguir verificar todos os usuários. A saída do &#8220;SHOW PROCESSLIST&#8221; seria a abaixo descreita no meu PC que não esta sendo acessado por ninguém além de mim:<br /><code>mysql&gt; SHOW PROCESSLIST;<br />+----+------+-----------+-------+---------+------+-------+------------------+<br />| Id | User |&nbsp;&nbsp;&nbsp;&nbsp; Host&nbsp; | &nbsp; db&nbsp;   | Command | Time | State |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Info&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;             |<br />+----+------+-----------+-------+---------+------+-------+------------------+<br />| 51 | root | localhost | teste | Query&nbsp;&nbsp; |&nbsp;&nbsp;    0&nbsp; |&nbsp; NULL  | SHOW PROCESSLIST |<br />+----+------+-----------+-------+---------+------+-------+------------------+<br />1 row in set (0.00 sec)</code></p>
<p>Podemos modificar para termos uma saída mais ou menos assim:<br /><code>+-----------------+-----------------+----------+<br />| host_short&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; users&nbsp;&nbsp;&nbsp;&nbsp;           | count(*) |<br />+-----------------+-----------------+----------+<br />| slave1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          | repl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            |&nbsp;&nbsp;&nbsp;&nbsp;        1 &nbsp;&nbsp; |<br />| slave2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | repl&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            |&nbsp;&nbsp;&nbsp;&nbsp;        1 &nbsp;&nbsp; |<br />| localhost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       | event_scheduler |&nbsp;&nbsp;&nbsp;&nbsp;        1 &nbsp;&nbsp; |<br />| 111.111.222.111 | root, foo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;       |&nbsp;&nbsp;&nbsp;&nbsp;        2&nbsp;&nbsp;&nbsp; |<br />| 111.111.222.222 | appuser, bar&nbsp;&nbsp;&nbsp;    |&nbsp;&nbsp;&nbsp;&nbsp;        3 &nbsp;&nbsp; |<br />| 111.111.222.333 | appuser, moshe&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp; 9&nbsp;&nbsp;&nbsp; |<br />+-----------------+-----------------+----------+</code></p>
<p>E para isso eu só preciso fazer uma simples query como esta descrita abaixo:<br /><code>SELECT LEFT(host, IF(LOCATE(':', host), LOCATE(':', host), LENGTH(host) + 1) - 1<br />) AS<br />host_short,GROUP_CONCAT(DISTINCT USER) AS users,COUNT(*)<br />FROM   information_schema.processlist<br />GROUP  BY host_short<br />ORDER  BY COUNT(*),host_short;</code></p>
<p>Essa saída mostrará de forma mais simples os usuários que encontram-se conectados ao seu banco.<br />fonte: <a href="http://blog.shlomoid.com/2011/08/how-to-easily-see-whos-connected-to.html">sholimoid</a>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-8503997055442697362?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/310/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/310/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/310/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=310&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/08/09/usuarios-conectados-ao-seus-servidor-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-8503997055442697362?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Conectando MySQL e Pyhton</title>
		<link>http://maltzsama.wordpress.com/2011/08/08/conectando-mysql-e-pyhton/</link>
		<comments>http://maltzsama.wordpress.com/2011/08/08/conectando-mysql-e-pyhton/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 15:10:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[banco de dados]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/08/08/conectando-mysql-e-pyhton</guid>
		<description><![CDATA[Fazer um script em Python que conecte-se ao MySQL é bastante simples. Mesmo que você não tenha tido qualquer experiência anterior com Python.Claro que para prosseguirmos precisaremos ter o Python e o MySQL já instalados. Depois disso precisaremos fazer o import dos módulos MySQLdb e da sys. Para o MySQL você só precisará de um [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=308&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>Fazer um script em Python que conecte-se ao MySQL é bastante simples. Mesmo que você não tenha tido qualquer experiência anterior com Python.<br />Claro que para prosseguirmos precisaremos ter o Python e o MySQL já instalados. Depois disso precisaremos fazer o import dos módulos MySQLdb e da sys. Para o MySQL você só precisará de um usuário que tenha permissão para conectart ao banco e realizar operações.<br />O post original o autor usa Python v2.5, MySQL version 5.5.8,com Mac OS X 10.6.8.Eu estou usando Python 2.6.5, MySQL 5.1.41 e Ubuntu 10.04.<br />Aqui estão os links caso vá realizar esse trabalho no Windows.</p>
<p>MySQL – <a href="http://scriptingmysql.wordpress.com/2011/07/20/connecting-to-mysql-with-python-2/dev.mysql.com/downloads/"> http://dev.mysql.com/downloads </a><br />Python – <a href="http://scriptingmysql.wordpress.com/2011/07/20/connecting-to-mysql-with-python-2/www.python.org/getit/"> www.python.org/getit/ </a><br />MySQLdb module – <a href="http://sourceforge.net/projects/mysql-python/">http://sourceforge.net/projects/mysql-python/</a></p>
<p><code>#!/usr/bin/python<br /># versao.py – captura e mostra a versão do MySQL database server.<br /># importe os modulos do MySQLdb e sys<br />import MySQLdb<br />import sys<br /># Abra uma conexão com o banco de dados<br /># Tenha certeza de ter trocado o IP, usuario, senha e database para os seus. <br />connection = MySQLdb.connect (host = “192.168.1.1″, user = “username”, passwd = “password”, db = “database_name”)<br /># Inicie um cursor usando o método cursor()<br />cursor = connection.cursor ()<br /># Execute a expressão SQL<br />cursor.execute (“SELECT VERSION()”)<br /># capture a informação com o método fetchone().<br />row = cursor.fetchone ()<br /># mostre a informação[0]<br />print “Server version:”, row[0]<br /># Feche o cursor<br />cursor.close ()<br /># Feche a conexão<br />connection.close ()<br /># Saia do programa.<br />sys.exit()</code></p>
<p>Here is what the script looks like when I run it from the command line:<br /><code>Server version: 5.1.41-3ubuntu12.10</code><br />A partir daí é só explorar as possibilidades já que assim é feita a conexão.<br />fonte: <a href="http://scriptingmysql.wordpress.com/2011/07/20/connecting-to-mysql-with-python-2/">Scripting Mysql</a></p>
<div class="zemanta-pixie"><img alt="" class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=e47cca44-8dda-8153-937d-a389983224e0" /></div>
</div>
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/308/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/308/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/308/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=308&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/08/08/conectando-mysql-e-pyhton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="http://img.zemanta.com/pixy.gif?x-id=e47cca44-8dda-8153-937d-a389983224e0" medium="image" />
	</item>
		<item>
		<title>Servidor Web Simples com Python</title>
		<link>http://maltzsama.wordpress.com/2011/07/30/servidor-web-simples-com-python/</link>
		<comments>http://maltzsama.wordpress.com/2011/07/30/servidor-web-simples-com-python/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 14:00:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[servidor web]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/07/30/servidor-web-simples-com-python</guid>
		<description><![CDATA[As vezes um servidor web se faz necessário para testes simples ou para pequenos compartilhamentos internos de sua intranet. E o tempo de setup de um servidor Apache ou ISS para uma tarefa tão trivial quanto essa pode não ser tão interessante. Depender a TI para configuração as vezes é um parto. E algumas outras [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=305&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:small;"><span style="font-family:&quot;">As vezes um servidor web se faz necessário para testes simples ou para pequenos compartilhamentos internos de sua intranet. E o tempo de setup de um servidor Apache ou ISS para uma tarefa tão trivial quanto essa pode não ser tão interessante. Depender a TI para configuração as vezes é um parto. E algumas outras vezes baixar e instalar tudo demandará tempo demais. Recomendo usar o servidor web que vem embutido no Python(confeço que não sabia até algum tempo).<br />Você só precisará de uma linha para configurá-lo:<br /><code>$cd [diretorio]<br />$ python -m SimpleHTTPServer</code></p>
<p>Depois disso você terá um servidor web rodando na porta 8000 e será exibida a seguinte mensagem:<br /><code> Serving HTTP on 0.0.0.0 port 8000 ...</code></p>
<p>Caso queira mudar a porta padrão do servidor web para um teste faça:<br /><code>python -m SimpleHTTPServer 8080</code></p>
<p>Você poderá acessa-lo no seu navegador através do loopback(http://127.0.0.1:8080) ou pelo seu endereço IP (http://192.168.0.2:8080)</p>
<p>Simples não? Ainda farei alguns testes para ver o que isso aguenta. Não deve ser tanto, mas é interessante.</p>
<p>Fonte Original: <a href="http://www.dicas-l.com.br/arquivo/servidor_web_simples_com_python.php">[dicas-l]</a><br /></span></span>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-1845722451736741340?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/305/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/305/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/305/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=305&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/07/30/servidor-web-simples-com-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-1845722451736741340?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Subprocess com Python &#8211; Tratamento de erros &#8211; parte 2</title>
		<link>http://maltzsama.wordpress.com/2011/05/30/subprocess-com-python-tratamento-de-erros-parte-2/</link>
		<comments>http://maltzsama.wordpress.com/2011/05/30/subprocess-com-python-tratamento-de-erros-parte-2/#comments</comments>
		<pubDate>Mon, 30 May 2011 18:09:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[python no lugar do shell]]></category>
		<category><![CDATA[modulo subprocess]]></category>
		<category><![CDATA[subprocess]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/05/30/subprocess-com-python-tratamento-de-erros-parte-2</guid>
		<description><![CDATA[O valor de retorno do comando call() é o mesmo código de saída do programa que foi chamado. O comando de chamada é responsável por interpretar e detectar possiveis erros. Para tal a biblioteca subprocess possui o check_call(), que funciona de maneira parecida com o call(), porém no check_call() o código de saída é checado, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=303&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:&quot;">O valor de retorno do comando <b>call()</b> é o mesmo código de saída do programa que foi chamado. O comando de chamada é responsável por interpretar e detectar possiveis erros. Para tal a biblioteca <b>subprocess</b> possui o <b>check_call()</b>, que funciona de maneira parecida com o <b>call()</b>, porém no <b>check_call()</b> o código de saída é checado, e caso esse código indique um erro. Será feita uma chamada a uma exescessão chamada <b>CalledProcessError</b>.<br />Por exemplo:<br /><code>import subprocess<br />subprocess.check_call(['false'])</code><br />Todos sabemos que não existe um comando <b>false</b>. Logo este comando retornará um erro na tela. Da seguinte forma:<br /><code>&gt;&gt;&gt; subprocess.check_call(['false'])<br />Traceback (most recent call last):<br />File "", line 1, in <br />File "/usr/lib/python2.7/subprocess.py", line 504, in check_call<br />raise CalledProcessError(retcode, cmd)<br />subprocess.CalledProcessError: Command '['false']' returned non-zero exit status 1</code><br />Se nós tivessemos usado simplesmente o <b>call()</b>, nosso unico retorno seria o número <b>1</b> ao fim da execução do comando.<br />Ainda é possível fazer a captura de erros de outra forma. Mas colocarei isso em outro post.<br />fonte: <a href="http://www.doughellmann.com/PyMOTW/subprocess/">doughellmann</a><br /></span>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-8693060708090966150?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=303&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/05/30/subprocess-com-python-tratamento-de-erros-parte-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-8693060708090966150?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Subprocess com Python &#8211; Executando comando externo- parte 1</title>
		<link>http://maltzsama.wordpress.com/2011/05/27/subprocess-com-python-executando-comando-externo-parte-1/</link>
		<comments>http://maltzsama.wordpress.com/2011/05/27/subprocess-com-python-executando-comando-externo-parte-1/#comments</comments>
		<pubDate>Fri, 27 May 2011 21:00:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[python no lugar do shell]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[modulo subprocess]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[subprocess]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/05/27/subprocess-com-python-executando-comando-externo-parte-1</guid>
		<description><![CDATA[Comunicão entre processos com Python.O módulo subprocess permite você criar novos processos através de Python e assim se conectar aos seus inputs/outputs/erros pipes e obter seu código de retorno. Rodar comando do shell:Para executar um comando sem interagir com ele faça a chamada call() assim como faria com os.system() import subprocess# Simple commandsubprocess.call(['ls', '-1'], shell=True)Com [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=301&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Comunicão entre processos com Python.<br />O módulo subprocess permite você criar novos processos através de Python e assim se conectar aos seus inputs/outputs/erros pipes e obter seu código de retorno.</p>
<p>Rodar comando do shell:<br />Para executar um comando sem interagir com ele faça a chamada call() assim como faria com os.system()</p>
<p><code>import subprocess<br /># Simple command<br />subprocess.call(['ls', '-1'], shell=True)<br /></code><br />Com o comando acima teremos a seguinte saída:<br /><code>$ python subprocess_os_system.py</p>
<p>__init__.py<br />index.rst<br />interaction.py<br />repeater.py<br />signal_child.py<br />signal_parent.py<br />subprocess_check_call.py<br />subprocess_check_output.py<br />subprocess_check_output_error.py<br />subprocess_check_output_error_trap_output.py<br />subprocess_os_system.py<br />subprocess_pipes.py<br />subprocess_popen2.py<br />subprocess_popen3.py<br />subprocess_popen4.py<br />subprocess_popen_read.py<br />subprocess_popen_write.py<br />subprocess_shell_variables.py<br />subprocess_signal_parent_shell.py<br />subprocess_signal_setsid.py<br /></code></p>
<p>E desde que tenhamos shell=True teremos acesso as variáveis de shell também.<br /><code>import subprocess<br /># Command with shell expansion<br />subprocess.call('ls -1 $HOME', shell=True)<br /></code></p>
<p>Dessa forma teremos a saída:<br /><code>$ python subprocess_shell_variables.py</p>
<p>/home/maltzsama</code></p>
<p>Agora já sabemos executar um comando externo do sistema operacional ou mesmo um executavel qualquer usando subprocess, no próximo post veremos como fazer <b>tratamento de erros</b> em <b>subprocess</b>.</p>
<p>fonte: <a href="http://www.doughellmann.com/PyMOTW/subprocess/">doughellmann.com</a>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-7369619313140896103?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/301/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/301/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/301/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=301&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/05/27/subprocess-com-python-executando-comando-externo-parte-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-7369619313140896103?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Gedit como IDE Python</title>
		<link>http://maltzsama.wordpress.com/2011/05/27/gedit-como-ide-python/</link>
		<comments>http://maltzsama.wordpress.com/2011/05/27/gedit-como-ide-python/#comments</comments>
		<pubDate>Fri, 27 May 2011 20:25:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[ide python]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/05/27/gedit-como-ide-python</guid>
		<description><![CDATA[Venho programando em Python há algum tempo, já até escrevi um post mostrando como usar o Komodo Edit como um editor Python. Mas acredito que a maioria como eu usa Linux + Python para programar. Existem diversos editores no mundo Linux, muitos usam o EMAC(não me agrada muito), Vi, nano. Também existem algumas IDE&#8217;s como [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=298&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div align="justify"><span style="font-family:&quot;"><span style="font-size:small;">Venho programando em Python há algum tempo, já até escrevi um post mostrando como usar o Komodo Edit como um editor Python.</span></span></div>
<div align="justify"><span style="font-family:&quot;"><span style="font-size:small;">Mas acredito que a maioria como eu usa Linux + Python para programar. Existem diversos editores no mundo Linux, muitos usam o EMAC(não me agrada muito), Vi, nano. Também existem algumas IDE&#8217;s como o proprio Eclipse e o Netbeans(acho que com suporte descontinuado). Mas sempre usei muito mais o Gedit, pela simplicidade e capacidade de extenção com plugins.</span></span></div>
<div align="justify"><span style="font-family:&quot;"><span style="font-size:small;">Então podemos começar colocando os plugins básicos do Gedit para facilitar nossas vidas. Algumas distribuições já vem instalados. Caso contrario faça:</span></span></div>
<div align="justify"><span style="font-size:small;"><br /></span><span style="font-size:small;"> </span></div>
<div align="justify"><span style="font-size:small;">Arch Linux</span></div>
<div align="justify"><code><span style="font-size:small;">pacman -Sy gedit-plugins</span></code></div>
<div align="justify"><span style="font-size:small;">ubuntu</span></div>
<div align="justify"><code><span style="font-size:small;">sudo apt-get update</span><span style="font-size:small;"><br /></span><span style="font-size:small;"> </span><span style="font-size:small;"> sudo apt-get install gedit-plugins</span></code></div>
<div align="justify"><span style="font-size:small;"><br /></span><span style="font-size:small;"> </span></div>
<div align="justify"><span style="font-size:small;">Após a instalação desses plugins padrões você poderá habilitalos da seguinte forma:</span></div>
<div align="justify"><b><span style="font-size:small;">Editar</span></b><span style="font-size:small;">-&gt;</span><b><span style="font-size:small;">P</span></b><b><span style="font-size:small;">referências</span></b><span style="font-size:small;">-&gt;</span><b><span style="font-size:small;">Plugins</span></b>
<div class="separator" style="clear:both;text-align:center;"><a href="http://maltzsama.files.wordpress.com/2011/05/plugintab.png" style="margin-left:1em;margin-right:1em;"><img border="0" height="320" src="http://maltzsama.files.wordpress.com/2011/05/plugintab.png?w=261&#038;h=320" width="261" /></a></div>
<p><span style="font-size:small;"><br /></span><br /><span style="font-size:small;">Depois de selecionar os principais plugins que serão utilizados, recomendo:</span>
<ul>
<li><a href="http://www.stambouliote.de/projects/gedit_plugins.html"><span style="font-size:small;">Class Browser</span></a></li>
<p><span style="font-size:small;"> </span>
<li><span style="font-size:small;">Embedded Terminal</span></li>
<p><span style="font-size:small;"> </span>
<li><span style="font-size:small;">iPython Console</span></li>
<p><span style="font-size:small;"> </span>
<li><a href="https://github.com/fenrrir/geditpycompletion"><span style="font-size:small;">Python Code Completion</span></a></li>
<p><span style="font-size:small;"> </span>
<li><a href="http://live.gnome.org/Gedit/Plugins?action=AttachFile&amp;do=view&amp;target=python_indentation.tar.gz"><span style="font-size:small;">Python Indentation</span></a></li>
<p><span style="font-size:small;"> </span>
<li><span style="font-size:small;">External Tools</span></li>
<p><span style="font-size:small;"> </span>
<li><span style="font-size:small;">Bracket Completion</span></li>
<p><span style="font-size:small;"> </span></ul>
<p><span style="font-size:small;">Os plugins que não são links é porque já foram automaticamente instalados com o pacote gnome-plugins. Os outros plugins que possuem links você precirá baixá-los e descompactalos na seguinte pasta.</span><br /><b><span style="font-size:small;">.local/share/gedit/plugins/</span></b><span style="font-size:small;"> ou </span><b><span style="font-size:small;">/usr/lib/gedit/plugins/</span></b><span style="font-size:small;">, se você quiser os plugins já instalados para qualquer usuário.</span></p>
<p><span style="font-size:small;">Você ainda tem a possibilidade de configurar o CVS, ou GIT para funcionar como controle de versão do seu projeto. Mas isso é assunto pra outro post.&nbsp;</span></div>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-9108918879215996936?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/298/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/298/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/298/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=298&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/05/27/gedit-como-ide-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="http://maltzsama.files.wordpress.com/2011/05/plugintab.png?w=245" medium="image" />

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-9108918879215996936?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>Instalação do Python no MS-DOS/FreeDOS</title>
		<link>http://maltzsama.wordpress.com/2011/05/05/instalacao-do-python-no-ms-dosfreedos/</link>
		<comments>http://maltzsama.wordpress.com/2011/05/05/instalacao-do-python-no-ms-dosfreedos/#comments</comments>
		<pubDate>Thu, 05 May 2011 17:55:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[freedos]]></category>
		<category><![CDATA[ms-dos]]></category>
		<category><![CDATA[msdos]]></category>
		<category><![CDATA[python freedos]]></category>
		<category><![CDATA[python msdos]]></category>
		<category><![CDATA[pythond]]></category>
		<category><![CDATA[script no msdos]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/05/05/instalacao-do-python-no-ms-dosfreedos</guid>
		<description><![CDATA[Existem interpretadores Python para diversas arquiteturas além de Linux, Windows e Mac. Você pode consultar as arquiteturas disponiveis aqui. Dentre elas esta a implementação para DOS. Mas porque instalar Python em MSDOS? Bem apesar de existir os famoses arquivos em lote ou bat-files sabemos que eles possuem muitas restrições e incapacidades e para conseguirmos transpor [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=290&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:&quot;"><span style="font-size:x-small;">Existem interpretadores Python para diversas arquiteturas além de Linux, Windows e Mac. Você pode consultar as arquiteturas disponiveis </span></span><a href="http://www.python.org/getit/other/"><span style="font-family:&quot;"><span style="font-size:x-small;">aqui</span></span></a><span style="font-family:&quot;"><span style="font-size:x-small;">. Dentre elas esta a implementação para DOS. Mas porque instalar Python em MSDOS? Bem apesar de existir os famoses arquivos em lote ou bat-files sabemos que eles possuem muitas restrições e incapacidades e para conseguirmos transpor essa barreira podemos, mais uma vez, contar com Python.</span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;">Existe o site da </span></span><a href="http://www.caddit.net/pythond/"><span style="font-family:&quot;"><span style="font-size:x-small;">caddit</span></span></a><span style="font-family:&quot;"><span style="font-size:x-small;"> que disponibiliza a versão </span></span><a href="http://www.progecam.com/download/opensource/python/pyd24210.zip"><span style="font-family:&quot;"><span style="font-size:x-small;">PythonD 2.4.2 Release 1.0</span></span></a><span style="font-family:&quot;"><span style="font-size:x-small;"> que é nada mais que um arquivo zip contendo os executaveis do Python.</span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;">Agora como colocar isso para funcionar? Inicialmente, claro, é preciso descompactar essa pasta dentro da sua partição DOS. Após isso feito é importante setar algumas coisas no autoexec.bat.</span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;"><br /></span></span><br /><code><span style="font-family:&quot;"><span style="font-size:x-small;">SET PATH=%PATH%;c:\pyd\bin\python</span></span><span style="font-family:&quot;"><span style="font-size:x-small;"><br /></span></span><span style="font-family:&quot;"><span style="font-size:x-small;"> SET PYTHONHOME=c:\pyd\</span></span><span style="font-family:&quot;"><span style="font-size:x-small;"><br /></span></span><span style="font-family:&quot;"><span style="font-size:x-small;"> SET PYTHONCASEOK=1</span></span><span style="font-family:&quot;"><span style="font-size:x-small;"><br /></span></span><span style="font-family:&quot;"><span style="font-size:x-small;"> </span></span></code><br /><span style="font-family:&quot;"><span style="font-size:x-small;"></span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;">Depois de adicionar essas linhas ao final do autoexec.bat vc só precisará reiniar o computador e terá tudo pronto para usar.</span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;"></span></span><br /><span style="font-family:&quot;"><span style="font-size:x-small;">O comando para iniciar o python no DOS é <b>#pythond</b></span></span>
<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8163534671376006245-570350296664892956?l=maltzsama.blogspot.com' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/290/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=290&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/05/05/instalacao-do-python-no-ms-dosfreedos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="https://blogger.googleusercontent.com/tracker/8163534671376006245-570350296664892956?l=maltzsama.blogspot.com" medium="image" />
	</item>
		<item>
		<title>wxFormBuilder</title>
		<link>http://maltzsama.wordpress.com/2011/04/04/wxformbuilder/</link>
		<comments>http://maltzsama.wordpress.com/2011/04/04/wxformbuilder/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 20:58:00 +0000</pubDate>
		<dc:creator>maltzsama</dc:creator>
				<category><![CDATA[python]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[ide python]]></category>
		<category><![CDATA[pythond]]></category>

		<guid isPermaLink="false">http://maltzsama.wordpress.com/2011/04/04/wxformbuilder</guid>
		<description><![CDATA[Nos últimos 2 ou 3 anos venho programado quase que exclusivamente em python. Uma linguagem muito divertida, fácil e produtiva por sinal. Mas uma coisa que sempre sofri um pouco foi ter que criar interfaces gráficas através de linha de comando que acabava sendo pouco produtivo no final das contas(me desculpem os fã-boys do shell, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=284&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div align="justify">Nos últimos 2 ou 3 anos venho programado quase que exclusivamente em python. Uma linguagem muito divertida, fácil e produtiva por sinal. Mas uma coisa que sempre sofri um pouco foi ter que criar interfaces gráficas através de linha de comando que acabava sendo pouco produtivo no final das contas(me desculpem os fã-boys do shell, mas não é produtivo criar componente por componente).</div>
<div align="justify">Finalmente, depois de algum tempo desenvolvendo para modo-texto e fazendo interfaces o mais simples possível. Vi outro dia na lista de discursão de python um programa muitissimo interessante. O tal do <a href="http://wxformbuilder.org/">wxFormBuilder</a>, simplesmente perfeito.</div>
<div align="justify" class="separator" style="clear:both;text-align:center;"><a href="http://maltzsama.files.wordpress.com/2011/04/wxbuilder2.png" style="margin-left:1em;margin-right:1em;"><img border="0" height="433" src="http://maltzsama.files.wordpress.com/2011/04/wxbuilder2.png?w=640&#038;h=433" width="640" />&nbsp;</a></div>
<div align="justify" class="separator" style="clear:both;text-align:center;">&nbsp;&nbsp;</div>
<p>Reclamei durante anos da forma que o Glade trabalhava, criando aquele xml dos infernos, ou mesmo usando aqueles pequenos projetos que transformava o XML em um código python eu achava simplesmnete chato.<br />O PyQT eu nunca usei de fato. Mas o WxFormBuilder parece ser fão da filosofia KISS(keep it simple, stupid).<br />Ele é capaz de gerar os códigos em C++, Pyhton e XML. Vale a pena conferir e ganhar ainda mais produtividade.
<div class="blogger-post-footer"><img width='1' height='1' src='' alt='' /></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/maltzsama.wordpress.com/284/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/maltzsama.wordpress.com/284/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/maltzsama.wordpress.com/284/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=maltzsama.wordpress.com&amp;blog=9188720&amp;post=284&amp;subd=maltzsama&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://maltzsama.wordpress.com/2011/04/04/wxformbuilder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/22ba6c1af004be4e22570850ce7dbb63?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">maltzsama</media:title>
		</media:content>

		<media:content url="http://maltzsama.files.wordpress.com/2011/04/wxbuilder2.png?w=300" medium="image" />
	</item>
	</channel>
</rss>
