Naked v0.1.31 was released with a minor bug fix to address an import error (Github issue).
You can upgrade your version with the command:
pip install --upgrade naked
Naked v0.1.31 was released with a minor bug fix to address an import error (Github issue).
You can upgrade your version with the command:
pip install --upgrade naked
I am working on updates to the XList class in the toolshed library this week. Hope to have these ready for release by the weekend (with documentation).
There is a new pyh
command in the naked executable that displays built-in Python module, class, method, and function help from the command line.
The documentation is available here.
helpy is a Python application that was built from the ground up with the Naked Framework. The source is available on PyPI or GitHub if you’d like to examine the structure of a Naked project that is developed with the naked make command.
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.
Complete XDict (Python dictionary extension type – operator overloads, object metadata, new dictionary methods for keys and values) documentation will be released with the update. http://docs.naked-py.com
Documentation is now available for the toolshed library NakedObject class.
The Naked.toolshed.shell.muterun_rb()
function allows you to execute a Ruby script from your Python code and control the standard output and standard error streams on the Python side. These data are returned as attributes of a generic object without a write to the terminal and can be accessed (along with the exit status code) using standard Python dot syntax.
The returned object’s attributes include:
Here’s an example of how a script named testscript.rb
could be executed and handled on the Python side of your code:
from Naked.toolshed.shell import muterun_rb
response = muterun_rb('testscript.rb')
if response.exitcode == 0:
# the command was successful, handle the standard output
standard_out = response.stdout
print(standard_out)
else:
# the command failed or the executable was not present, handle the standard error
standard_err = response.stderr
exit_code = response.exitcode
print('Exit Status ' + exit_code + ': ' + standard_err)
The utility of this approach is that you can manipulate the output or suppress it altogether from the calling code. If you simply intend to print it to the terminal, then use the execute_rb()
function in the same module. This allows the Ruby script to maintain control of the data that are displayed in the terminal.