Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
HTMLPad 2018 15.5
WeBuilder 2018 15.5
SentiMask SDK Trial 2.0.0
Track Order For Magento 2 1.0.0
Calendar 365 For Dynamics CRM 4.0
Scimbo 1.2
Odoo Furnito Theme 1.0
.Net Assemblies/WSDL Import Utility for Delphi 6.0.4.0
Devart Excel Add-in for Zendesk 1.7
Excel Add-in for Marketo 1.7
GetOrgChart 2.5.3
AnyGantt JS Gantt Charts 8.6.0
AnyChart JS Charts and Dashboards 8.6.0
Multi Vendor Ecommerce Script & Apps 4.0
Magento 2 Inventory Management Extension 1.0
Top Code
jQuery Slider Ken Burns 1.0
ActivePerl 5.8.4.810/5.6.1.638
Porter Stemming Algorithm 1.I
The Karma Language 1.0
MCU 8051 IDE 1.4.7
jQuery Accordion Photo Gallery 1.0
Guest Book V. 2 V2
Flash T-Shirt Designer 3.0
Myanmar Unicode Conversion Help 1.0
Html Goodies
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Space Impact 0.4.15
Tabitha 1.0
Simple Web Content Management System for Scripts 1.1
Free Spire.PDF for .NET 2.9.37
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
Size of Python objects (revised) .
File ID: 65395






Size of Python objects (revised) .
Download Size of Python objects (revised) .http://code.activestate.com/recipes/577191-ip-and-mac-addresses/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 5
Submit Rating:
Size of Python objects (revised) . Description
Description: This recipe is an enhancement of recipe #544288 to determine the size of Python objects in bytes, The main differences are (1) classes and instances are handled separately, (2) old-style classes are treated as new-style ones, (3) a simple profile of the objects can be printed, and (4) 8 functions plus 1 class are exposed by this module. More information can be found in the documentation and the examples.

Version 5.0+ of this recipe includes several major enhancements including some tests to compare the result of functions flatsize and sys.getsizeof on Python 2.6 or 3.0. See command line option -test.

License: Freeware

Related: Memory, sizeof

O/S:Windows

Downloads: 5



More Similar Code

Python Minifier: Reduces the size of Python code for use on embedded platforms. Performs the following:


Removes docstrings.
Removes comments.
Removes blank lines.
Minimizes code indentation.
Joins multiline pairs of parentheses, braces, and brackets (and removes extraneous whitespace within).
Preserves shebangs and encoding info (e.g. "# -- coding: utf-8 --")
NEW: Optionally, produces...



littletable is a lightweight in-memory data manager of collections of Python objects, providing ORM-like access for querying and joining data using object attributes as pseudo-columns.



pyGTM is a package of python, C and mumps which enables a python module to provide interactive storage retrieval and query of python objects in GT.M (mumps) globals.



DMO stands for "Database of Managed Objects." This is a tool for documenting all objects within a data center.

It provides an object-based overlay on a MySQL database, with a Web-based interface, which allows new objects to be...



DMO stands for "Database of Managed Objects." This is a tool for documenting all objects within a data center.

It provides an object-based overlay on a MySQL database, with a Web-based interface, which allows new objects to be...



Show The Size Of A Directory Using ASP is an online article explaining ASP beginners and programmers to use FileSystemObject function of ASP in finding the file sizes. The author has also given some notes on the above topic along with the code...



This is a very simple script aimed at improving the readability of plots.
Given a figure handle, this script searches for all nested objects, and sets the line-width and text-size of all objects to the desired one.
Its very handy to set...



This is a simple interface to a collection of classes which serialize Python objects to XML and back.

This is one part of a trio of recipes:


Simple API
XML2Py De-serialization
Py2XML Serialization



I often return result sets from a database call using a list of dictionary objects. When transmitting the pickled list object over the wire, the size of the pickle greatly effects the speed of the transmission.

I wrote this small class...



This module saves and reloads compressed representations of generic Python
objects to and from the disk.

User Review for Size of Python objects (revised)
- required fields
     

Please enter text on the image