GNOME Bugzilla – Bug 586698
tutorial describes incorrect function usage
Last modified: 2009-06-23 08:35:00 UTC
The tutorial at http://download.freedesktop.org/ldtp/doc/ldtp-tutorial.pdf using launchapp("gedit", 1) to launch applications. However, this doesn't appear to actually work. With ldtp 1.6, I get the following: Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ldtp import * >>> launchapp("gedit", 1) Traceback (most recent call last):
+ Trace 216145
arg.insert (0, appName)
With ldtp 1.2 (from debian stable), I get the following: Python 2.5.2 (r252:60911, Jan 4 2009, 17:40:26) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ldtp import * >>> launchapp("gedit", 1) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/var/lib/python-support/python2.5/ldtp.py", line 3173, in launchapp os.execvpe (appName, arg, envVar) File "/usr/lib/python2.5/os.py", line 363, in execvpe _execvpe(file, args, env) File "/usr/lib/python2.5/os.py", line 390, in _execvpe func(fullname, *argrest) TypeError: execve() arg 2 must be a tuple or list Note that in both cases, dropping the second argument allows launchapp to succeed. The tutorial should be updated to drop the second arg as well.
Thanks for the bug report. Have uploaded the updated doc. Thanks.