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.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.
An update to the Naked Framework was released today. It includes updates to the
Naked.toolshed.c.system library modules and minor updates to the
New system module documentation is now available with a large number of examples.
The Naked toolshed system library documentation is in the works and will be released this week. http://docs.naked-py.com
I am running tests on current
toolshed.shell functions and updating the module with several new functions. These functions will allow you to run shell commands (including dedicated functions for Ruby and Node.js scripts) and choose to either have the standard output stream from the executable returned to your Python script or displayed in the terminal. Standard error stream and exit status code handling will be included with options to suppress the display of the standard output in the terminal as well as the system exit call if you’d like to handle this on your end.
I am working on the documentation for this module as I finish the testing. I will publish it with the next release which will include these new shell features (and the shell Environment class which I am not changing for this release).
A bug fix update was pushed to PyPI. This included a fix for the
naked args bug. No new features in this release.
There is a bug in the
naked args command that causes it to inappropriately parse your example command statement when you include quotes and escaped values. This does not apply to the command line parser itself. A fix is coming in the next release.
To determine the version of the Python interpreter that is being used with your script, create an instance of the Naked StateObject:
from Naked.toolshed.state import StateObject
state = StateObject()
and then test for the version with StateObject attributes:
Test for Python 2 vs. Python 3
# Python 2 code
# Python 3 code
Test Full Python Versions
if state.py_major == 2 and state.py_minor == 7 and state.py_patch == 6:
# Python 2.7.6 interpreter
elif state.py_major == 3 and state.py_minor == 3 and state.py_patch == 3:
# Python 3.3.3 interpreter