<div dir="ltr">I'm especially interested in SOAP and XMLRPC, for now.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 11:24 AM,  <span dir="ltr"><<a href="mailto:tutor-request@python.org" target="_blank">tutor-request@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Tutor mailing list submissions to<br>
        <a href="mailto:tutor@python.org">tutor@python.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:tutor-request@python.org">tutor-request@python.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:tutor-owner@python.org">tutor-owner@python.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Tutor digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Web Services with python (Alan Gauld)<br>
   2. Re: Copy and paste python on Microsoft word (Alan Gauld)<br>
   3. Re: flask/sqlite3 problem - 'OperationalError: no such<br>
      table'? (Timo)<br>
   4. Re: flask/sqlite3 problem - 'OperationalError: no such<br>
      table'? (Alan Gauld)<br>
   5. Field Width (Jenny Allar)<br>
   6. How to add modules? (Naman Kothari)<br>
   7. Re: Field Width (Peter Otten)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 18 Sep 2013 17:55:34 +0100<br>
From: Alan Gauld <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Web Services with python<br>
Message-ID: <l1cltu$frq$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 18/09/13 10:05, Ismar Sehic wrote:<br>
> Hello, can someone point me to some good guality resources to learn Web<br>
> Services with Python?with some exaples, tutorials, exercises and such.<br>
<br>
<br>
Python can do web services just fine both as server or<br>
client. But what kind of web service?<br>
<br>
REST?<br>
SOAP?<br>
XMLRPC?<br>
AJAX?<br>
<br>
What do you want to do then we can point you in a<br>
useful direction.<br>
<br>
--<br>
Alan G<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a><br>
<a href="http://www.flickr.com/photos/alangauldphotos" target="_blank">http://www.flickr.com/photos/alangauldphotos</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 18 Sep 2013 17:57:58 +0100<br>
From: Alan Gauld <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Copy and paste python on Microsoft word<br>
Message-ID: <l1cm2e$frq$<a href="mailto:2@ger.gmane.org">2@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 18/09/13 05:59, Sammy Cornet wrote:<br>
> I'm using python 3.3.0, I have made a program on my<br>
> script and output it. I have tried several times to<br>
> copy and paste the output and the script on Microsoft word,<br>
<br>
How are you creating and running your script?<br>
I'm guessing this is an IDE issue rather than<br>
a python one, but we need to know what toolset<br>
you are using.<br>
<br>
How do you create the program? What tool do you<br>
use to write the code? How do you run the program?<br>
Where does the output appear?<br>
<br>
--<br>
Alan G<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a><br>
<a href="http://www.flickr.com/photos/alangauldphotos" target="_blank">http://www.flickr.com/photos/alangauldphotos</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Wed, 18 Sep 2013 19:13:10 +0200<br>
From: Timo <<a href="mailto:timomlists@gmail.com">timomlists@gmail.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] flask/sqlite3 problem - 'OperationalError: no<br>
        such    table'?<br>
Message-ID: <<a href="mailto:5239DF26.6070505@gmail.com">5239DF26.6070505@gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
Op 18-09-13 15:37, Alan Gauld schreef:<br>
> On 18/09/13 09:10, memilanuk wrote:<br>
><br>
><br>
>> def main():<br>
>>      g.db = connect_db()<br>
>>      cur = g.db.execute('SELECT * FROM posts')<br>
><br>
> You are trying to execute on the database rather<br>
> than on a cursor. You need to create a cursor<br>
> first to hold your results.<br>
><br>
> Something like;<br>
><br>
> cur = g.db.cursor()<br>
> cur.execute(.....)<br>
Not really.<br>
<br>
sqlite3.connect() returns a sqlite3.Connection object which has a<br>
execute method. It will create a cursor object for you.<br>
<br>
Cheers,<br>
Timo<br>
<br>
><br>
> HTH<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Wed, 18 Sep 2013 22:34:12 +0100<br>
From: Alan Gauld <<a href="mailto:alan.gauld@btinternet.com">alan.gauld@btinternet.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] flask/sqlite3 problem - 'OperationalError: no<br>
        such    table'?<br>
Message-ID: <l1d68b$rtm$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
On 18/09/13 18:13, Timo wrote:<br>
<br>
>> You are trying to execute on the database rather<br>
>> than on a cursor. You need to create a cursor<br>
>> first to hold your results.<br>
>><br>
>> Something like;<br>
>><br>
>> cur = g.db.cursor()<br>
>> cur.execute(.....)<br>
> Not really.<br>
><br>
> sqlite3.connect() returns a sqlite3.Connection object which has a<br>
> execute method. It will create a cursor object for you.<br>
<br>
Interesting.<br>
I didn't know that, I've always created a separate cursor<br>
explicitly. But that's probably because I'm used to<br>
Oracle which requires me to do that from C++<br>
<br>
<br>
--<br>
Alan G<br>
Author of the Learn to Program web site<br>
<a href="http://www.alan-g.me.uk/" target="_blank">http://www.alan-g.me.uk/</a><br>
<a href="http://www.flickr.com/photos/alangauldphotos" target="_blank">http://www.flickr.com/photos/alangauldphotos</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Wed, 18 Sep 2013 12:50:51 -0400<br>
From: Jenny Allar <<a href="mailto:jennyallar@gmail.com">jennyallar@gmail.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: [Tutor] Field Width<br>
Message-ID:<br>
        <<a href="mailto:CADXZeCYO94G9JDzkYwad6azM%2B_cKKZp67ZP1_Rq7oB78ObRcfA@mail.gmail.com">CADXZeCYO94G9JDzkYwad6azM+_cKKZp67ZP1_Rq7oB78ObRcfA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I'm only a few days in to learning Python, so please bear with me.<br>
<br>
I need to line up the decimals on the printed information but I cannot get<br>
the text to look uniform at all.<br>
<br>
<br>
Here is my code:<br>
<br>
def main():<br>
<br>
    # Set up constants for cost per yard, flat fee, and tax rate<br>
    cost_carpet = 5.50<br>
    fee = 25<br>
    tax = .06<br>
<br>
    # Ask for yards needed<br>
    yards_needed = float(input('Please enter the total number of yards<br>
needed '))<br>
<br>
    # Calculate subtotal<br>
    subtotal = yards_needed * cost_carpet + fee<br>
<br>
    # Calculate tax_rate<br>
    tax_rate = subtotal * tax<br>
<br>
    # Calculate total_due<br>
    total_due = subtotal + tax_rate<br>
<br>
     # Print blank line<br>
    print()<br>
<br>
    # Print infomation<br>
    print("The cost of the carpet is $", format(subtotal,'9,.2f'))<br>
    print("The flat fee is $", format(fee,'9,.2f'))<br>
    print("The tax is $", format(tax_rate,'9,.2f'))<br>
    print("The total due is $", format(total_due,'9,.2f'))<br>
<br>
<br>
main ()<br>
<br>
<br>
<br>
<br>
Thank you in advance,<br>
Jenny<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/tutor/attachments/20130918/4bcabc75/attachment-0001.html" target="_blank">http://mail.python.org/pipermail/tutor/attachments/20130918/4bcabc75/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Thu, 19 Sep 2013 15:59:40 +0800 (SGT)<br>
From: Naman Kothari <<a href="mailto:kotharinaman@yahoo.in">kotharinaman@yahoo.in</a>><br>
To: "<a href="mailto:tutor@python.org">tutor@python.org</a>" <<a href="mailto:tutor@python.org">tutor@python.org</a>><br>
Subject: [Tutor] How to add modules?<br>
Message-ID:<br>
        <<a href="mailto:1379577580.55612.YahooMailNeo@web193805.mail.sg3.yahoo.com">1379577580.55612.YahooMailNeo@web193805.mail.sg3.yahoo.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Can you please suggest a link from where i can download SendKeys module for python. Also provide an explanation to add the module to my library.<br>
PS: I am a Windows user.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mail.python.org/pipermail/tutor/attachments/20130919/d48e158e/attachment-0001.html" target="_blank">http://mail.python.org/pipermail/tutor/attachments/20130919/d48e158e/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Thu, 19 Sep 2013 11:24:20 +0200<br>
From: Peter Otten <__<a href="mailto:peter__@web.de">peter__@web.de</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: Re: [Tutor] Field Width<br>
Message-ID: <l1efr1$reh$<a href="mailto:1@ger.gmane.org">1@ger.gmane.org</a>><br>
Content-Type: text/plain; charset="ISO-8859-1"<br>
<br>
Jenny Allar wrote:<br>
<br>
> I'm only a few days in to learning Python, so please bear with me.<br>
<br>
Welcome!<br>
<br>
> I need to line up the decimals on the printed information but I cannot get<br>
> the text to look uniform at all.<br>
<br>
>     print("The cost of the carpet is $", format(subtotal,'9,.2f'))<br>
>     print("The flat fee is $", format(fee,'9,.2f'))<br>
<br>
Just add some spaces manually:<br>
<br>
     print("The cost of the carpet is $", format(subtotal,'9,.2f'))<br>
     print("The flat fee is           $", format(fee,'9,.2f'))<br>
<br>
This is usually written as<br>
<br>
    print("The cost of the carpet is $ {:9,.2f}".format(subtotal))<br>
    print("The flat fee is           $ {:9,.2f}".format(fee))<br>
<br>
If this is not what you want you need to give more details; for instance:<br>
the above won't look "uniform" when it is displayed in a proportional font.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Tutor maillist  -  <a href="mailto:Tutor@python.org">Tutor@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/tutor" target="_blank">https://mail.python.org/mailman/listinfo/tutor</a><br>
<br>
<br>
------------------------------<br>
<br>
End of Tutor Digest, Vol 115, Issue 35<br>
**************************************<br>
</blockquote></div><br></div>