<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2240031811551496628</id><updated>2011-11-27T23:06:14.993-02:00</updated><category term='exemplo'/><category term='desafios'/><category term='curso'/><category term='opinião'/><category term='iniciante'/><category term='django'/><category term='curiosidades'/><category term='links'/><category term='pegadinha'/><title type='text'>Aprenda Python</title><subtitle type='html'>Dicas para você que já é programador em outra linguagem.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>55</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8190049010303257813</id><published>2011-11-21T01:44:00.002-02:00</published><updated>2011-11-21T01:54:53.033-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><title type='text'>Várias versões de Python ao mesmo tempo</title><summary type='text'>Estou precisando ter o Python 2.6 (padrão no Ubuntu 10.04) convivendo harmoniosamente com a versão 2.7. Ou seja, mais de uma versão no mesmo sistema operacional.

Pesquisando, encontrei um repositório para Ubuntu com várias versões de Python: https://launchpad.net/~fkrull/+archive/deadsnakes

Achei também uma forma de fazer com que elas não briguem e não atrapalhem o que já funciona, dentro do </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8190049010303257813/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/11/varias-versoes-de-python-ao-mesmo-tempo.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8190049010303257813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8190049010303257813'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/11/varias-versoes-de-python-ao-mesmo-tempo.html' title='Várias versões de Python ao mesmo tempo'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-6477139283838211798</id><published>2011-10-24T15:14:00.000-02:00</published><updated>2011-10-24T15:14:18.015-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Programe conforme o PEP8</title><summary type='text'>Quando escrevemos programas na linguagem Python, é bom seguirmos as recomendações do  PEP8, que é uma convenção com padrões de codificação e recomenda, dentre outras coisas, que não misturamos tabs e espaços.

Como o PEP8 é formado de várias recomendações, às vezes é trabalhoso ficar conferindo se você está dentro do padrão ou não. Quando se aprende, tudo vai automático, mas quando você vem de </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/6477139283838211798/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/10/programe-conforme-o-pep8.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6477139283838211798'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6477139283838211798'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/10/programe-conforme-o-pep8.html' title='Programe conforme o PEP8'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4239310891363073089</id><published>2011-09-26T19:14:00.002-03:00</published><updated>2011-09-27T11:36:57.542-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Inverter strings</title><summary type='text'>Dada uma string, quero mostrá-la invertida. Em python é muito simples.
&gt;&gt;&gt; 'eu gosto de python'[::-1]
'nohtyp ed otsog ue'
E se eu quiser inverter palavra por palavra, mas mantendo a ordem em que as palavras aparecem no texto?
&gt;&gt;&gt; ' '.join([word[::-1] for word in 'eu gosto de python'.split()])
'ue otsog ed nohtyp'
A dica aqui é usar o slicing de um jeito não muito comum: com o argumento step (o </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4239310891363073089/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/inverter-strings.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4239310891363073089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4239310891363073089'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/inverter-strings.html' title='Inverter strings'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-2443954561225023667</id><published>2011-09-13T21:11:00.000-03:00</published><updated>2011-09-13T21:11:28.581-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><title type='text'>Itens comuns a mais de uma lista</title><summary type='text'>Em Python é muito prático trabalhar com listas.
Uma situação bastante comum é ter duas ou três listas e querer descobrir quais itens fazem parte de todas elas ou de mais de uma lista.

Para facilitar essa operação, temos o tipo de dado set.

Veja o exemplo:

&gt;&gt;&gt; aqui = set([1, 2, 3])
&gt;&gt;&gt; agora = set([2, 4, 5])
&gt;&gt;&gt; depois = set([2, 10, 15])
&gt;&gt;&gt; aqui.intersection(agora, depois)
set([2])
Dessa forma</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/2443954561225023667/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/itens-comuns-mais-de-uma-lista.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2443954561225023667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2443954561225023667'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/itens-comuns-mais-de-uma-lista.html' title='Itens comuns a mais de uma lista'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-9096251856521862133</id><published>2011-09-12T23:07:00.001-03:00</published><updated>2011-09-12T23:09:48.512-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Ordenando uma lista por mais de um campo</title><summary type='text'>A ordenação de listas em Python tem muito poder quando você tem uma lista de tuplas.

Para ordenar uma lista de tuplas, a função sorted() classifica o primeiro item da tupla, depois o segundo, e assim por diante.

Vamos a um exemplo: tenho uma lista de pessoas com nome, idade e salário. Quero classificá-la por idade (primeiro os mais jovens), salário (primeiro os que ganham mais) e por último, os</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/9096251856521862133/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/ordenando-uma-lista-por-mais-de-um.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/9096251856521862133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/9096251856521862133'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/09/ordenando-uma-lista-por-mais-de-um.html' title='Ordenando uma lista por mais de um campo'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4730719217747668877</id><published>2011-02-24T01:13:00.003-03:00</published><updated>2011-02-24T01:14:14.755-03:00</updated><title type='text'>Shell online</title><summary type='text'>Nem preciso dizer muito.

Testa aí: http://shell.appspot.com</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4730719217747668877/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2011/02/shell-online.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4730719217747668877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4730719217747668877'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2011/02/shell-online.html' title='Shell online'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-5845503317031534525</id><published>2010-11-11T02:46:00.001-02:00</published><updated>2010-11-11T02:49:11.997-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Ordenando e embaralhando uma lista</title><summary type='text'>Normalmente precisamos ordenar uma lista
Para isso, o método sort() é muito simples e direto:
&gt;&gt;&gt; lista = ['bbb', 'yyy', 'mmm', 'aaa', 'www', 'ddd']
&gt;&gt;&gt; lista.sort()
&gt;&gt;&gt; print lista
['aaa', 'bbb', 'ddd', 'mmm', 'www', 'yyy']
&gt;&gt;&gt;
Agora imagine que você queira ordenar sua lista pelo tamanho (len()) dos itens:
&gt;&gt;&gt; lista = ['aaaa', 'z', 'bbbbbbbbbb', 'nnn']
&gt;&gt;&gt; def por_tamanho(item):
...   return len</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/5845503317031534525/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/11/ordenando-e-embaralhando-uma-lista.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5845503317031534525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5845503317031534525'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/11/ordenando-e-embaralhando-uma-lista.html' title='Ordenando e embaralhando uma lista'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-7048986033384491502</id><published>2010-11-04T14:09:00.005-02:00</published><updated>2010-11-08T09:55:54.113-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Operador ternário</title><summary type='text'>Para quem não sabe, o operador ternário é assim (em PHP): echo ($a &lt; $b ? 'a é menor' : 'a não é menor');

Em Python, você pode fazer assim: print 'a é menor' if a &lt; b else 'a não é menor'

Porém, eu recomendo que você faça o arroz-com-feijão, que fica muito mais simples de entender:
&gt;&gt;&gt; if a &lt; b:
...     print 'a é menor'
... else:
...     print 'a não é menor'

Lembre-se que simples é melhor do</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/7048986033384491502/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/11/operador-ternario.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7048986033384491502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7048986033384491502'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/11/operador-ternario.html' title='Operador ternário'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1660054640698533238</id><published>2010-10-22T14:43:00.001-02:00</published><updated>2010-10-22T14:44:20.580-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Exemplos de biblioteca padrão de Python</title><summary type='text'>Hoje eu descobri o Python Module of the Week.

É muito legal porque ele tem a biblioteca padrão documentada com muitos exemplos.

Esse projeto segue o princípio de que programador gosta de ver código. Se gostasse de explicação, seria comentarista de futebol.

Bem-vindo aos códigos.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1660054640698533238/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/exemplos-de-biblioteca-padrao-de-python.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1660054640698533238'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1660054640698533238'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/exemplos-de-biblioteca-padrao-de-python.html' title='Exemplos de biblioteca padrão de Python'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3993760358552085394</id><published>2010-10-22T14:22:00.000-02:00</published><updated>2010-10-22T14:22:03.758-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Como lidar com datas em Python</title><summary type='text'>Eu encontrei um  ótimo artigo que traz explicações e exemplos de como mexer com datas em Python: datetime – Date/time value manipulation

Lá eu esclareci algumas  dúvidas comuns sobre como adicionar, subtrair ou formatar datas. Bem didático, com muitos exemplos.

Especificamente para formatar datas, eu sempre recorro à tabela com todos os códigos para formatação de data e hora no Python. Entra no</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3993760358552085394/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/como-lidar-com-datas-em-python.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3993760358552085394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3993760358552085394'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/como-lidar-com-datas-em-python.html' title='Como lidar com datas em Python'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1111777915495225475</id><published>2010-10-19T23:58:00.002-02:00</published><updated>2010-10-20T00:13:31.878-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><title type='text'>Função que retorna vários valores</title><summary type='text'>Em Python é possível ver uma função (ou método) retornar mais de um valor tirando proveito de listas e tuplas:

&gt;&gt;&gt; def dados_pessoais():
...   return ('joao', 16)
...
&gt;&gt;&gt; nome, idade = dados_pessoais()
&gt;&gt;&gt;
&gt;&gt;&gt; nome
'joao'
&gt;&gt;&gt; idade
16
&gt;&gt;&gt;
Sem complicação, né?

Aproveite e veja como desempacotar uma lista ou tupla atribuindo valor a várias variáveis ao mesmo tempo:

&gt;&gt;&gt; registro = ('marcos', '</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1111777915495225475/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/funcao-que-retorna-varios-valores.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1111777915495225475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1111777915495225475'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/funcao-que-retorna-varios-valores.html' title='Função que retorna vários valores'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-5825221233710675796</id><published>2010-10-18T11:25:00.001-02:00</published><updated>2010-10-18T11:27:02.998-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Ver o tipo de uma variável</title><summary type='text'>Outro dia lembrei que há um tempo quebrei um pouco a cabeça para descobrir como saber o tipo de uma variável em Python.

É fácil, ó:
&gt;&gt;&gt; s = 'texto'
&gt;&gt;&gt; if type(s) is str:
...   print 'sou string'

Para checar outros tipos, use tuple, list, dict, int, float, unicode.

Fica aí a dica e sugiro que você faça testes no shell.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/5825221233710675796/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/ver-o-tipo-de-uma-variavel.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5825221233710675796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5825221233710675796'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/10/ver-o-tipo-de-uma-variavel.html' title='Ver o tipo de uma variável'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1152461066590453668</id><published>2010-09-22T21:35:00.000-03:00</published><updated>2010-09-22T21:35:00.487-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Veja seu programa python rodando!</title><summary type='text'>O Online Python Tutor é muito bom para quem está aprendendo a programar e praticar os conceitos de lógica.

Com ele você consegue acompanhar a execução do seu código linha a linha, como se fosse um depurador. E ele ainda mostra as variáveis e seus conteúdos.

Não é recomendado para depurar código, não. É só para aprender mesmo.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1152461066590453668/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/veja-seu-programa-python-rodando.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1152461066590453668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1152461066590453668'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/veja-seu-programa-python-rodando.html' title='Veja seu programa python rodando!'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-6448368774823315341</id><published>2010-09-17T16:16:00.000-03:00</published><updated>2010-09-17T16:16:48.833-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='desafios'/><category scheme='http://www.blogger.com/atom/ns#' term='curso'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Pratique Python online no CodingBat</title><summary type='text'>Há alguns dias eu postei sobre um curso de Python elaborado pelo Google.

Fuçando, descobri que o autor, Nick Parlante, é professor de Stanford e mantém um projeto bem legal para ajudar pessoas a aprenderem Python e Java. É o CodingBat.

É um bom lugar para praticar Python e ver os resultados ali, na hora.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/6448368774823315341/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/pratique-python-online-no-codingbat.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6448368774823315341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6448368774823315341'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/pratique-python-online-no-codingbat.html' title='Pratique Python online no CodingBat'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-745754397521040929</id><published>2010-09-16T23:17:00.001-03:00</published><updated>2010-09-16T23:23:14.387-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Garanta o fechamento dos arquivos</title><summary type='text'>Há alguns dias rolou uma thread interessante na lista Python Brasil sobre leitura de arquivos texto.

O Leonardo Santagada fez uma observação importantíssima a respeito de como devemos abrir e ler arquivos em Python.


A recomendação dele é abrir e ler arquivos usando o seguinte pattern:
with open('arquivo.txt') as arquivo:
    for linha in arquivo:
        print linha.strip()

Em seguida, o </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/745754397521040929/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/garanta-o-fechamento-dos-arquivos.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/745754397521040929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/745754397521040929'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/garanta-o-fechamento-dos-arquivos.html' title='Garanta o fechamento dos arquivos'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1082570995396359951</id><published>2010-09-08T15:55:00.003-03:00</published><updated>2010-09-09T10:23:33.047-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curso'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Curso gratuito de Python em portugues no Youtube</title><summary type='text'>O curso "Lógica de Programação Usando Python - Curso Completo" é uma iniciativa do prof. Ronaldo Ramos, do Instituto Federal de Educação Ciência e Tecnologia do Ceará.

No site do IFET-CE tem o índice com todas as aulas em vídeo, e também tem a página do autor, no Youtube.

Na data desse post (08/set/2010) constavam 21 aulas disponíveis. 

Vale visitar o site deles, o Lambda, que fala sobre </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1082570995396359951/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/curso-gratuito-de-python-em-portugues.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1082570995396359951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1082570995396359951'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/curso-gratuito-de-python-em-portugues.html' title='Curso gratuito de Python em portugues no Youtube'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1836106849051714890</id><published>2010-09-08T14:55:00.000-03:00</published><updated>2010-09-08T14:55:23.958-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curso'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Curso de Python no Under Linux</title><summary type='text'>Segue o link de mais um curso gratuito de python criado em agosto/2010.

Esse é em português: Curso de Introdução ao Python</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1836106849051714890/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/curso-de-python-no-under-linux.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1836106849051714890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1836106849051714890'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/curso-de-python-no-under-linux.html' title='Curso de Python no Under Linux'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4412278979658635910</id><published>2010-09-02T23:29:00.002-03:00</published><updated>2010-09-08T14:52:00.700-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curso'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Aprenda Python com o MIT</title><summary type='text'>Mais 3 cursos gratuitos de Python. Dessa vez no MIT:

A Gentle Introduction to Programming Using Python (de 2008)
Introduction to Electrical Engineering and Computer Science I (de 2009)
A Gentle Introduction to Programming Using Python (de 2010)

Os vídeos você encontra no Youtube.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4412278979658635910/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/aprenda-python-com-o-mit.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4412278979658635910'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4412278979658635910'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/aprenda-python-com-o-mit.html' title='Aprenda Python com o MIT'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3266223132559612462</id><published>2010-09-02T22:47:00.001-03:00</published><updated>2010-09-08T14:51:25.001-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curso'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Aprenda Python com um curso do Google</title><summary type='text'>Tem gente que ainda duvida que Python é uma linguagem muito usada.

Depois que li o texto Google Python Style Guide, tenho repassado para várias pessoas. Na seção "Background", está escrito que Python é a principal linguagem de script  usada pelo Google. Vale lembrar que o Guido van Rossum, criador da linguagem, também trabalha lá.

Recentemente descobri que o Google disponibilizou gratuitamente </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3266223132559612462/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/aprenda-python-com-um-curso-do-google.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3266223132559612462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3266223132559612462'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2010/09/aprenda-python-com-um-curso-do-google.html' title='Aprenda Python com um curso do Google'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-5913759635089495448</id><published>2009-11-17T11:26:00.019-02:00</published><updated>2010-07-01T01:35:25.040-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Como gravar campos de largura fixa</title><summary type='text'>Eu gosto das listas Python Brasil e Django Brasil porque nelas o pessoal sempre ajuda os iniciantes, sem preconceito. Lá, todo mundo se lembra que não nasceu sabendo.

Esses dias surgiu uma dúvida na lista Django Brasil sobre como formatar um arquivo de saída com campos de largura fixa e, dando continuidade ao objetivo desse blog de fornecer dicas para iniciantes em Python, vou transcrever o que </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/5913759635089495448/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/11/como-gravar-campos-de-largura-fixa.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5913759635089495448'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5913759635089495448'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/11/como-gravar-campos-de-largura-fixa.html' title='Como gravar campos de largura fixa'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3444282119444818477</id><published>2009-11-16T19:13:00.006-02:00</published><updated>2010-07-01T01:42:13.461-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pegadinha'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Várias atribuições na mesma linha</title><summary type='text'>Há alguns dias eu enviei uma pergunta para a lista Python Brasil perguntando sobre estilo de inicialização de variáveis e recebi uma ótima dica.

Em Python é possível atribuir conteúdo às variáveis de dois modos:
a = b = ""
ou
a = ""
b = ""
A primeira forma é um atalho, né? Mais prática e sucinta, mas esconde uma pegadinha.
Se eu usar esse atalho com dicionários ou listas, por exemplo, veja o que</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3444282119444818477/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/11/varias-atribuicoes-na-mesma-linha.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3444282119444818477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3444282119444818477'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/11/varias-atribuicoes-na-mesma-linha.html' title='Várias atribuições na mesma linha'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4617282909999409014</id><published>2009-10-20T13:50:00.005-02:00</published><updated>2010-07-01T01:46:16.968-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Atribuir conteúdo default a uma variável</title><summary type='text'>Normalmente, quando queremos checar se uma determinada variável está vazia para atribuir um conteúdo default a ela, fazemos assim:

if not minha_var:
    minha_var = 'default'

Existe um atalhozinho legal para isso:
minha_var = minha_var or 'default'

Aqui entra em ação os operadores lógicos do python, nesse caso, o or.

Para saber mais sobre esse assunto e também como funciona o and e o not, </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4617282909999409014/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/atribuir-conteudo-default-uma-variavel.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4617282909999409014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4617282909999409014'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/atribuir-conteudo-default-uma-variavel.html' title='Atribuir conteúdo default a uma variável'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-6393901080063452828</id><published>2009-10-15T15:49:00.007-03:00</published><updated>2010-07-01T01:50:02.185-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>filter() ou list comprehension?</title><summary type='text'>Eu postei na lista Python Brasil a seguinte pergunta:

Pessoal, bom dia.

Eu tenho uma lista retornada pela função re.split(r'(\w+)', s).

Para me livrar das ocorrências nulas, estou usando o seguinte comando:
partes = [t for t in re.split(r'(\w+)', s) if t]

No entanto, consigo o mesmo resultado se eu usar:
partes = filter(None, re.split(r'(\w+)', s))


O manual[1] diz que o filter() é </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/6393901080063452828/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/filter-ou-list-comprehension.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6393901080063452828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6393901080063452828'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/filter-ou-list-comprehension.html' title='filter() ou list comprehension?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1562585479900237640</id><published>2009-10-14T23:45:00.005-03:00</published><updated>2010-07-01T01:53:01.029-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='django'/><title type='text'>[django] Rodar script da linha de comando</title><summary type='text'>Todo site desenvolvido em Django tem uma configuração básica: o mapeamento de URLs para views, no arquivo urls.py.

E se eu precisar rodar alguma rotina que manipula o banco de dados via linha de comando do terminal? Esse mapeamento não vai me ajudar em nada, porque a rotina que vai rodar a partir do terminal não é uma view que vai mostrar algo usando um template.

Hoje eu me deparei com essa </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1562585479900237640/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/django-rodar-script-da-linha-de-comando.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1562585479900237640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1562585479900237640'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/django-rodar-script-da-linha-de-comando.html' title='[django] Rodar script da linha de comando'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3069370132271809385</id><published>2009-10-13T08:39:00.017-03:00</published><updated>2010-03-26T02:20:17.879-03:00</updated><title type='text'>Como usar o SyntaxHighlighter</title><summary type='text'>Eu resolvi fazer uma revisão em alguns posts desse blog e vi que aquele que fala sobre o SyntaxHighlighter não diz nada sobre como usá-lo. :-(

Pois bem, vamos resolver essa falha e detalhar como ele funciona.

A função do SyntaxHighlighter é mostrar trechos de código com coloração de sintaxe e numeração de linha, nas páginas do seu site. Opcionalmente, podemos também mostrar uma régua de colunas</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3069370132271809385/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/como-usar-o-syntaxhighlighter.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3069370132271809385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3069370132271809385'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/como-usar-o-syntaxhighlighter.html' title='Como usar o SyntaxHighlighter'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-7643028478106378724</id><published>2009-10-12T17:27:00.011-03:00</published><updated>2010-07-01T01:55:12.852-03:00</updated><title type='text'>Nova formatação de strings</title><summary type='text'>A partir da versão 2.6 o Python traz um recurso diferente para formatar strings.

Diz o manual que a partir da versão 3.0 a formatação usando o método % será desencorajado, por isso resolvi incluir esse post.

Se você é iniciante em Python, tente começar a mudar logo para o método do str.format().

A mudança é simples. Portanto, vamos aos exemplos:
nome = 'Fernando'
sobrenome = 'Silva'
idade = 9
</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/7643028478106378724/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/nova-formatacao-de-strings.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7643028478106378724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7643028478106378724'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/nova-formatacao-de-strings.html' title='Nova formatação de strings'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-2907040752156061614</id><published>2009-10-08T14:48:00.010-03:00</published><updated>2010-07-01T01:59:10.296-03:00</updated><title type='text'>Regexp para validar passagem bíblica</title><summary type='text'>Há alguns dias venho me dedicando na migração de um site de conteúdo bíblico para Django.

Uma coisa básica quando trata-se de Bíblia, é lidar com passagens bíblicas. Cada passagem pode envolver um ou mais versos (versículos) ou capítulos em sequência ou não.

Seguem alguns exemplos de passagens bíblicas válidas:
Genesis 5
Exodo 20:8-11
Mateus 6:5,6
Marcos 5-7
II Reis 2:6

As passagens podem </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/2907040752156061614/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/regexp-para-validar-passagem-biblica.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2907040752156061614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2907040752156061614'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/10/regexp-para-validar-passagem-biblica.html' title='Regexp para validar passagem bíblica'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-5511688942836863177</id><published>2009-08-05T12:04:00.002-03:00</published><updated>2009-08-05T12:06:16.903-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Todo desenvolvedor deve saber</title><summary type='text'>Por alguns emails que li em algumas listas que participo, resolvi escrever sobre o que um desenvolvedor precisa saber.Pode ser desenvolvedor de Python, Java, Ruby, PHP, Cobol, Fortran, Shell. Não interessa.Você que é desenvolvedor precisa saber disso: http://viniciusban.blogspot.com/2009/08/todo-desenvolvedor-deve-saber.html</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/5511688942836863177/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/08/todo-desenvolvedor-deve-saber.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5511688942836863177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5511688942836863177'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/08/todo-desenvolvedor-deve-saber.html' title='Todo desenvolvedor deve saber'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-9216231173803207120</id><published>2009-08-05T10:01:00.011-03:00</published><updated>2010-07-01T02:02:43.008-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pegadinha'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Pegadinha: parâmetro default</title><summary type='text'>Toda linguagem tem suas armadilhas e Python não é uma excessão.

A linguagem é prática, clara e objetiva, mas nem tudo é perfeito.

A seção 4.22 do General Python FAQ fala sobre esse assunto, mas passa despercebido para iniciantes na linguagem. É o tipo de informação que quem está começando, não se importa muito. Deixa para aprender depois. Daí vem um problema que é relativamente difícil de </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/9216231173803207120/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/08/pegadinha-parametro-default.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/9216231173803207120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/9216231173803207120'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/08/pegadinha-parametro-default.html' title='Pegadinha: parâmetro default'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-5767031489756351091</id><published>2009-07-15T00:59:00.002-03:00</published><updated>2009-07-15T01:03:04.787-03:00</updated><title type='text'>Mais um framework para python?</title><summary type='text'>Com esse post anuncio o início de mais um blog para iniciantes: Aprenda web2py.Dessa vez a respeito do framework web2py.Mas, por que web2py se o que faz sucesso no Brasil é o Django?Bem, leia o post inicial do blog Aprenda web2py que você vai descobrir.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/5767031489756351091/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/07/mais-um-framework-para-python.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5767031489756351091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/5767031489756351091'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/07/mais-um-framework-para-python.html' title='Mais um framework para python?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8068444586160899215</id><published>2009-05-26T23:58:00.004-03:00</published><updated>2009-05-28T02:59:09.303-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Livro Python para desenvolvedores</title><summary type='text'>Ótima iniciativa do Luiz Eduardo Borges de escrever um livro de Python em português.Colei na íntegra a mensagem de lançamento do livro:------- Início -------"Python para desenvolvedores" é o primeiro livro livre sobre Python em português a ser distribuído sob a licença Creative Commons (Atribuição-Uso Não-Comercial-Compartilhamento pela mesma Licença 2.5 Brasil)."Python para Desenvolvedores", </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8068444586160899215/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/05/livro-python-para-desenvolvedores.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8068444586160899215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8068444586160899215'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/05/livro-python-para-desenvolvedores.html' title='Livro Python para desenvolvedores'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4650822699901931381</id><published>2009-05-25T22:37:00.013-03:00</published><updated>2010-07-01T02:09:00.028-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Criando dicionários com uma sintaxe mais prática</title><summary type='text'>Em python, um dicionário é o mesmo que um array associativo em PHP. Ou seja, uma lista indexada por chaves (keys) que podem ser strings e apontam para valores.

Para criar um dicionário, a sintaxe é:
d = {'fruta': 'goiaba', 'dia': 'sabado', 'nome': 'maria'}
Um jeito diferente de criar o mesmo dicionário é usando o construtor dict(), assim:
d = dict([('fruta', 'goiaba'), ('dia', 'sabado'), ('nome'</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4650822699901931381/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/05/criando-dicionarios-com-uma-sintaxe.html#comment-form' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4650822699901931381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4650822699901931381'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/05/criando-dicionarios-com-uma-sintaxe.html' title='Criando dicionários com uma sintaxe mais prática'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3442661349596358398</id><published>2009-04-30T03:55:00.004-03:00</published><updated>2009-04-30T04:05:33.092-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Exemplos com o SyntaxHighlighter</title><summary type='text'>No blog do José Peleteiro eu encontrei um exemplo de código formatado bem bonitinho e resolvi ver o que era.Que maravilha é o SyntaxHighlighter! Simples e objetivo.Agora não preciso mais me preocupar em colocar os exemplos com numeração de linha.Fica aí a dica. ;-)</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3442661349596358398/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/04/exemplos-com-o-syntaxhighlighter.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3442661349596358398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3442661349596358398'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/04/exemplos-com-o-syntaxhighlighter.html' title='Exemplos com o SyntaxHighlighter'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3139197838920196898</id><published>2009-04-09T10:19:00.004-03:00</published><updated>2009-04-09T12:16:51.541-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='desafios'/><title type='text'>Boa fonte de exercícios</title><summary type='text'>Muita gente já deve conhecer, mas ontem eu fiquei conhecendo o Projeto Euler.Para quem está aprendendo uma linguagem e quer alguns exercícios, é muito legal.Tem também o Python Challenge, que tem um estilo BEM diferente.Aliás, sobre o Python Challenge, sugiro ler a página About, esvaziar completamente a cabeça e iniciar o primeiro desafio.Só uma dica: vários desafios podem ser solucionados "</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3139197838920196898/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/04/boa-fonte-de-exercicios.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3139197838920196898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3139197838920196898'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/04/boa-fonte-de-exercicios.html' title='Boa fonte de exercícios'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-6421719133179976125</id><published>2009-02-25T17:29:00.002-03:00</published><updated>2009-02-25T17:52:27.468-03:00</updated><title type='text'>Django no planeta terra</title><summary type='text'>Quem escolhe Python para trabalhar, normalmente já viu outras linguagens na vida e acabou ficando com uma escolha menos burocrática. Esse é o meu caso, apesar de ainda achar que Python poderia ser mais simples em diversas coisas.Indo para o lado de aplicativos web, resolvi apostar minhas fichas no Django. Tanta propaganda em torno dele não poderia ser apenas vaporware. Ainda mais em uma </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/6421719133179976125/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2009/02/django-no-planeta-terra.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6421719133179976125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/6421719133179976125'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2009/02/django-no-planeta-terra.html' title='Django no planeta terra'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4229198072165717155</id><published>2008-11-18T00:08:00.003-02:00</published><updated>2008-11-18T00:13:32.594-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Curso online de Python na Visie</title><summary type='text'>Eu sou cadastrado no campus online da Visie porque eles têm bons materiais.Lá, eles disponibilizaram algum material gratuito e introdutório sobre Python.Eu gosto da forma como eles passam conhecimento. São diretos e práticos.Acho que vale a pena, se você for iniciante ou quiser aprender aguma coisa de Python.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4229198072165717155/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-online-de-python-na-visie.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4229198072165717155'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4229198072165717155'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-online-de-python-na-visie.html' title='Curso online de Python na Visie'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1017634393293381440</id><published>2008-11-10T21:50:00.009-02:00</published><updated>2009-10-12T18:41:26.315-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Transformando string delimitada em uma lista</title><summary type='text'>Outro dia eu recebi uma mensagem que tinha um monte de gente copiada. Daí eu pensei: "eu podia pegar esse monte de e-mails e transformar numa lista, né?"Então esse é o meu exercício de hoje: pegar uma string delimitada e transformar numa lista.É claro que podem existir várias formas de fazer isso, mas eu gostaria da ajuda de vocês para escolher a maneira mais pythônica de fazer isso.Para dar um </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1017634393293381440/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/transformando-string-delimitada-em-uma.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1017634393293381440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1017634393293381440'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/transformando-string-delimitada-em-uma.html' title='Transformando string delimitada em uma lista'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8719272974388893230</id><published>2008-11-06T23:27:00.003-02:00</published><updated>2008-11-06T23:47:39.560-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Curso Python - UFRJ</title><summary type='text'>Essa vida de blogueiro de nicho é muito legal.Depois que lancei o Aprenda Python, já conheci algumas pessoas por e-mail.Tenho conversado com elas, trocado experiências e conhecido um pouco mais sobre o mercado de Python.A partir de uma pergunta do Zezim (do Versão Própria), já até surgiu uma idéia de um utilitariozinho em Python. Vamos ver, se eu conseguir posto aqui. Se não conseguir, vou pedir </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8719272974388893230/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-python-ufrj.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8719272974388893230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8719272974388893230'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-python-ufrj.html' title='Curso Python - UFRJ'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-2284526192302515536</id><published>2008-11-06T07:08:00.002-02:00</published><updated>2008-11-06T07:48:33.005-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Curso online de Python (em português)</title><summary type='text'>O Evaldo Junior Bento resolveu dar uma mãozinha para quem está aprendendo Python e montou um curso online semanal.As aulas são postadas no blog dele todo final de semana.Veja a página de anúncio do Curso online e interativo de Python.Acho que vale a pena acompanhar.</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/2284526192302515536/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-online-de-python-em-portugus.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2284526192302515536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/2284526192302515536'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/curso-online-de-python-em-portugus.html' title='Curso online de Python (em português)'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1356132983117252435</id><published>2008-11-03T00:00:00.005-02:00</published><updated>2008-11-03T00:24:06.046-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Siga o tutorial</title><summary type='text'>Eu resolvi dar um tempinho nos exemplos e ficar sem postá-los para poder seguir o tutorial de Python, conforme a indicação de algumas mensagens que leio na lista python-brasil.Puxa, eu deveria ter feito isso desde o início!Então, fica a dica para quem é iniciante (mas acha que não é): siga o tutorial do início até o fim. Você não vai se arrepender!Siga o tutorial em inglês ou em português (PDF).</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1356132983117252435/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/siga-o-tutorial.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1356132983117252435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1356132983117252435'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/11/siga-o-tutorial.html' title='Siga o tutorial'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1411055283440670482</id><published>2008-10-31T17:09:00.004-02:00</published><updated>2008-10-31T17:45:24.162-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Python Bibliotheca (para iniciantes)</title><summary type='text'>Fuçando por aí, encontrei um site ótimo para quem está começando em Python.É o Python Bibliotheca.Atenção aos menus do lado esquerdo, que têm coisas legais: dicas de programação, exercícios reais para resolver e outros itens interessantes.Vai lá, aproveita para aprender.  :-)</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1411055283440670482/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/python-bibliotheca-para-iniciantes.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1411055283440670482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1411055283440670482'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/python-bibliotheca-para-iniciantes.html' title='Python Bibliotheca (para iniciantes)'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-739529861672625313</id><published>2008-10-28T03:28:00.005-02:00</published><updated>2008-10-28T04:16:59.309-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Não deixe suas janelas quebradas</title><summary type='text'>Quem já leu o livro The Pragmatic Programmer: From Journeyman to Master sabe do que estou falando.Uma janela quebrada aumenta a possibilidade de outras também virem a quebrar.Outra analogia pode ser feita com um jardim. Se ele é bem cuidado, as ervas daninhas vão ter mais dificuldade em crescer, e você terá mais facilidade em mantê-lo limpo e vistoso.Acho o assunto bem apropriado para quem está </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/739529861672625313/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/no-deixe-suas-janelas-quebradas.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/739529861672625313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/739529861672625313'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/no-deixe-suas-janelas-quebradas.html' title='Não deixe suas janelas quebradas'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4047560517228346102</id><published>2008-10-28T02:54:00.004-02:00</published><updated>2008-10-28T03:12:42.607-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><title type='text'>Framework web no mundo real</title><summary type='text'>Na lista python-brasil há muitas mensagens falando sobre frameworks web.O povo fala das vantagens de uma e de outra opção. Há os defensores do Zope+Plone, do Django, do Turbogears, Pylons, CherryPy, e por aí vai.Nesse post não vamos analisar nenhum deles. Na verdade é uma oportunidade para você contar o que o mundo real usa, independente do purismo ou avanço tecnológico.Portanto, insira um </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4047560517228346102/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/framework-web-no-mundo-real.html#comment-form' title='9 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4047560517228346102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4047560517228346102'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/framework-web-no-mundo-real.html' title='Framework web no mundo real'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-415276309776016129</id><published>2008-10-28T02:01:00.009-02:00</published><updated>2009-04-30T03:52:16.236-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Exemplo 3 - Ler arquivo CSV e mostrar</title><summary type='text'>fones02.py - Lê um arquivo delimitado por ponto-e-vírgula e mostra os campos na tela.Esse exemplo junta os exemplos 1 e 2, usando o pacote csv do Python conforme a orientação do Adam Brandizzi, no exemplo 2.""" Le um arquivo delimitado e mostra os campos na tela. """import csvprint __doc__f = csv.reader(open('fones.txt'), delimiter=';')for [nome,nasc,fone] in f:    print 'nome=%s | nasc=%s | fone</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/415276309776016129/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-3-ler-arquivo-csv-e-mostrar.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/415276309776016129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/415276309776016129'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-3-ler-arquivo-csv-e-mostrar.html' title='Exemplo 3 - Ler arquivo CSV e mostrar'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-7299611112482946375</id><published>2008-10-26T15:26:00.015-02:00</published><updated>2009-04-30T03:53:41.040-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Exemplo 2 - Usando string.split()</title><summary type='text'>string_split.py - Separa uma string (registro de dados) em pedaços (campos), usando um delimitador.Aí vai um exemplo prático, para quem lida com importação de dados estilo arquivo csv, com campos separados por um delimitador.""" Separa um registro delimitado, em campos. """print __doc__reg = 'Fabiana Lemos;Rua das Acácias, 780;' +\    'Centro;Belo Horizonte;MG;(31) 3234-7890;07/12/1978'nome, </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/7299611112482946375/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-2-usando-stringsplit.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7299611112482946375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7299611112482946375'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-2-usando-stringsplit.html' title='Exemplo 2 - Usando string.split()'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8942964794844082596</id><published>2008-10-26T03:23:00.024-02:00</published><updated>2009-04-30T03:54:31.398-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='exemplo'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Exemplo 1 - Ler arquivo</title><summary type='text'>fones01.py - Lê um arquivo e mostra todo o conteúdo na tela.Esse exemplo faz só isso mesmo.Baixe o fonte e o arquivo texto lido por ele (zipados).""" Le um arquivo texto e mostra o conteudo na tela. """print __doc__f = open('\usr\www\py\\fones.txt')for linha in f:    print linha.rstrip()f.close()print '--- fim'Vamos analisar os detalhes desse programa.Linha 3: Execute esse programa e veja que </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8942964794844082596/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-1-ler-arquivo.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8942964794844082596'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8942964794844082596'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/exemplo-1-ler-arquivo.html' title='Exemplo 1 - Ler arquivo'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-848416640819394430</id><published>2008-10-26T03:09:00.002-02:00</published><updated>2008-10-26T03:18:09.280-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Qual editor?</title><summary type='text'>Essa dúvida é frequente para iniciantes.Eu tenho usado o Vim. É um editor que faz você pensar enquanto trabalha. Ele te força a pensar na melhor maneira de realizar suas tarefas. E eu gosto disso.O problema é que ele é um editor modal (tem modos de seleção, inserção, modificação, visual, etc.) e a curva de aprendizagem não é curta, não.No entanto, se você acha que o Vim é difícil, tente o </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/848416640819394430/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/qual-editor.html#comment-form' title='5 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/848416640819394430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/848416640819394430'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/qual-editor.html' title='Qual editor?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-7002892951493337046</id><published>2008-10-24T15:45:00.008-02:00</published><updated>2008-10-24T16:05:15.322-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Aprendendo a aprender Python</title><summary type='text'> Esse texto é tão bom que resolvi transcrevê-lo aqui na íntegra.O original está em http://brandizzi.googlepages.com/aprendendo-a-aprender-python.htmlAuthor: Adam Victor Nazareth Brandizzi &lt;brandizzi+python@gmail.com&gt;&lt;!-- -*- coding: UTF-8 -*- --&gt;  Contents PreâmbuloFerramentasEditorBanco de dadosFerramenta de documentaçãoGerador de Documentação Bibliotecas e FrameworksGraphical User </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/7002892951493337046/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/aprendendo-aprender-python.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7002892951493337046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/7002892951493337046'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/aprendendo-aprender-python.html' title='Aprendendo a aprender Python'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-4966596655446871414</id><published>2008-10-23T11:45:00.007-02:00</published><updated>2009-02-11T11:56:12.000-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Python é isso, Python é aquilo</title><summary type='text'>Quem começa a aprender Python, encontra uma comunidade sempre disposta a ajudar e uma lista de discussão bem ativa.Claro, todo mundo fala bem de Python. Todos dizem que Python é fácil, é simples, é multiplataforma, é alto nível, é isso, é aquilo.O que ninguém fala é que Python é diferente!Python é diferente de java, apesar de ter alguma coisa parecida com ela.Python é diferente de PHP, de Perl, </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/4966596655446871414/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/python-isso-python-aquilo.html#comment-form' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4966596655446871414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/4966596655446871414'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/python-isso-python-aquilo.html' title='Python é isso, Python é aquilo'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1369650426218292575</id><published>2008-10-23T11:20:00.002-02:00</published><updated>2008-10-23T11:31:47.343-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='curiosidades'/><category scheme='http://www.blogger.com/atom/ns#' term='opinião'/><title type='text'>Afinal, quem usa Python?</title><summary type='text'>Quem aprendeu java ou c++ certamente ouviu falar dos famosos livros Thinking in Java e Thinking in C++ do Bruce Eckel, certo?Vale a pena dar uma lida nessa entrevista (em inglês) que ele concedeu em 2003 sobre Python: Python and the Programmer. São 3 páginas de entrevista.Veja também o Python Advocacy from Bruce Eckel.Além dele, veja os casos de sucesso com Python (em inglês).</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1369650426218292575/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/afinal-quem-usa-python.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1369650426218292575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1369650426218292575'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/afinal-quem-usa-python.html' title='Afinal, quem usa Python?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3264442556457963254</id><published>2008-10-22T18:47:00.008-02:00</published><updated>2008-10-23T13:37:19.723-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>Características de Python</title><summary type='text'>Linguagem interpretada e multi-plataforma. Roda em Windows, Linux, Mac, celulares, web, etc., etc. e etc.Posso falar aqui um tempão, mas ainda não encontrei nenhum texto tão completo quanto a página do Python na Wikipédia em português.Partes importantes desse texto da Wikipédia:Prioriza a legibilidade do código sobre a velocidade ou expressividade. Combina uma sintaxe concisa e clara com os </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3264442556457963254/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/caractersticas-de-python.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3264442556457963254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3264442556457963254'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/caractersticas-de-python.html' title='Características de Python'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8758876470022511099</id><published>2008-10-22T18:36:00.008-02:00</published><updated>2008-10-24T14:04:36.931-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><title type='text'>O que é PEP? Para quê serve?</title><summary type='text'>No mundo Python, muito se ouve falar em PEP.É pep 8, pep 20, e por aí vai.Como a sigla diz (em inglês), PEP é uma Pyhton Enhancement Proposal, ou uma Proposta de Melhoria do Python.Uma PEP serve para propor um padrão, melhoria, funcionalidade, estrutura, dar dicas, etc.Vale a pena ler as seguintes PEPs:#0 (lista de todas as PEPs)#8 em inglês ou em português (Guia de estilo para código-fonte em </summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8758876470022511099/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/o-que-pep-para-qu-serve.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8758876470022511099'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8758876470022511099'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/o-que-pep-para-qu-serve.html' title='O que é PEP? Para quê serve?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-8878359458343852818</id><published>2008-10-22T17:46:00.005-02:00</published><updated>2008-10-23T13:37:52.889-02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Leituras recomendadas</title><summary type='text'>Vale a pena dar uma lida em Essential Python Reading   Para abreviar: você pode ir direto à lista com os linksMais recursos:http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.htmlhttp://jaynes.colorado.edu/PythonIdioms.htmlhttp://dirtsimple.org/2004/12/python-is-not-java.htmlhttp://dirtsimple.org/2004/12/java-is-not-python-either.htmlhttp://jaynes.colorado.edu/PythonGuidelines.html</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/8878359458343852818/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/leituras-recomendadas.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8878359458343852818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/8878359458343852818'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/leituras-recomendadas.html' title='Leituras recomendadas'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-3881357740112421345</id><published>2008-10-22T17:36:00.017-02:00</published><updated>2010-09-08T14:44:22.349-03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iniciante'/><category scheme='http://www.blogger.com/atom/ns#' term='links'/><title type='text'>Por onde começar?</title><summary type='text'>Essa é a dúvida de todo mundo que começa em uma nova linguagem de programação.

[inserido em 30/04/2009] Vá por mim, aprenda python e dedique-se ao inglês! ;-)

Como Python é interpretado, faça o download para sua plataforma em www.python.org/download

Importante: o site oficial da linguagem é www.python.org e não .com. Em português, temos o www.python.org.br

Agora, vamos tentar "vender o peixe"</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/3881357740112421345/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/por-onde-comear.html#comment-form' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3881357740112421345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/3881357740112421345'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/por-onde-comear.html' title='Por onde começar?'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2240031811551496628.post-1607990433509585178</id><published>2008-10-22T16:10:00.001-02:00</published><updated>2008-10-22T16:46:01.159-02:00</updated><title type='text'>Vamos aprender juntos</title><summary type='text'>Resolvi aprender Python e compartilhar com você.Quem já sabe uma linguagem esquece que quem está aprendendo não entende os nomes que eles usam.Vou tentar reunir aqui alguns links e materiais para iniciantes. Quem sabe no futuro teremos coisa mais avançada.Seja bem-vindo.Aprenda Python!</summary><link rel='replies' type='application/atom+xml' href='http://aprenda-python.blogspot.com/feeds/1607990433509585178/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/vamos-aprender-juntos.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1607990433509585178'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2240031811551496628/posts/default/1607990433509585178'/><link rel='alternate' type='text/html' href='http://aprenda-python.blogspot.com/2008/10/vamos-aprender-juntos.html' title='Vamos aprender juntos'/><author><name>Vinicius Assef</name><uri>http://www.blogger.com/profile/02352153394258072317</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://4.bp.blogspot.com/-5QtDiIvts5A/TouQO1V7GgI/AAAAAAAAAE4/q_HiTjq9QZ0/s220/eu-im2.jpg'/></author><thr:total>0</thr:total></entry></feed>
