BigEd / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
1 stars 3 forks source link

v10 ipm do_load() broken #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run ipm and try to use the 'load' command

What is the expected output? What do you see instead?
values passed to the .write() functions need to be strings, not ints and 
generators

What version of the product are you using? On what operating system?
v10 on Debian Linux

Please provide any additional information below.

The following replacement code block for ipm's do_load() works for both the 
pipe (posix64 platform) and serial (mbed platform) connections:

        marshaled_co = dumps(code)
        l = len(marshaled_co)
        self.conn.write(chr(l & 0xff))
        self.conn.write(chr((l >> 8) & 0xff))
        self.conn.write(marshaled_co)
    self.stdout.write(''.join(self.conn.read()))

Original issue reported on code.google.com by j...@missioncognition.net on 11 Feb 2012 at 4:25

GoogleCodeExporter commented 9 years ago
Thank you for the bug report and the fix.  I tested on posix64 and it works for 
a simple file.py with a function inside it.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 5:17

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 5dd54196d153.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 5:19