[Tutor] Tutor Digest, Vol 96, Issue 8

Zafrullah Syed zafrullahmehdi at gmail.com
Sat Feb 4 14:29:51 CET 2012


Hi,

I need urgent help:

I am unable to commit code to svn, I am getting this warning:

*svn: Commit failed (details follow):*
*svn: Commit blocked by pre-commit hook (exit code 1) with output:*
*<string>:17: Warning: 'with' will become a reserved keyword in Python 2.6*
*writeConf.py:17: invalid syntax*
*Commited Python-Files refused, please check and retry...*

How do i surpass this and commit my code??

-- 
Regards,
Zafrullah Syed

On Sat, Feb 4, 2012 at 12:00 PM, <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
>        http://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: SEE THE QUESTION AT THE BOTTOM (Steve Willoughby)
>   2. factorial of anumber (Debashish Saha)
>   3. Re: Importing libraries (Blockheads Oi Oi)
>   4. Re: factorial of anumber (Blockheads Oi Oi)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 03 Feb 2012 21:53:03 -0800
> From: Steve Willoughby <steve at alchemy.com>
> To: tutor at python.org
> Subject: Re: [Tutor] SEE THE QUESTION AT THE BOTTOM
> Message-ID: <4F2CC7BF.1090905 at alchemy.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 03-Feb-12 21:38, Debashish Saha wrote:
> > BUT I COULD NOT UNDERSTAND HOW THE COMMAND ELSE CAN WORK,THOUGH IT IS IN
> > THE OUTSIDE OF THE FOR LOOP IN WHICH IF COMMAND LIES.
>
> The part that's confusing you is that it is not outside the for loop.
> It is PART of the for loop syntax.  The loop construct used is:
>
> for <variable> in <list>:
>        <list body>
> else:
>        <else body>
>
> This means you run <variable. through each element of <list>, executing
> <list body> once for each iteration, and a statement in that body may
> elect to break out of the loop prematurely.  If nothing breaks out of
> the loop (i.e., you exit the loop because the <list> was exhausted),
> then and only then execute <else body>.
>
> It's a handy mechanism to handle the case where the for loop failed to
> find whatever it was searching for.  Most other languages I've used
> don't have this, and you end up doing messier manual logic steps to
> accomplish the same thing.
>
> Tip:  Please don't type a message IN ALL CAPITAL LETTERS; it gives the
> impression you are shouting at your audience.
>
> HTH,
> HAND
>
> --
> Steve Willoughby / steve at alchemy.com
> "A ship in harbor is safe, but that is not what ships are built for."
> PGP Fingerprint 4615 3CCE 0F29 AE6C 8FF4 CA01 73FE 997A 765D 696C
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 4 Feb 2012 15:41:46 +0530
> From: Debashish Saha <silideba at gmail.com>
> To: tutor at python.org
> Subject: [Tutor] factorial of anumber
> Message-ID:
>        <CA+b=61C7KGs6GssOEMK6GACCHOJ5BhPvBduB0kUa23qAj3ZVxw at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> *PROGRAM TO FIND FACTORIAL OF A NUMBER(I HAVE WRITTEN IT ON GEDIT)*
> x=1
> n=input('enter a positive integer no:')
> for i in range(1,1+n):
>    x=x*i
> print x
>
>
> *ERROR:*
>
> enter a positive integer
>
> no:---------------------------------------------------------------------------
> EOFError                                  Traceback (most recent call last)
> C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
> execfile(fname, glob, loc)
>    166             else:
>    167                 filename = fname
> --> 168             exec compile(scripttext, filename, 'exec') in glob, loc
>    169     else:
>    170         def execfile(fname, *where):
>
> C:\Users\as\mnb.py in <module>()
>      1 x=1
> ----> 2 n=input('enter a positive integer no:')
>      3 for i in range(1,1+n):
>      4     x=x*i
>      5 print x
>
> EOFError: EOF when reading a line
>
> *QUESTION*:
> HOW TO ASK INPUT FROM USER THEN?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mail.python.org/pipermail/tutor/attachments/20120204/6b70ebd8/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Sat, 04 Feb 2012 10:18:07 +0000
> From: Blockheads Oi Oi <breamoreboy at yahoo.co.uk>
> To: tutor at python.org
> Subject: Re: [Tutor] Importing libraries
> Message-ID: <jgj0l5$mur$1 at dough.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 04/02/2012 05:37, Michael Lewis wrote:
> > Why don't I have to import str or list to access their attributes like I
> > do with the math or random or any other library?
> >
> > --
> > Michael J. Lewis
> > mjolewis at gmail.com <mailto:mjolewis at gmail.com>
> > 415.815.7257
> >
> >
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > To unsubscribe or change subscription options:
> > http://mail.python.org/mailman/listinfo/tutor
>
> They're built in to Python so...
>
> PythonWin 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit
> (Intel)] on win32.
> Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin'
> for further copyright information.
>  >>> dir()
> ['__builtins__', '__doc__', '__name__', '__package__', 'pywin']
>  >>> help(__builtins__)
> Help on built-in module __builtin__:
>
> NAME
>     __builtin__ - Built-in functions, exceptions, and other objects.
>
> FILE
>     (built-in)
>
> DESCRIPTION
>     Noteworthy: None is the `nil' object; Ellipsis represents `...' in
> slices.
>
> CLASSES
>     object
>         basestring
>             str
>             str
>             unicode
>         buffer
> etc.
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 04 Feb 2012 10:24:03 +0000
> From: Blockheads Oi Oi <breamoreboy at yahoo.co.uk>
> To: tutor at python.org
> Subject: Re: [Tutor] factorial of anumber
> Message-ID: <jgj104$pe7$1 at dough.gmane.org>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> On 04/02/2012 10:11, Debashish Saha wrote:
> > _PROGRAM TO FIND FACTORIAL OF A NUMBER(I HAVE WRITTEN IT ON GEDIT)_
> > x=1
> > n=input('enter a positive integer no:')
> > for i in range(1,1+n):
> >      x=x*i
> > print x
> >
> >
> > _ERROR:_
> >
> > enter a positive integer
> >
> no:---------------------------------------------------------------------------
> > EOFError                                  Traceback (most recent call
> last)
> > C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
> > execfile(fname, glob, loc)
> >      166             else:
> >      167                 filename = fname
> > --> 168             exec compile(scripttext, filename, 'exec') in glob,
> loc
> >      169     else:
> >      170         def execfile(fname, *where):
> >
> > C:\Users\as\mnb.py in <module>()
> >        1 x=1
> > ----> 2 n=input('enter a positive integer no:')
> >        3 for i in range(1,1+n):
> >        4     x=x*i
> >        5 print x
> >
> > EOFError: EOF when reading a line
> >
> > *QUESTION*:
> > HOW TO ASK INPUT FROM USER THEN?
> >
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > To unsubscribe or change subscription options:
> > http://mail.python.org/mailman/listinfo/tutor
>
> It works fine for me.
>
>  >>> enter a positive integer no:>>> 6
> 720
>
> And please DO NOT USE CAPITAL LETTERS or people may stop answering your
> questions.
>
> --
> Cheers.
>
> Mark Lawrence.
>
>
>
> ------------------------------
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
>
> End of Tutor Digest, Vol 96, Issue 8
> ************************************
>



-- 
Regards,
Zafrullah Syed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120204/b3e0bf0c/attachment-0001.html>


More information about the Tutor mailing list