Talk:PyGTK/Hello World Tutorial: Difference between revisions
Crazy-chris (talk | contribs) (+answer) |
James.newton (talk | contribs) No edit summary |
||
Line 62: | Line 62: | ||
:Hey, I think the problem might be (and what I forgot to mention): You have to make the scripts (setup.py, gtktest.py) executable. 'chmod u+x *.py'. Then setup.py should output your .xo and you can install it on the XO Laptop via the journal. [[User:Crazy-chris|Crazy-chris]] 13:37, 25 January 2008 (EST) |
:Hey, I think the problem might be (and what I forgot to mention): You have to make the scripts (setup.py, gtktest.py) executable. 'chmod u+x *.py'. Then setup.py should output your .xo and you can install it on the XO Laptop via the journal. [[User:Crazy-chris|Crazy-chris]] 13:37, 25 January 2008 (EST) |
||
<James> |
|||
Thanks for your rapid response, Chris. I'm still having no joy: |
|||
# cd /usr/share/activities/gtkactivity/ |
|||
# ls -aF |
|||
./ activity/ gtktest.glade* manifest* |
|||
../ activity.py* gtktest.py* setup.py* |
|||
# chmod u+x *.py |
|||
# ./setup.py |
|||
: No such file or directory |
|||
</James> |
Revision as of 19:30, 25 January 2008
<James>
Thanks for the tutorial. I get as far as:
* Run setup.py to create the content bundle
This gives the output:
# ./setup.py : No such file or directory
Knowledge level: I'm a seasoned developer, but working with Linux is new to me.
I created the various *.py files on Windows, then copied them to the XO, into the folder /usr/share/activities/gtkactivity/
On the XO:
# cd /usr/share/activities/gtkactivity/ # find . ./manifest ./activity.py ./gtktest.py ./setup.py ./activity ./activity/activity-gtktest.svg ./activity/activity.info ./gtktest.glade # ./setup.py : No such file or directory # setup.py : setup.py: command not found
Running ls -aF shows that setup.py* exists and is executable. Running nano setup.py shows that the script is correctly entered.
The first line of the setup.py file is:
#!/usr/bin/env python
However, running find...
# find / -name python /usr/bin/python
... shows that, on the XO, python is installed in /usr/bin/.
I tried changing the first line of setup.py to...
#!/usr/bin/python #!/usr/bin/env python #!python
... then tying again in the terminal:
# ./setup.py :./setup.py: /usr/bin/python^M: bad interpreter: No such file or directory
I would be most grateful if someone could point out where I am going wrong.
</James>
- Hey, I think the problem might be (and what I forgot to mention): You have to make the scripts (setup.py, gtktest.py) executable. 'chmod u+x *.py'. Then setup.py should output your .xo and you can install it on the XO Laptop via the journal. Crazy-chris 13:37, 25 January 2008 (EST)
<James> Thanks for your rapid response, Chris. I'm still having no joy:
- cd /usr/share/activities/gtkactivity/
- ls -aF
./ activity/ gtktest.glade* manifest* ../ activity.py* gtktest.py* setup.py*
- chmod u+x *.py
- ./setup.py
- No such file or directory
</James>