Re: I wrote a free book about TDD and clean architecture in Python

2019-03-21 Thread Leonardo Giordani
eople who never faced such a task. Enjoy! On Thursday, 21 March 2019 11:17:11 UTC, Leonardo Giordani wrote: > Akkana, yes that is a good idea, even though I expected the LeanPub output to > be already the correct one. I'll check with them. > > Thanks for reading the book, you ac

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-21 Thread Leonardo Giordani
post on it, with a practical example, and this might be interesting. Many people discover TDD after they already wrote some code. Thanks On Thursday, 21 March 2019 01:15:40 UTC, Akkana Peck wrote: > > On 20/03/19 7:18 AM, Leonardo Giordani wrote: > > > Ha ha ha, yes I get it

Re: I wrote a free book about TDD and clean architecture in Python

2019-03-19 Thread Leonardo Giordani
Ha ha ha, yes I get it! =) I'm sorry, that depends entirely on the LeanPub processing chain (I believe, I'll have a look just to be sure). I hope the book will be useful even with this little issue. Thanks for reading it! -- https://mail.python.org/mailman/listinfo/python-list

I wrote a free book about TDD and clean architecture in Python

2019-03-18 Thread giordani . leonardo
Hi all, I published on Leanpub a free book, "Clean Architectures in Python". It's a humble attempt to organise and expand some posts I published on my blog in the last years. You can find it here: https://leanpub.com/clean-architectures-in-python The main content is divided in two parts, this

Gpg python installer

2015-04-01 Thread leonardo davinci
I am using Kleopatra(gpg for win) to verify the 3.4.3 python installer, Windows x86 MSI >https://www.python.org/ftp/python/3.4.3/python-3.4.3.msi> www.python.org /ftp/python/3.4.3/

Re: PyPI, reStructuredText and readthedocs problems

2015-03-02 Thread Leonardo Giordani
equirements = list() if on_rtd: requirements.append('tornado') requirements.append('twisted') requirements.append('pyev') I contacted Gavin Roy, the pika maintainer, to check this with him. Thanks Leonardo Giordani @tw_lgiordani <http://twitter.com/tw_lgi

Re: PyPI, reStructuredText and readthedocs problems

2015-03-02 Thread Leonardo Giordani
just changed one of the headers and the problem is gone. [Thread with Wolfgang] On 03/02/2015 12:11 PM, Leonardo Giordani wrote: > Thanks, spotted! > > Now readthedocs fails with this message > > Traceback (most recent call last): >File "/home/docs/checkouts/ > read

PyPI, reStructuredText and readthedocs problems

2015-03-02 Thread Leonardo Giordani
ng out what's wrong in my code? Thanks! Leo Leonardo Giordani @tw_lgiordani <http://twitter.com/tw_lgiordani> - lgiordani.com My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page <https://github.com/lgiordani> -- https://mail.python.org/mailman/listinfo/python-list

Short syntax for try/pass

2014-10-14 Thread Leonardo Giordani
case. Otherwise, what do you think about it? Thank you Leonardo Leonardo Giordani @tw_lgiordani <http://twitter.com/tw_lgiordani> - lgiordani.com My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page <https://github.com/lgiordani> -- https://mail.

New to Python. For in loops curiosity

2014-05-13 Thread Leonardo Petry
Hi All, So I am starting with python and I have been working on some simple exercises. Here is something I found curious about python loops This loop run each character in a string def avoids(word,letters): flag = True for letter in letters: if(letter in word):

Re: [Python-Help] learning python

2013-05-05 Thread leonardo selmi
thanks! Il giorno 05/mag/2013, alle ore 18:58, Eric Brunson ha scritto: > On 05/05/2013 10:08 AM, leonardo selmi wrote: >> hi guys >> >> i need to find a good book to learn python with exercises and solutions, any >> suggestions? >> >> thanks! &g

learning python

2013-05-05 Thread leonardo selmi
hi guys i need to find a good book to learn python with exercises and solutions, any suggestions? thanks! best regards leonardo-- http://mail.python.org/mailman/listinfo/python-list

Re: help..

2013-05-02 Thread leonardo
thanks@all Il giorno 02/mag/2013, alle ore 16:30, Robert Kern ha scritto: > On 2013-05-02 15:20, leonardo wrote: >> on codecademy there is an interactive box where you type your code, it is a >> kind of exercise program to practice. but i don't understand what is wr

help to code...

2013-05-02 Thread leonardo selmi
dear python community, i wrote the following program: from datetime import datetime now = datetime.now() current_month = now.month current_day = now.day current_year = now.year current_hour = now.hour current_minute = now.minute current_second = now.second print str(current_month) + '/' + str(cur

Re: help..

2013-05-02 Thread leonardo
um_id=4f89dab3d78889000396 Il giorno 02/mag/2013, alle ore 16:06, Chris Angelico ha scritto: > On Thu, May 2, 2013 at 11:56 PM, leonardo selmi wrote: >> so i wrote the following code: >> def rental_car_cost(days): >>cost = 40*days >>if days >

help..

2013-05-02 Thread leonardo selmi
i have also this program: write a function called rental_car_costthat takes days as input and returns the cost for renting a car for said number of days. The cost must abide by the following conditions: Every day you rent the car is $40. If you rent the car for 3 or more days, you get $20 off yo

Re: help needed

2013-04-09 Thread leonardo
thanks i did it! Il giorno 08/apr/2013, alle ore 13:56, rusi ha scritto: > On Apr 8, 4:41 pm, Dave Angel wrote: > >> Go back to the previous message and you'll see Adam tells you exactly >> what to type at the terminal. But to be more literal: >> >> python ex13.py first 2nd 3rd > > > fo

Re: help needed

2013-04-08 Thread leonardo
thanks adam, but it is not clear to me yet. if i open the terminal how do i work on it? what should i type in? thanks Il giorno 08/apr/2013, alle ore 11:25, Adam Mesha ha scritto: > On Mon, Apr 8, 2013 at 11:01 AM, leonardo selmi wrote: > then i get this error: > > Traceback

Re: help needed

2013-04-08 Thread leonardo
thanks barrett, but i am using a mac.. Il 08/04/2013 11.15, Barrett Lewis ha scritto: Do you happen to be on windows? Because if you are then you need to edit the registry. If you are on windows let me know and I will walk you through the fix, but if not then it would be a waste of time for

help needed

2013-04-08 Thread leonardo selmi
t;, second print "Your third variable is:", third then i get this error: Traceback (most recent call last): File "/Users/leonardo/Documents/ex13.py", line 3, in script, first, second, third = argv ValueError: need more than 1 value to unpack in the book the author say

problem with sys import argv

2013-03-26 Thread leonardo selmi
hi python community, i wrote the following programm: from sys import argv script, userName = argv prompt = '> ' print 'hi %s, i am the %s script' % (userName, script) print "i'd like to ask you a few questions." print 'do you like me %s' % userName likes = raw_input(prompt) print "where do you

i need advice

2013-03-24 Thread leonardo selmi
suggestions. for example i have "think python" and "learning python the hard way", do you recommend them or are there better books? thanks a lot and sorry for bugging you best regards leonardo -- http://mail.python.org/mailman/listinfo/python-list

i need advice

2013-03-24 Thread leonardo selmi
suggestions. for example i have "think python" and "learning python the hard way", do you recommend them or are there better books? thanks a lot and sorry for bugging you best regards leonardo -- http://mail.python.org/mailman/listinfo/python-list

Re: how does the % work?

2013-03-23 Thread leonardo
thank you all! Il 23/03/2013 8.38, Steven D'Aprano ha scritto: On Fri, 22 Mar 2013 21:29:48 -0700, Tim Roberts wrote: leonardo selmi wrote: i wrote this example : name = raw_input("What is your name?") quest = raw_input("What is your quest?") color = raw_input(&qu

how does the % work?

2013-03-22 Thread leonardo selmi
t;"" % (name, quest, color) but i get this error: Traceback (most recent call last): File "/Users/leonardo/print.py", line 5, in favourite color is %s.''') % (name, quest, color) TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple' how can i solve it? thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: problem with function

2013-03-22 Thread leonardo
thank you all Il giorno 22/mar/2013, alle ore 00:20, Terry Reedy ha scritto: > On 3/21/2013 2:31 PM, leonardo selmi wrote: > >> i wrote the following code: >> >> def find(word, letter): >> index = 0 >> while index < len(wor

problem with function

2013-03-21 Thread leonardo selmi
hi all, i wrote the following code: def find(word, letter): index = 0 while index < len(word): if word[index] == letter: return index index = index + 1 return -1 if i run the program i get this error: name 'word' is not defined. how can i solve it? than

programming course

2013-03-12 Thread leonardo
#x27;t work > Data: 12 marzo 2013 17:52:12 CET > A: python-list@python.org > > In article <513f5080.6030...@libero.it>, > leonardo wrote: >> first of all thanks for trying to help me. the text of my email was the >> following: >> i have a mac os x 10.8, i h

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
thanks now python shell works Il 12/03/2013 17.52, Ned Deily ha scritto: In article <513f5080.6030...@libero.it>, leonardo wrote: first of all thanks for trying to help me. the text of my email was the following: i have a mac os x 10.8, i had already python 2.7, i downloaded pyth

Re: [Python-Help] idle doesn't work

2013-03-12 Thread leonardo
help! Il 12/03/2013 0.20, Matthew Dixon Cowles ha scritto: Dear Leonardo, I only got two copies of that message. We're going in the right direction. that answer didn't help me.. Did it not work to run IDLE in a terminal window with the "-n" argument? Or are you having

Fwd: Re: [Python-Help] idle doesn't work

2013-03-11 Thread leonardo
sorry for that, that answer didn't help me.. regards Il 10/03/2013 23.59, Matthew Dixon Cowles ha scritto: Dear Leonardo, Sending the same message three times isn't likely to produce faster or better help. Is the reply that you got on the main Python list satisfactory

idle (GUI)doesn't work…

2013-03-10 Thread leonardo
>>> hi guys >>> i need help: >>> i have a mac os x 10.8, i had already python 2.7, i downloaded python >>> 3.3 and active tcl 8.5, but idle and the new version don't work, the >>> answer is:"idle's subprocess didn't make connection or personal firewall >>> is blocking" plus in the terminal i sti

idle doesn't work

2013-03-10 Thread leonardo
>> hi guys >> >> i have a mac os x 10.8, i had already python 2.7, i downloaded python >> 3.3 and active tcl 8.5, but idle and the new version don't work, the >> answer is:"idle's subprocess didn't make connection or personal firewall >> is blocking". do you know what can i do ? thanks and re

idle doesn't work

2013-03-10 Thread leonardo
hi guys i have a mac os x 10.8, i had already python 2.7, i downloaded python 3.3 and active tcl 8.5, but idle and the new version don't work, the answer is:"idle's subprocess didn't make connection or personal firewall is blocking". do you know what can i do ? or can i use other easy editors

book advice

2013-03-01 Thread leonardo selmi
hi is there anyone can suggest me a good book to learn python? i read many but there is always something unclear or examples which give me errors. how can I start building a sound educational background thanks for any help best regards -- http://mail.python.org/mailman/listinfo/python-list

need for help

2013-03-01 Thread leonardo selmi
ball!' return msg myball = ball('red', 'small', 'down') print my ball BUT I GOT THIS ERROR: Traceback (most recent call last): File "/Users/leonardo/Documents/ball2.py", line 11, in myball = ball('red', 'small', &#

Re: nested loops

2013-02-26 Thread leonardo
thanks for the help, it works Il 26/02/2013 10.58, Sven ha scritto: Here's one solution import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): ||print i, print "*" * i time.sleep(1) print 'blast off!'

nested loops

2013-02-26 Thread leonardo
hi everyone, i have the following program: import time count_timer = int(raw_input('how many seconds?: ')) for i in range(count_timer, 0, -1): print i time.sleep(1) print 'blast off!' this is the result: how many seconds?: 5 5 4 3 2 1 blast off! how can i have it print a row of star

Re: i need help

2013-02-21 Thread leonardo
thanks, problem solved Il 21/02/2013 10.13, Chris Angelico ha scritto: On Thu, Feb 21, 2013 at 8:09 PM, leonardo wrote: hi guys, i just created this file: print "i love pizza!" print "pizza" * 20 print "yum" * 40 print "i'm full." and saved it

i need help

2013-02-21 Thread leonardo
hi guys, i just created this file: print "i love pizza!" print "pizza" * 20 print "yum" * 40 print "i'm full." and saved it into a file with "idle-gui", if i try to run the program i get an invalid syntax error, it displays a red sign on the quote mark at the end of the first row of my progr

Re: request for help

2013-02-18 Thread leonardo
thanks guys and sorry for my incomplete datas, here is the error message: Traceback (most recent call last): File "", line 1, in import circle File "circle.py", line 1 Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) ^ SyntaxError: invalid syntax thanks for any hel

request for help

2013-02-18 Thread leonardo selmi
pls i need help: i have copied the following from a book and tried to make it work: import math def area(radius): return math.pi * radius**2 def circumference(radius): return 2 * math.pi * radius i saved the above program from python shell into a file as "circle.py" . when i type "import circ

request of information

2013-02-17 Thread leonardo selmi
> > > > >> gentlemen: >> >> i am reading a book about python and now i am blocked, i can't store >> functions in modules: i have a mac and am using version 2.7.3, i have >> created a function and want to save it as a file using "idle", i have saved >> it with .py , when i try to import th

[OFF] Convert GMap Encoded Polyline string to a set of coordinates

2012-11-17 Thread leonardo
Hi, How to convert GMap Encoded Polyline string to a set of coordinates ? I need it to calculate the distance between a coordinate and a line in a Django app. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

if statement on lenght of a list

2011-05-17 Thread Joe Leonardo
print 'YAY!' If I pass: breakLine([]) I get: YAY! I expect: You must pass a list that contains 19 fields. If I print len(value) I get: 0 What is going on here? Thanks! [cid:image001.png@01CC148A.3C0C1950] Joe Leonardo | Business Intelligence Analyst | DataLogix<h

Re: About Python execution speed

2010-04-12 Thread Leonardo Giordani
Thank you Chris and Stefan, this was the answer I was looking for. Leonardo Giordani -- http://mail.python.org/mailman/listinfo/python-list

About Python execution speed

2010-04-12 Thread Leonardo Giordani
ution) If I move the whole code into a function and call this latter the execution time drops to about 45 seconds. What is the reason of this improvement? Thank you very much in advance. Leonardo Giordani -- http://mail.python.org/mailman/listinfo/python-list

xml.dom.minidom getElementsByTagName white space issue

2009-04-07 Thread Leonardo lozanne
Hi,   I'm getting some XML tags with white spaces from a web service and when I try to get them with the getElements ByTagName I'm not able to do so. I'm getting an empty list. What I'm doing is:   #XML_response is an xml string xml_msg = xml.dom.minidom.parseString(XML_response)   nodes = xml_ms

Re: How to align the text of a Listbox to the right

2006-04-28 Thread Leonardo da Vinci
Sori Schwimmer ha scritto: > For a listbox, I would give a width and go with string > formatting. In your case, I guess that what I'll do is > to limit the width to something acceptable, and show > only the tail of the line. Yes, this is exactly what I wanted to do. Do you know a way to accomplis

Re: How to align the text of a Listbox to the right

2006-04-27 Thread Leonardo da Vinci
I have to use a Listbox that shows a list of entries. Every entry is a char string quite long in size and I cannot set "width" to a large value due to limitations of screen resolution. The rightmost part is more important, so I thought that I could show only the end of the string by aligning the fi

How to align the text of a Listbox to the right

2006-04-27 Thread Leonardo da Vinci
Greetings gentlemen and ladies, I have a question: in Tkinter, how to align a Listbox entry (i.e. a line of text) to the right? Google did not show up the answer to my request. Thanks very much. L -- http://mail.python.org/mailman/listinfo/python-list

Re: A little request about spam

2005-04-14 Thread César Leonardo Blum Silveira
Yeah that is happening to me too! Almost all my python-list e-mails go to the Spam box. Maybe we should contact the gmail admins? On 4/14/05, mark hellewell <[EMAIL PROTECTED]> wrote: > On 4/14/05, James <[EMAIL PROTECTED]> wrote: > > Yes - it's been like that for the last month or so now and it

Re: How to detect if file is a directory

2005-04-09 Thread César Leonardo Blum Silveira
Thanks :-) On Apr 9, 2005 3:55 PM, Tim Jarman <[EMAIL PROTECTED]> wrote: > César Leonardo Blum Silveira wrote: > > > Hello all, I'm new to this list. > > > > How can I detect if a file is a directory or not? > > > > Thanks > > > > César

How to detect if file is a directory

2005-04-09 Thread César Leonardo Blum Silveira
Hello all, I'm new to this list. How can I detect if a file is a directory or not? Thanks César -- http://mail.python.org/mailman/listinfo/python-list