Commit fbc902e5e2c40ff5017f2eec3314a21eac7c13e2

Authored by Perry Werneck
1 parent 43cf27ed
Exists in master

Atualizado projeto codeblocks

python-pw3270.cbp
... ... @@ -11,6 +11,8 @@
11 11 <Option object_output=".obj/Debug/" />
12 12 <Option type="3" />
13 13 <Option compiler="gcc" />
  14 + <Option host_application="./test.sh" />
  15 + <Option run_host_application_in_terminal="1" />
14 16 <Compiler>
15 17 <Add option="-g" />
16 18 <Add option="-DDEBUG=1" />
... ... @@ -36,7 +38,7 @@
36 38 <Add option="-fPIC" />
37 39 </Compiler>
38 40 <Linker>
39   - <Add option="`pkg-config --libs python`" />
  41 + <Add option="`pkg-config --libs python dbus-1`" />
40 42 <Add library="pw3270cpp" />
41 43 </Linker>
42 44 <Unit filename="src/actions.cc" />
... ...
test.sh 0 → 100755
... ... @@ -0,0 +1,3 @@
  1 +#!/bin/bash
  2 +export PYTHONPATH=.bin/Debug/
  3 +python ./testprograms/sample.py
... ...
testprograms/sample.py 0 → 100644
... ... @@ -0,0 +1,31 @@
  1 +#!/usr/bin/python
  2 +#-*- coding: utf-8
  3 +
  4 +import py3270
  5 +
  6 +print "Teste extensão pw3270"
  7 +
  8 +print py3270.Revision()
  9 +
  10 +term = py3270.Terminal("")
  11 +
  12 +print "Using pw3270 version " + term.Version() + " revision " + term.Revision()
  13 +
  14 +term.Connect("tn3270://zos.efglobe.com:telnet",10);
  15 +
  16 +print term.IsConnected()
  17 +print term.IsReady()
  18 +
  19 +print term.GetStringAt(14,19,38)
  20 +
  21 +print "-----------------------------------------------------------------------"
  22 +print term
  23 +print "-----------------------------------------------------------------------"
  24 +
  25 +
  26 +
  27 +
  28 +
  29 +
  30 +
  31 +
... ...