Skip to content

Commit

Permalink
change to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-li-hua committed Jul 5, 2021
1 parent e55606b commit 2d1b576
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions bdd/node/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
child = pexpect.spawn(command="./gptn newgenesis \"\" false",maxread=3000)
child.expect("Do you want to create a new account as the holder of the token")
child.sendline("y")
print child.after
print(child.after)
child.expect("Passphrase:")
child.sendline("1")
print child.after
print(child.after)
child.expect(["Repeat passphrase:"])
child.sendline("1")
print child.before
print child.after
print(child.before)
print(child.after)
child.expect(pexpect.EOF)
sleep(2)

Expand All @@ -34,15 +34,15 @@
child.sendline("1")
child.expect(pexpect.EOF)
EOFLog = child.before
print EOFLog
print(EOFLog)



'''
child = pexpect.spawn(command="./gptn --exec 'personal.listAccounts' attach palletone/gptn.ipc")
child.expect(pexpect.EOF)
print child.before
print child.before.split('\"')[1]
print(child.before)
print(child.before.split('\"')[1])
GENEADD = child.before.split('\"')[1]
child = pexpect.spawn(command="./gptn account new")
# child.logfile = sys.stdout
Expand Down
14 changes: 7 additions & 7 deletions bdd2/node/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
child = pexpect.spawn(command="./gptn newgenesis \"\" false",maxread=3000)
child.expect("Do you want to create a new account as the holder of the token")
child.sendline("y")
print child.after
print(child.after)
child.expect("Passphrase:")
child.sendline("1")
print child.after
print(child.after)
child.expect(["Repeat passphrase:"])
child.sendline("1")
print child.before
print child.after
print(child.before)
print(child.after)
child.expect(pexpect.EOF)
sleep(2)

Expand All @@ -35,15 +35,15 @@
child.sendline("1")
child.expect(pexpect.EOF)
EOFLog = child.before
print EOFLog
print(EOFLog)



'''
child = pexpect.spawn(command="./gptn --exec 'personal.listAccounts' attach palletone/gptn.ipc")
child.expect(pexpect.EOF)
print child.before
print child.before.split('\"')[1]
print(child.before)
print(child.before.split('\"')[1])
GENEADD = child.before.split('\"')[1]
child = pexpect.spawn(command="./gptn account new")
# child.logfile = sys.stdout
Expand Down

0 comments on commit 2d1b576

Please sign in to comment.