Uwe Grauer wrote:
> Bob Sysero llc Dev wrote:
>
>> b...@sysero-rkm1laptop:~$ ls > l.txt
>>
Your right I made the error above and I re-typed in the command line:
ls > $HOME/temp/l.txt
python
b...@sysero-rkm1laptop:~$ echo $HOME
/home/bobsysero
b...@sysero-rkm1laptop:~$ ls > $HOME/temp/l.txt
b...@sysero-rkm1laptop:~$ ls $HOME/temp
HelloWorld l.txt
b...@sysero-rkm1laptop:~$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:29:17)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> fd = open("$HOME/temp/l.txt","r")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
I OError: [Errno 2] No such file or directory: '$HOME/temp/l.txt'
>>>
The error message if I am right in the command line is telling me that
python has no scope about $HOME and that is why I am getting the error.
In the demo HelloWorld in the main.py has in it:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dabo
dabo.ui.loadUI("wx")
app = dabo.dApp()
# IMPORTANT! Change app.MainFormClass value to the name
# of the form class that you want to run when your
# application starts up.
app.MainFormClass = "HelloWorld.cdxml"
app.start()
When I ran the main.py from the command line I was getting the error
that Dabo could not open HelloWorld.cdxml.
Ed suggested that I place the code dabo.ui.info("HomeDirectory = %s" % hd)
> If you want to dig a little deeper, modify the resolvePathAndUpdate()
> method in dabo/ui.uiwx/__init__.py. The second line of that method
> reads: "hd = app.HomeDirectory". Right after that add a line to display
> the value:
In the command line I ran python main.py in the current directory and
the output from dabo.ui.info("HomeDirectory = %s" % hd) was:
/home/bobsysero/temp/HelloWorld/home/bobsysero/temp/HelloWorld
The Home directory should be: /home/bobsysero/temp/HelloWorld
I ran cd $HOME/src/dabo; svn up and the problem is solved.
> If something went wrong, you are now able to see it in the terminal window.
>
> Uwe
>
You are also right that in testing and debugging you need to run in the
command line to find out what trace errors are coming back. Python is
new to me and I do like the trace back that you don't get in Java, C,
C++, Pascal, Fortran, Lisp and asm. For my end user they don't want to
see the terminal window so what I will do in Beta is redirect the output
to a file.
Thank you
Bob
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]