Ed Leafe wrote:
> On Jan 30, 2009, at 8:11 PM, Bob Sysero llc Dev wrote:
>
>
>> I am running on Gnome and I checked the main.py is set for executable.
>> What is strange is when I started back in the the early summer 2008 I
>> had no problems when I clicked on the main.py. When working on the How
>> To use Class Designer that I found I could not click on main.py and
>> run
>> the demo. If I run the terminal type in cd to my current directory
>> then
>> type:
>>
>> python main.py
>>
>> The demo runs without a problem.
>>
>> Any Idea
>>
>
>
> I know that this sounds kinda Windows-y, but do you have a default
> program set to run .py files? I haven't used Gnome in a while, so I
> can't remember if this is possible in Gnome, too.
>
>
> -- Ed Leafe
>
I think the problem is in the current directory. My project is located
in the directory $HOME/temp/HelloWorld. I went into the main.py that is
located in my current project directory $HOME/temp/HelloWorld. I added
in the code yesterday:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dabo
dabo.ui.loadUI("wx")
app = dabo.dApp()
dabo.trace() # <<<<<< Added
# 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()
------------------------------------------------------------------------------------------------------------
Next I clicked on the main.py and the trace was:
> /home/bobsysero/temp/HelloWorld/main.py(12)<module>()
-> app.MainFormClass = "HelloWorld.cdxml"
(Pdb) n
> /home/bobsysero/temp/HelloWorld/main.py(14)<module>()
-> app.start()
(Pdb) n
Dabo Error Log: Sat Jan 31 08:49:27 2009: Class file 'HelloWorld.cdxml'
not found
IOError: IOError(... found",)
> /home/bobsysero/temp/HelloWorld/main.py(14)<module>()
-> app.start()
(Pdb)
--------------------------------------------------------------------------------------------------------------------
I then ran my Terminal and typed:
b...@sysero-rkm1laptop:~$ cd $HOME/temp/HelloWorld
b...@sysero-rkm1laptop:~/temp/HelloWorld$ ls
biz Main My Hello World main.py~ resources
Class Designer Sysero SB~ Main My Hello World~ My Hello World test
db main.py reports ui
b...@sysero-rkm1laptop:~/temp/HelloWorld$ python main.py
> /home/bobsysero/temp/HelloWorld/main.py(12)<module>()
-> app.MainFormClass = "HelloWorld.cdxml"
(Pdb) n
> /home/bobsysero/temp/HelloWorld/main.py(14)<module>()
-> app.start()
(Pdb) n
--Return--
> /home/bobsysero/temp/HelloWorld/main.py(14)<module>()->None
-> app.start()
(Pdb)
-----------------------------------------------------------------------------------------------------------------------
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?
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]