[Planetlab-users] on the use of the planet-lab api

Aaron Klingaman alk at absarokasoft.com
Wed Sep 21 13:01:33 EDT 2005


I suspect your script is being run by your shell (probably bash), and 
not python. Instead, try invoking it as: python ./example1, or, add 
#!/usr/bin/python to the top (or wherever the python intreptor is located).

Regarding the plcmdline error, the [ ] denotes optional parameters; the 
brackets shouldn't be included:

plcmdline.py -u user -r role -p pass

Be aware though that if you specify the password on the command line, it 
may be saved in your shell's command history (not a good thing). If you 
don't specify it, plcmdline will prompt you to enter it when running.

ak

Livia Maria Rodrigues Sampaio wrote:
> Hello,
> 
> I have just tried to use the plcapi following the examples available in 
> the api documentation but I got unsuccessful...
> 
> The first attempt was to connect with the apiserver. According to the 
> example in the documentation this is done as follows:
> 
> import xmlrpclib
> 
> api_server= xmlrpclib.Server('https://www.planet-lab.org/PLCAPI/')
> 
> 
> when executing this code it ocurred this error:
> 
> ./example1: line 2: syntax error near unexpected token `('
> ./example1: line 2: `api_server= 
> xmlrpclib.Server('https://www.planet-lab.org/PLCAPI/')'
> 
> what does this means???
> 
> The second attempt was to use the api command line utility, 
> plcmdline.py. I downloaded the package and when I tried the command 
> using a not valid user, role and password:
> 
> plcmdline.py -v -u xxx -r yyy [-p zzz]
> 
> 
> it ocurred this error:
> 
> Usage:
> ./plcmdline.py -v -u <user> -r <role> [-p <password>] [-c <single_command>]
> 
> it this expected? I would expect some error message concerning the wrong 
> username and password.
> 
> thanks in advance for the feedback...
> 
> Livia
> 
> _______________________________________________
> Users mailing list: Users at lists.planet-lab.org
> https://lists.planet-lab.org/mailman/listinfo/users



More information about the Users mailing list