Skip to content
murmot

Results for “python while loop string example code error 2 4 site:wiki.python.org 3”

  • wiki.python.org

    HowToEditPythonCode

    The with statement (from Python 2.5), which encloses a code block within a context manager (for example, acquiring a lock before the block of code is run, and releasing the lock afterward).

  • wiki.python.org

    Simple Programs - Python Wiki

    Simple Programs¶ · 1 line: Output. print ('Hello, world! · 2 lines: Input, assignment · 3 lines: For loop, built-in enumerate function · 4 lines: Fibonacci, tuple ...

  • wiki.python.org

    How to Edit Python Code - Python Wiki

    Multiple string-formatting operations are supported. The original % operator provided behavior analogous to printf format strings in C, e.g. foo=%s bar=%d" % ("blah", 2) evaluates to foo=blah bar=2. String templates were introduced in Python 2.4.

  • wiki.python.org

    For Loop - Python Wiki

    ... code forever. For example: For loop from 0 to 2, therefore running 3 times. for x in range(0, 3): print("We're on time %d" % (x)). While loop from 1 to ...

  • wiki.python.org

    Handling Exceptions - Python Wiki

    ... code: 1 import sys 2 3 try: 4 untrusted.execute() 5 except: # catch *all* exceptions 6 e = sys.exc_info()[0] 7 write_to_page("<p>Error: %s</p>" % e).

  • wiki.python.org

    HandlingExceptions

    MoinMoin software is a good example of where general error catching is good. If you write MoinMoin extension macros, and trigger an error, MoinMoin will give you a detailed report of your error and the chain of events leading up to it.

  • wiki.python.org

    Python Debugging Tools

    pure Python module, in the Python standard library. pptop. Remote process inspector/profiler for Python 2/3. Uses GDB to inject code. pyspy. Easy to use ...

  • wiki.python.org

    Core Dev Helper Tools - Python Wiki

    Ideas for Roundup extensions: Integrate Mercurial and other important DVCSs in Roundup based on roundup-svn. OAuth-based API. OpenID authentication support.