Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
63 user(s) are online (55 user(s) are browsing Forums)

Members: 0
Guests: 63

more...

Support us!

Headlines

 
  Register To Post  

python & arexx, listing ports, check if port exist
Just can't stay away
Just can't stay away


See User information
Quote:
os.system('RXLIB rexxsupport.library 0 -30 0')
#,,result = arexx.dorexx('REXX',"ShowList(P,, )")
arexx.dorexx('REXX',"setenv result ShowList(P,, )")
print os.getenv(result)


#,,result = arexx.dorexx('REXX',"ShowList(P,'ODYSSEY.1', )")
arexx.dorexx('REXX',"setenv result ShowList(P,'ODYSSEY.1', )"
#print os.getenv(result)


I can't make the above script work
rc1,rc2,result = arexx.dorexx('REXX',"ShowList(P,, )")
does not give the list of ports in result as expected

How can this be done?

Go to top
Re: python & arexx, listing ports, check if port exist
Home away from home
Home away from home


See User information
@JosDuchIt

44:   try:
45:    ports os.getports()
46:    ports " ".join(ports)
47:   except AttributeError
48:   # The getports function wasn't present so we call the REXX
49:   # equivalent.
50:    (rc,rc2,ports) = arexx.dorexx("REXX","return show('P')")
51:    if rc != 0:
52:     # We couldn't even call REXX somwthing serioiusly up here
53:     # Bail out with a requester.
54:     ErrorExit("Couldn't Find ARexx!")
55:   return ports


Taken from my "course" on programming for ProAction

http://www.broad.ology.org.uk/docs/am ... 0_Starting_ProAction.html

Go to top
Re: python & arexx, listing ports, check if port exist
Just can't stay away
Just can't stay away


See User information
@broadblies 
thanks
also for the link


Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project