Bob Sysero llc Dev wrote:
> b...@sysero-rkm1laptop:~$ ls > l.txt

You just created a file l.txt in your home directory.
Now you start python.

> 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.

Now you try to open a file in /yourpath2yourhome/tmp/l.txt
where "/yourpath2yourhome" is something like "/home/bob".
Of cause there is no file l.txt because you createted it in your home
and not in /yourpath2yourhome/tmp

>  >>> fd =open("$HOME/tmp/l.txt", "r" )
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> IOError: [Errno 2] No such file or directory: '$HOME/tmp/l.txt'
>  >>>
>

Your above test is useless when you try to open a nonexisting file.
My point was that "$HOME" doesen't get substituted by python.
It only gets substituted when using "$HOME" in your shell.

Try:
b...@sysero-rkm1laptop:~$ echo $HOME
and the shell prints something like:
/home/bob

> ...
> The problem I had was with my "How To use Class Designer" on making 
> changes to the main.py so that the user can click on main to run the 
> application. What happened was when I clicked on main.py the terminal 
> window appeared and the closed. I sent to ED this part of the Emai.
> 

Stop clicking on main.py!
Start using a commandline.

b...@sysero-rkm1laptop:~$ python main.py

If something went wrong, you are now able to see it in the terminal window.

Uwe

I really do not know why you pasted the following:
> Ed Leafe wrote:
>  > On Jan 31, 2009, at 7:58 AM, Bob Sysero llc Dev wrote:
>  >
>  >
>  >> Everything ran without a problem when I did a $ cd $HOME/temp/ 
> HelloWorld
>  >> and then
>  >> python main.py. The Form came right up without any errors. I even moved
>  >> the main into the ui directory and was able to click on the main and run
>  >> the Form.
>  >>
>  >> Any ideas why dabo can't find ui directory where "HelloWorld.cdxml" when
>  >> I click on the main.py from my current directory?
>  >>
>  >
>  >
>  > I don't know why it's not seeing the main.py location as your 
> HomeDirectory. I just tried several variations, and they all worked as 
> expected.
>  >
>  > 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:
>  >
>  > dabo.ui.info("HomeDirectory = %s" % hd)
>  >
>  > Since you're running from the ui, use the dialog instead of 'print'.
>  >
>  >
>  > -- Ed Leaf
> Today I ran on my Ubuntu 8.04:
> 
> cd $HOME/src/dabo; svn up
> 
> Which has solved the problem.
> 
> The new version is:
> 
> Platform: GTK
> Python Version: 2.5.2 on linux2
> Dabo Version: Version 0.9.1; Revision 5009M
> UI Version: 2.8.8.0 on wxGTK (gtk2)
> 
> Past News
> The output was:
> HomeDirectory = 
> /home/bobsysero/temp/HelloWorld/home/bobsysero/temp/HelloWorld
> 
> The Home directory should be: /home/bobsysero/temp/HelloWorld
> 
> Ubuntu 8.04 and Ubuntu 8.10
> Gnome
> 
> Platform: GTK
> Python Version: 2.5.2 on linux2
> Dabo Version: Version 0.9.0; Revision 4915M
> UI Version: 2.8.8.0 on wxGTK (gtk2)
> 
> I decided to rerun cd $HOME/src/dabo; svn up
> 
> and the new version is:
> Dabo Version: Version 0.9.1; Revision 5009M
> 
> This corrected the problem and I will get back to the How To CD and my 
> project.
> 
> 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]

Reply via email to