Hi, kbrazil.
Thanks for the code. I installed it, tried it out, and it worked as expected.
For your next rev, I suggest:
So that jc -- "du" would run the du command from within python without me needing to specify du (or any other command for which you have a parser) twice
I've done that with perl a few times, but I don't know enough about python to say any more about it on that language platform ... cheers, drl
Hi DRL,
You can now use this style of synax with the latest version of jc!
Hi All,
I have a output like below values
val1=test.com
val2=10.26.208.11
val3=en1
val4=test-priv1.com
val5=192.168.3.4
val6=en2
val7=test-priv2.com
val8=192.168.4.4
val9=en3
val10=test-vip.com
val11=10.26.208.9
val12=$val3
I want to convet this output values into below... (1 Reply)
Friends,
I am trying to convert my local server timezone EST to UTC and for which I used the TZ command, see below
$ date
Thu Dec 6 10:14:14 EST 2012
$
$ TZ=UTC date -d '10:14 EST'
Thu Dec 6 15:14:00 UTC 2012
Now I would like to have the same output in 'yyyymmdd hh:mm' format.
... (4 Replies)
Hello Experts,
Below is the record i have:
sample data attached
I want this record of each row to be in single line and there are multiple rowise unixtime mentioned e.g 11996327 , This needs to be converted to Human readdable data and time from multiple rows
Can you help me , it will be... (10 Replies)
Hello everyone,
I have created a workflow that will pull down data via a RESTful API in JSON, then my code parses and modifies said data. The problem I have is that these APIs I am working with only accept XML to PUT/POST data, and I am looking for an easy way to convert my JSON file to XML.
... (2 Replies)
Hello Everyone,
I have a sample file raw.txt as shown below :
Drive Bays
Bay Name : SD-2C
Number of Standby Power Supplies : 4
Number of Drive Enclosures : 12
Summary Status of Contained Modules
All... (6 Replies)
Dear friends,
I'm getting below API result and i would like to format them with Shell scripting.
Input
"id": 9,
"description": "short desc",
"name": "test",
"name_with_namespace": "ABCD-PDFF-PLATFORM-TEST-V1 / test",
"path": "test",
"path_with_namespace":... (7 Replies)
Hi All,
i am trying to print the solaris 11 packages in below required format, But i am unable to do that.
Current ouput :
root@abc# pkginfo -l | egrep '(BASEDIR|NAME|VERSION)' | awk '{print}'
NAME: QLogic 570x/571x Gigabit Ethernet Driver
VERSION: 11.11,REV=2009.11.11
... (7 Replies)
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Hi All,
i am trying to print the df -h ouput in json format. using below script.
#!/usr/bin/env bash
df -h > /tmp/sdf
nawk '{print " "$1" "$2" "$3" "$4" "$5" "$6" "}' /tmp/sdf > /tmp/sdf1
nawk 'NR==1 { for (i=1; i<=NF; i++) { f = i }}{ print $(f), $(f), $(f), $(f), ... (2 Replies)
Discussion started by: sravani25
2 Replies
LEARN ABOUT DEBIAN
update-python-modules
UPDATE-PYTHON-MODULES(8) System Manager's Manual UPDATE-PYTHON-MODULES(8)NAME
update-python-modules - byte-compile python modules
SYNOPSIS
update-python-modules [options] [package.public [...]]
DESCRIPTION
The update-python-modules command is part of the python-support bundle.
update-python-modules is responsible for the byte-compilation of python modules. When used in byte-compilation mode, it will byte-compile
modules references in the files given on the command line. When used in installation mode, it will byte-compile them once for each
installed python version, and will make them available for all of them.
At each invocation, with or without arguments, update-python-modules will check for installed python versions, and will build or remove
modules according to new or removed versions since the last time it was run.
ARGUMENTS
Arguments must be files or directories located in the /usr/share/python-support directory. Depending on their extension, they are treated
differently.
package.public
A file listing public modules to install for each version. These modules must lie in /usr/share/pyshared or /usr/lib/pyshared.
package.private
A file listing private modules to byte-compile for one Python version.
package/
A legacy directory hierarchy of public modules. The C extensions and portions that change with the Python version are to be found in
/usr/lib/python-support/pythonX.Y/package/.
package.dirs
A legacy file listing directories where to find private modules.
OPTIONS -h, --help
Show summary of options.
-v, --verbose
Detail all actions while they are performed.
-b, --bytecompile
Only accept to work on private modules. When given this option, update-python-modules will fail if passed references to public mod-
ules.
-i, --install
Only accept to work on public modules. When given this option, update-python-modules will fail if passed references to public mod-
ules.
-c, --clean
Clean modules instead of installing them.
-a, --rebuild-all
Rebuild all private modules. This is necessary when the default python version was changed, for example.
-f, --force-rebuild-all
Clean all modules (public and private), and rebuild them.
FILES
/usr/lib/pymodules/pythonX.Y/
These directories contain the byte-compiled modules for version pythonX.Y.
SEE ALSO
/usr/share/doc/python-support/README.gz
AUTHOR
Josselin Mouette <joss@debian.org>.
18 Feb 2009 UPDATE-PYTHON-MODULES(8)