Commit Graph

6 Commits

Author SHA1 Message Date
Ed Bartosh ca916f279f oepydevshell-internal.py: standardize usage output
Made usage output of oepydevshell-internal.py to look
similar to the output of other oe scripts.

[YOCTO #10751]

(From OE-Core rev: e6480af22a7a12c655efed14f8f1aea658f26b1c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-13 22:55:21 +00:00
Ed Bartosh 94fb1a57de oepydevshell-internal: python3: encode/decode pty content
As /dev/pty opened in binary mode its content has to
be decoded when reading from it and encoded when writing to it.

(From OE-Core rev: 211870ddbce5c966b2882e97cb2efe29b72a62a4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:24 +01:00
Ed Bartosh e8feb1976a devpyshell: python3: flush stdout explicitly
Opening text stream in unbuffered mode raises the following
exception In Python 3:
    ValueError: can't have unbuffered text I/O

Fixed by leaving std* streams in text mode and flushing
stdout explicitly.

(From OE-Core rev: 732001cb268683f5b56e251e2964ec5b694a2147)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08 09:57:23 +01:00
Ed Bartosh cdff6bc0c1 scripts: python3: change python to python3 in shebang
(From OE-Core rev: 4b544ff388497cac82b0585f237900595523e1cb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:29 +01:00
Ed Bartosh 793b83a3c6 scripts: python3: rename raw_input to input
Renamed raw_input to input as raw_input does not
exist in python 3.

(From OE-Core rev: 32765150b860ecdea74b4494b9531f5bc40252bb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03 13:13:29 +01:00
Richard Purdie cd7b437d4b devshell: Add interactive python shell
Being able to interact with the python context in the Bitbake task execution
environment has long been desireable. This patch introduces such a
mechanism. Executing "bitbake X -c devpyshell" will open a terminal connected
to a python interactive interpretor in the task context so for example you can
run commands like "d.getVar('WORKDIR')"

This version now includes readline support for command history and various other
bug fixes such as exiting cleanly compared to previous versions.

(From OE-Core rev: 36734f34fe6e4b91e293234687e63c02f5b3117e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-28 08:27:00 +01:00