pcp
[Top] [All Lists]

Re: [pcp] qa/secure/*.py scripts don't work with python3?

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] qa/secure/*.py scripts don't work with python3?
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Mon, 10 Aug 2015 21:45:57 -0400 (EDT)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <55C938A3.90204@xxxxxxxxxxxxxxxx>
References: <55C938A3.90204@xxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Thread-index: 7KAGIqJMjs5CRxnHumn16ImdJxHr2Q==
Thread-topic: qa/secure/*.py scripts don't work with python3?
Hi Ken,

----- Original Message -----
> kenj@vm05:~/src/pcp/qa$ python3.4 secure/pcppdu.py
>    File "secure/pcppdu.py", line 260
>      print "len string =", len(blob)
>                         ^
> SyntaxError: invalid syntax
> 
> but this is OK ...
> 
> kenj@vm05:~/src/pcp/qa$ python2.7 secure/pcppdu.py

Oh yes, I'd come across these before then promptly forgot about
'em, hidden away there - these are the last pieces of code that
have not been ported over yet.

> Do the Python scripts need to be fixed to work for all versions of
> Python (the non-programming language, IMHO)?

Heh, yes, fixes needed here.

> Or does the QA scripts need to sniff out Python Version 2.? and run that
> explicitly, else give up?

We need to fix up the scripts to work with both I think - IIRC, there was
something non-trivial about the pdu/byte encoding there, which made me set
it aside for awhile earlier - needs to be revisited, I'll take a look soon.

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>