[Tutor] Tutor Digest, Vol 115, Issue 35

Ismar Sehic i.sheeha at gmail.com
Thu Sep 19 14:21:51 CEST 2013


also, i would like to know more about XML - what is the best way to parse
it, and send soap calls for xml methods.i've used lxml to modify some xml
files which i need to send to a server, as a request.what is the logic
behind that?how can i do that with, for example, suds python library?


On Thu, Sep 19, 2013 at 1:43 PM, Ismar Sehic <i.sheeha at gmail.com> wrote:

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


More information about the Tutor mailing list