Marshalling Python Data into Javascript 1.0 Python script

SPONSORED LINKS

    Specification

  • Version: 1.0
  • File size: 0 KB
  • File name: index_txt
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Python
  • Price:Freeware
  • Company: Jacob Smullyan (View more)

Marshalling Python Data into Javascript 1.0 script description:




Publisher review:
Marshalling Python Data into Javascript code creates a function, to_js, that marshals Python data into a Javascript string. Marshalling Python Data into Javascript code creates a function, to_js, that marshals Python data into a Javascript string.&lython data into a ;The to_js function supports Python integers, floats, mx.DateTime dates (if mx.DateTime can be imported), strings, None, sequences, and dictionaries.

It will complain loudly if you try to pass another type. The reliance on type rather than interface is rather unfortunate, in that Python classes that emulate the behavior of the builtin containers may not be their subclasses; with some database drivers, for instance, the result set returned for a row behaves a bit like a list and a bit like a dictionary, but is an instance of neither.

To marshal such an object with this code, you have to cast it first. The script could conceivably be refined by replacing the type checks for those containers with some other heuristic for determining whether an object is "close enough" to a list/tuple/dict.
Marshalling Python Data into Javascript 1.0 is a Python script for Internet, Browsers and Tools scripts design by Jacob Smullyan. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.

Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Latest script and internet news

222

222

22

Posted on: 18 Jul 2023 22:27 by A. Brown

111

111

111

Posted on: 18 Jul 2023 22:24 by A. Brown

The permanently active Push system offered by the new Google Chrome 42

The permanently active Push system offered by the new Google Chrome 42

Hacked By !Sc-sT

Posted on: 17 Mar 2015 07:57 by A. Brown

SPREAD THE WORD

User Rating


Rating: 2.2 out of 5
Based on 13 ratings. 13 user reviews.

  • Currently 2.15 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5