Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Python-printr 0.2

    Download button

    No screenshots available
    Downloads: 55  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Eugenia Bahit | More programs
    GPL v3 / FREE
    September 23rd, 2012, 22:56 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Python-printr description

    Emulates the print_r() PHP function

    Python-printr is a Python module that allows you to emulate PHP's print_r() function by printing the internal structure and objects properties of a class instance.

    Example:

    # -*- coding: utf-8 -*-


    class Vidrio(object):

     def __init__(self):
     self.color = ''
     
     
    class Marco(object):

     def __init__(self):
     self.color = ''
     self.material = ''
     self.vidrio = Vidrio()


    class Ventana(object):
     
     def __init__(self):
     self.posicion = ''
     self.marco = Marco()


    from printr import printr
    ventana = Ventana()
    printr(ventana)


    Returns:

    < Ventana object >
     {
     posicion: ''
     marco: < Marco object >
     {
     color: ''
     vidrio: < Vidrio object >
     {
     color: ''
     }
     material: ''
     }
     }



    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    print_r() emulator | print_r() function | Python library | Python | print_r() | function

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM