Naked Framework v0.1.27 Released

A new Naked release was pushed to PyPI and GitHub.  It includes extensive updates to the XDict dictionary extension & several updates to the NakedObject class.  These are classes in the Naked.toolshed.types and Naked.toolshed.c.types library modules.

XDict documentation is now available

NakedObject documentation was released last week and is current with the changes that were included in this release.


Naked Framework v0.1.26 Released

An update to the Naked Framework was released today. It includes updates to the Naked.toolshed.system and Naked.toolshed.c.system library modules and minor updates to the naked executable.

New system module documentation is now available with a large number of examples.

New Command Object Attributes

I added a number of new attributes to the Naked.commandline.Command object in the 0.1.20 push yesterday.  This included an attribute that provides a boolean value for the presence of options in the command string (obj.options) and for the presence of flags in the command string (obj.flags).

A table with the complete list of available attributes is now available in the docs.

Args | New naked Executable Command

A new args command is available for the naked executable that will help you design your application logic if you use the Naked command parser.  All parsed strings, truth testing for options, and string assignments for arguments to options and flags are displayed for any example command that you provide.

For example, use the command:

naked args 'testapp save somestring --unicode -s --name=file.txt'

and you get this:

----------- = testapp

Argument List Length
c.argc = 5

Argument List Items
c.argobj = ['save', 'somestring', '--unicode', '-s', '--name=file.txt']

Arguments by Zero Indexed Start Position
c.arg0 = save
c.arg1 = somestring
c.arg2 = --unicode
c.arg3 = -s
c.arg4 = --name=file.txt

Arguments by Named Position
c.first = save
c.second = somestring
c.third = --unicode
c.fourth = -s
c.fifth = --name=file.txt

Last Positional Argument
c.arglp = --name=file.txt
c.last = --name=file.txt

Primary & Secondary Commands
c.cmd = save
c.cmd2 = somestring

Option Exists Tests
c.option_exists() = True
c.options = True

Option Argument Assignment
c.arg("--unicode") = -s
c.arg("-s") = --name=file.txt

Flag Exists Tests
c.flag_exists() = True
c.flags = True

Flag Argument Assignment
c.flag_arg("--name") = file.txt

Details are available here.