views:

61

answers:

1

I am running iOS 4 on a jailbroken iPhone 3GS. Before I upgraded to iOS 4, I had installed Python on the iPhone and had found the following snippet of Python code to copy a variable (key in this case) to the pasteboard. I then was able to open another application and paste the value into a text field.

out = os.popen('\usr\bin\pbcopy', 'w')
out.write(key)
out.close()

Since upgrading to iOS 4, this code no longer works. I receive the following error message:

sh: pbcopy: command not found

I looked in the \usr\bin\ directory, and there is no pbcopy (or pbpaste) command listed.

Does anyone know of another way that I can use Python to copy the value of a variable into the pasteboard?

I'd greatly appreciate any help that anyone can provide.

A: 

You need to install the package "Erica Utilities" available in the modmyi repository (enabled by default) in Cydia.

matthewbauer
That did it. pbcopy and pbpaste are now in my \usr\bin\ directory, and my python program now works.Thank you very much, matthew!
Hogarius