Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install jpath

How to install jpath

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install jpath
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.0 Failed View build log
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
Windows (64-bit)
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.0 Failed View build log
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
Mac OS X (10.5+)
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.0 Failed View build log
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
Linux (32-bit)
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.0 Failed View build log
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
Linux (64-bit)
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.0 Failed View build log
1.2
1.5Never BuiltWhy not?
1.2 Available View build log
1.1 Available View build log
1.5 Available View build log
1.2 Available View build log
 
Imports
Lastest release
version 1.5 on Sep 20th, 2013

Access nested dicts and lists using JSON-like path notation.

Note that this code is written for python 3.

The notation is as follows:

You can just write the names of components in your path like you would in javascript:

foo.bar.baz

To access arrays or names with spaces in them, use the '[]' notation. You can use negative indices with arrays to count from the end.

["foo"]["bar"]["baz"] array[-1].attr [3]

You can use the wildcard character '*' to iterate over all elements:

foo.*.baz ["foo"][*]["baz"]

This may return more or less than a single element. Use get to get the first one, and get_all to get a list of all possibilities. If you want to skip any number of elements in path, use two dots '..':

foo..baz

You can slice the arrays just like in python:

array[1:-1:2]

Finally, you can filter the elements:

foo(bar.baz=true) foo.bar(baz>0).baz foo(bar="yawn").bar

At the moment only =, >, <, >=, <= and != operators are available, and you can only use them with strings, integers and boolean values.

This code was written in STX Next.

Subscribe to package updates

Last updated Sep 20th, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.