Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-18 Thread Alex Tweedly
Louis Pecora wrote:

>Christopher Barker wrote:
>  
>
>>Louis Pecora wrote:
>>
>>
>>>I really do numerical calcs, but occasionally need a simple GUI 
>>>dialog or open a window to plot in (very simple)
>>>  
>>>
>>Take a look at wxmpl. It helps you embed a matplotlib window in a 
>>wxPython app. It's pretty handy, once you get the hang of wxPython. 
>>Also, depending on what kind of data you are looking at, 
>>wx.lib.floatcanvas might be useful (shameless plug, I wrote it)
>>
>>
>>

>wxmpl ?  Yet another GUI.  :-)Well, that's good.  I'll check it 
>out.  I did get PythonCard and it looks pretty good, too.  Nice to have 
>a choice.  Now EVERYONE STOP.   NO MORE.   :-)
>
>  
>
wxmpl isn't another GUI - it's what you use to embed matplotlib windows 
within wxPython (and therefore also can be used to embed them within 
PythonCard); telling you about wxmpl is in response to the part of your 
original post saying "or open a window to plot in"

-- 
Alex Tweedly   http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.3/316 - Release Date: 17/04/2006

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-18 Thread Louis Pecora
Christopher Barker wrote:
> Louis Pecora wrote:
>> I really do numerical calcs, but occasionally need a simple GUI 
>> dialog or open a window to plot in (very simple)
>
> Take a look at wxmpl. It helps you embed a matplotlib window in a 
> wxPython app. It's pretty handy, once you get the hang of wxPython. 
> Also, depending on what kind of data you are looking at, 
> wx.lib.floatcanvas might be useful (shameless plug, I wrote it)
>
>> I wish there were a way to keep the popup window with the traceback 
>> info open, but it quickly closes and the app quits.  Redirecting 
>> found the error, but it is an extra step.
>
> This is a BBEdit thing, really, I find it easiest just to run from the 
> terminal command line, and see your tracebacks there.
>
> For really simple stuff, you can just:
>
> app = wx.App()
> image=wx.Image('/Users/louispecora/Code/python/test_folder/wxPython_learn/rappin_cover150.jpg',wx.BITMAP_TYPE_JPEG)
>  
>
> frame = Frame(image)
> frame.Show()
> app.MainLoop()
>
> I'm pretty sure the default wx.App directs errors to the console.
>
>

wxmpl ?  Yet another GUI.  :-)Well, that's good.  I'll check it 
out.  I did get PythonCard and it looks pretty good, too.  Nice to have 
a choice.  Now EVERYONE STOP.   NO MORE.   :-)

I got around the loss of Traceback.  wxPython has a mechanism to set the 
redirection.  Just putting it to False causes the usual Terminal 
output.  So that now works.  (Yes, it was in the book.)

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-18 Thread Christopher Barker
Louis Pecora wrote:
> I really do numerical calcs, but occasionally 
> need a simple GUI dialog or open a window to plot in (very simple)

Take a look at wxmpl. It helps you embed a matplotlib window in a 
wxPython app. It's pretty handy, once you get the hang of wxPython. 
Also, depending on what kind of data you are looking at, 
wx.lib.floatcanvas might be useful (shameless plug, I wrote it)

> I wish there were a way to keep the popup window with the 
> traceback info open, but it quickly closes and the app quits.  
> Redirecting found the error, but it is an extra step.

This is a BBEdit thing, really, I find it easiest just to run from the 
terminal command line, and see your tracebacks there.

For really simple stuff, you can just:

app = wx.App()
image=wx.Image('/Users/louispecora/Code/python/test_folder/wxPython_learn/rappin_cover150.jpg',wx.BITMAP_TYPE_JPEG)
frame = Frame(image)
frame.Show()
app.MainLoop()

I'm pretty sure the default wx.App directs errors to the console.


-Chris









-- 
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

[EMAIL PROTECTED]
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-13 Thread Louis Pecora
Alex Tweedly wrote:
>
> I'm pretty clueless about how everything (including the whole 
> "framework" thing) fits together on OS X, but I'd suggest trying this ...
>
> run python, and do
>
>> import sys
>> print sys.path
>
> and see if it contains the PythonCard directory as you expect it. If 
> it does, then further try
It does. Here's the print out of it:

/Users/louispecora/Code/python/test_folder
/Library/Frameworks/Python.framework/Versions/2.4/lib/python24.zip
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-darwin
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/lib-scriptpackages
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Numeric
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kinds
/usr/local/bin
/Users/louispecora/Code/python/general
/Users/louispecora/Code/python/stats
/Users/louispecora/Code/python/stats/BayesProb
/Users/louispecora/Code/python/time_series
/Users/louispecora/Code/python/plotwindow
/users/louispecora/Code/python/dynamic/dynsys
/Users/louispecora/Code/python/AddedPackagesfiles
/Users/louispecora/Code/python/AddedPackagesfiles/kinds/Lib
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1/build/lib
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1/build/lib/PythonCard
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.6-mac-unicode

You can see the PythonCard directory near the bottom.

>> import os.path
>> for d in sys.path:
>> print d, os.path.isdir(d)
> and see if that tells you anything.
Here you go:

/Users/louispecora/Code/python/test_folder True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python24.zip False
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4 True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-darwin 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/plat-mac/lib-scriptpackages
 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-tk True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/lib-dynload 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Numeric
 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/kinds
 
True
/usr/local/bin True
/Users/louispecora/Code/python/general True
/Users/louispecora/Code/python/stats True
/Users/louispecora/Code/python/stats/BayesProb True
/Users/louispecora/Code/python/time_series True
/Users/louispecora/Code/python/plotwindow True
/users/louispecora/Code/python/dynamic/dynsys True
/Users/louispecora/Code/python/AddedPackagesfiles True
/Users/louispecora/Code/python/AddedPackagesfiles/kinds/Lib True
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1 True
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1/build/lib 
True
/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1/build/lib/PythonCard
 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app
 
True
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.6-mac-unicode
 
True


There's PythonCard near the bottom.  Is there anything to the error 
which is that module PythonCard cannot be found and that PythonCard is 
really a directory?  Here's the original error:

Traceback (most recent call last):
  File 
"/Users/louispecora/Code/python/AddedPackagesfiles/PythonCard-0.8.1/tests/minimalTest.py",
 
line 3, in ?
from PythonCard import model, test
ImportError: No module named PythonCard
Exit 1
>
> If you're still stuck - I'd suggest asking on the pythoncard mailing 
> list.

If you give up, that's my next step.  Thanks for taking the time to help.


-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-13 Thread Alex Tweedly
Louis Pecora wrote:

> Alex Tweedly wrote:
>
>>
>> You should also look, then, at Pythoncard ( www.pythoncard.org )
>> Excellent for simple UIs, simple for excellent UIs :-)
>>
> Got it, ran sudo python setup.py install, seemed to go OK.  Ran 
> minimaltest and it could not find PythonCard module.  I have a path to 
> the PythonCard directory (folder) in my .pth file in the proper place 
> down in Library/Frameworks/python... etc.
>
> Not sure why it can't see it.  Other added packages are found fine by 
> python.
>
> I am running on MacOS X 10.4.1 with Python 2.4.1 through the editor 
> BBEdit.
>
> I've checked paths and spellings.  No errors so far.  Any hints?
>
I'm pretty clueless about how everything (including the whole 
"framework" thing) fits together on OS X, but I'd suggest trying this ...

run python, and do

> import sys
> print sys.path

and see if it contains the PythonCard directory as you expect it. If it 
does, then further try

> import os.path
> for d in sys.path:
> print d, os.path.isdir(d)


and see if that tells you anything.

If you're still stuck - I'd suggest asking on the pythoncard mailing list.


-- 
Alex Tweedly   http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/310 - Release Date: 12/04/2006

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-13 Thread Louis Pecora
Alex Tweedly wrote:
>
> You should also look, then, at Pythoncard ( www.pythoncard.org )
> Excellent for simple UIs, simple for excellent UIs :-)
>
Got it, ran sudo python setup.py install, seemed to go OK.  Ran 
minimaltest and it could not find PythonCard module.  I have a path to 
the PythonCard directory (folder) in my .pth file in the proper place 
down in Library/Frameworks/python... etc.

Not sure why it can't see it.  Other added packages are found fine by 
python.

I am running on MacOS X 10.4.1 with Python 2.4.1 through the editor BBEdit.

I've checked paths and spellings.  No errors so far.  Any hints?

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Alex Tweedly
Louis Pecora wrote:

> Alex Tweedly wrote:
>
>>
>>   
>
> Just looked it over.  Seems like the right level for what I do.  But 
> is it still under development?  Looked stagnent to me.

It's under development - 0.8.2 will be out any day now, and contains a 
fair number of enhancements, including some big ones:

 - codeEditor handles multiple windows (using tabbed notebook style).
 - layoutEditor allows selection of, and operation on, multiple components
   (e.g. to align them, move them together, etc.)
 - layoutEditor gives direct access to all properties
 - additional samples, better Unicode handling, enhanced walk-through 
(tutorial style) documentation

I'm struggling through the mechanics of releasing 0.8.2 - but you can 
get it already via anonymous cvs (see the instructions on the "cvs 
access" link from www.pythoncard.org )

The mailing list is pretty quiet - but generally responsive when 
questions are asked.


-- 
Alex Tweedly   http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release Date: 11/04/2006

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Louis Pecora
Alex Tweedly wrote:
> Louis Pecora wrote:
>
>   
>> Thanks for the link and the hint on boa. I've heard of the latter, but
>>
>> never looked into it.  I really do numerical calcs, but occasionally 
>> need a simple GUI dialog or open a window to plot in (very simple), but 
>> who knows, boa might be the ticket.  Thanks, again.
>>  
>>
>> 
> You should also look, then, at Pythoncard ( www.pythoncard.org )
> Excellent for simple UIs, simple for excellent UIs :-)
>
>   
Just looked it over.  Seems like the right level for what I do.  But is 
it still under development?  Looked stagnent to me. 

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Alex Tweedly
Louis Pecora wrote:

> Thanks for the link and the hint on boa. I've heard of the latter, but
>
>never looked into it.  I really do numerical calcs, but occasionally 
>need a simple GUI dialog or open a window to plot in (very simple), but 
>who knows, boa might be the ticket.  Thanks, again.
>  
>
You should also look, then, at Pythoncard ( www.pythoncard.org )
Excellent for simple UIs, simple for excellent UIs :-)

-- 
Alex Tweedly   http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.4.1/309 - Release Date: 11/04/2006

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Louis Pecora
Stewart Midwinter wrote:
>
> thank you Charles, thank you Saggau (and thank you Daniel for posing
> the question).   I'm also new to wxPython, though I've been working
> with Wax (a more pythonic layer on top of wxPython) for some months
> now), and I also was having a devil of a time trying to debug a
> simple app - the error window would pop up for a fraction of a second
> and then disappear. 
>
> I tried your suggestion and indeed, I can read the exception message
> at my leisure!
>
> thanks again
> Stewart in Calgary
>
>
>   
Yep, the redirect works.   I haven't tried the other suggestion of 
opening a messagebox dialog to hold the stdout window open.  That would 
be nicer since it involves direct feedback instead of going to a file.  
But still nice to finally see what the problem was.


-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Stewart Midwinter
> > From: Charles Hartman <[EMAIL PROTECTED]>
> If I recall correctly, this syndrome is covered in the book. It  
> happens because the diagnostic's going to a window that closes when
> the app does. Look up wx.App(redirect=True) in the index -- you can
> write the diagnostic to a file and examine it at leisure. 

> > From: Saggau <[EMAIL PROTECTED]>
> Charles is right:
> http://www.wxpython.org/docs/api/wx.App-class.html

thank you Charles, thank you Saggau (and thank you Daniel for posing
the question).   I'm also new to wxPython, though I've been working
with Wax (a more pythonic layer on top of wxPython) for some months
now), and I also was having a devil of a time trying to debug a
simple app - the error window would pop up for a fraction of a second
and then disappear. 

I tried your suggestion and indeed, I can read the exception message
at my leisure!

thanks again
Stewart in Calgary

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Charles Hartman
It occurs to me that if you added an OnExit() handler to your app --  
any app that's giving quit-too-soon trouble. The handler could simply  
put up a wx.MessageBox, which gets an OK from the user. This would  
pause the app on the way out, and therefore permit the normal app  
output window (without changing redirection) to stay onscreen as long  
as one liked. A little baroque, but pretty easy.

Charles Hartman


On Apr 12, 2006, at 9:28 AM, Louis Pecora wrote:

> Kevin Ollivier wrote:
>> Hi Louis,
>>
>> On Apr 11, 2006, at 2:43 PM, Louis Pecora wrote:
>>
>>> I bought the wxPython in Action book and started trying the simple
>>> examples in Chap. 1.  One thing I have run into is rather
>>> disappointing.  Many errors (e.g. I typed return true, instead of  
>>> return
>>> True) do not give the beloved Python tracback.  That's one of the  
>>> nice
>>> things that made me choose Python.  Somehow once the app is  
>>> launched if
>>> there is a bug it just quits without any information.  I am now
>>> struggling to find out why example 3 (hello.py) won't work.  I've  
>>> been
>>> over it dozens of times checking indentation, spelling, etc.  But  
>>> the
>>> app never gets into OnInit (determined by the old fashion way of  
>>> putting
>>> print's into the program at strategic stages).   A window flashes  
>>> open
>>> and then disappears.  Process exited in the terminal.
>>
>> Have you checked if there's anything in
>> /Applications/Utilities/Console.app? If you run scripts by
>> double-clicking them in the Finder, that's where the output should be
>> going.
>>
>> Regards,
>>
>> Kevin
>>
>
> I'm running from BBEdit.  Someone else pointed me to the link that
> showed how to do a redirect output.  When I did that I got the
> traceback.  I wish there were a way to keep the popup window with the
> traceback info open, but it quickly closes and the app quits.
> Redirecting found the error, but it is an extra step.
>
>
>
> -- 
> Cheers,
>
> Lou Pecora
>
> Code 6362
> Naval Research Lab
> Washington, DC  20375
> USA
> Ph:  +202-767-6002
> email:  [EMAIL PROTECTED]
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Louis Pecora
Mark Thalman wrote:
> Louis,
>
> If you don't need cross-platform compatibility, why not use EasyDialogs?
>
> http://python.org/doc/2.4.1/mac/module-EasyDialogs.html
>

Yes, I've messed with them a little.  Really very nice ... and 
tempting.  I'm on the fence.  I got this wxPython book and it looks 
cool, but I really don't need full-blown GUI apps, but then I may look 
into boa... too many choices.   :-)   But that's a good thing.   Sometimes.


-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Louis Pecora
Kevin Ollivier wrote:
> Hi Louis,
>
> On Apr 11, 2006, at 2:43 PM, Louis Pecora wrote:
>
>> I bought the wxPython in Action book and started trying the simple
>> examples in Chap. 1.  One thing I have run into is rather
>> disappointing.  Many errors (e.g. I typed return true, instead of return
>> True) do not give the beloved Python tracback.  That's one of the nice
>> things that made me choose Python.  Somehow once the app is launched if
>> there is a bug it just quits without any information.  I am now
>> struggling to find out why example 3 (hello.py) won't work.  I've been
>> over it dozens of times checking indentation, spelling, etc.  But the
>> app never gets into OnInit (determined by the old fashion way of putting
>> print's into the program at strategic stages).   A window flashes open
>> and then disappears.  Process exited in the terminal.
>
> Have you checked if there's anything in 
> /Applications/Utilities/Console.app? If you run scripts by 
> double-clicking them in the Finder, that's where the output should be 
> going.
>
> Regards,
>
> Kevin
>

I'm running from BBEdit.  Someone else pointed me to the link that 
showed how to do a redirect output.  When I did that I got the 
traceback.  I wish there were a way to keep the popup window with the 
traceback info open, but it quickly closes and the app quits.  
Redirecting found the error, but it is an extra step.



-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Louis Pecora
Saggau wrote:
> Charles is right:
> http://www.wxpython.org/docs/api/wx.App-class.html
>
> Have you looked at boa-constructor on sourceforge?
> boa-constructor.sourceforge.net 
>
> I used to use it when I was a bigger-than-I-am-now linux geek and 
> found it quite useful for building one-off gui toys.  I found the 
> learning curve more bearable using it.
>
> Cheers,
> Jonathan
>

Thanks for the link and the hint on boa.  I've heard of the latter, but 
never looked into it.  I really do numerical calcs, but occasionally 
need a simple GUI dialog or open a window to plot in (very simple), but 
who knows, boa might be the ticket.  Thanks, again.

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-12 Thread Charles Hartman
(sorry -- I meant to post this to the list)Begin forwarded message:From: Charles Hartman <[EMAIL PROTECTED]>Date: April 12, 2006 7:23:20 AM EDTTo: Louis Pecora <[EMAIL PROTECTED]>Subject: Re: [Pythonmac-SIG] wxPython -- some disappointment using it. For some notes on errata in the book, and some helpful discussion of particular questions, you might want to go to	http://www.manning-sandbox.com/forum.jspa?forumID=202Charles HartmanOn Apr 11, 2006, at 8:10 PM, Louis Pecora wrote: Charles Hartman wrote: If I recall correctly, this syndrome is covered in the book. It happens because the diagnostic's going to a window that closes when the app does. Look up wx.App(redirect=True) in the index -- you can write the diagnostic to a file and examine it at leisure. Sorry, I'm doing this from memory so the details are hazy.Charles Hartman Ah, good info.  Thanks!-- Cheers,Lou PecoraCode 6362Naval Research LabWashington, DC  20375USAPh:  +202-767-6002email:  [EMAIL PROTECTED]  ___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Kevin Ollivier
Hi Louis,

On Apr 11, 2006, at 2:43 PM, Louis Pecora wrote:

> I bought the wxPython in Action book and started trying the simple
> examples in Chap. 1.  One thing I have run into is rather
> disappointing.  Many errors (e.g. I typed return true, instead of  
> return
> True) do not give the beloved Python tracback.  That's one of the nice
> things that made me choose Python.  Somehow once the app is  
> launched if
> there is a bug it just quits without any information.  I am now
> struggling to find out why example 3 (hello.py) won't work.  I've been
> over it dozens of times checking indentation, spelling, etc.  But the
> app never gets into OnInit (determined by the old fashion way of  
> putting
> print's into the program at strategic stages).   A window flashes open
> and then disappears.  Process exited in the terminal.

Have you checked if there's anything in /Applications/Utilities/ 
Console.app? If you run scripts by double-clicking them in the  
Finder, that's where the output should be going.

Regards,

Kevin

> How are others using wxPython?  Do you find you need to run in a
> debugger?  Does that help?  What do you recommend?
>
> Thanks for any suggestions.
>
> -- 
> Cheers,
>
> Lou Pecora
>
> Code 6362
> Naval Research Lab
> Washington, DC  20375
> USA
> Ph:  +202-767-6002
> email:  [EMAIL PROTECTED]
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Saggau
Charles is right:http://www.wxpython.org/docs/api/wx.App-class.htmlHave you looked at boa-constructor on sourceforge?
boa-constructor.sourceforge.netI used to use it when I was a bigger-than-I-am-now linux geek and found it quite useful for building one-off gui toys.  I found the learning curve more bearable using it.
Cheers, JonathanOn 4/11/06, Louis Pecora <[EMAIL PROTECTED]> wrote:
Saggau wrote:> are you running your scripts with pythonw from the command line?>I'm running with pythonw from BBEdit although I have tried the commandline, too.  Same behavior.  I run other scripts no problem this way
including other wxPython examples I got on the web earlier.--Cheers,Lou PecoraCode 6362Naval Research LabWashington, DC  20375USAPh:  +202-767-6002email:  
[EMAIL PROTECTED]-- The extent to which an individual can resist being blindly led by tradition is a good measure of his vitality.  - Harry Partch
There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them! - Richard P. Feynman
Few people are capable of expressing with equanimity opinions which differ from the prejudices of their social environment.  Most people are not even capable of forming such opinions.  - Einstein
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Charles Hartman
If I recall correctly, this syndrome is covered in the book. It  
happens because the diagnostic's going to a window that closes when  
the app does. Look up wx.App(redirect=True) in the index -- you can  
write the diagnostic to a file and examine it at leisure. Sorry, I'm  
doing this from memory so the details are hazy.

Charles Hartman


On Apr 11, 2006, at 5:43 PM, Louis Pecora wrote:

> I bought the wxPython in Action book and started trying the simple
> examples in Chap. 1.  One thing I have run into is rather
> disappointing.  Many errors (e.g. I typed return true, instead of  
> return
> True) do not give the beloved Python tracback.  That's one of the nice
> things that made me choose Python.  Somehow once the app is  
> launched if
> there is a bug it just quits without any information.  I am now
> struggling to find out why example 3 (hello.py) won't work.  I've been
> over it dozens of times checking indentation, spelling, etc.  But the
> app never gets into OnInit (determined by the old fashion way of  
> putting
> print's into the program at strategic stages).   A window flashes open
> and then disappears.  Process exited in the terminal.
>
> How are others using wxPython?  Do you find you need to run in a
> debugger?  Does that help?  What do you recommend?
>
> Thanks for any suggestions.
>
> -- 
> Cheers,
>
> Lou Pecora
>
> Code 6362
> Naval Research Lab
> Washington, DC  20375
> USA
> Ph:  +202-767-6002
> email:  [EMAIL PROTECTED]
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Saggau
are you running your scripts with pythonw from the command line?On 4/11/06, Louis Pecora <[EMAIL PROTECTED]
> wrote:I bought the wxPython in Action book and started trying the simple
examples in Chap. 1.  One thing I have run into is ratherdisappointing.  Many errors (e.g. I typed return true, instead of returnTrue) do not give the beloved Python tracback.  That's one of the nicethings that made me choose Python.  Somehow once the app is launched if
there is a bug it just quits without any information.  I am nowstruggling to find out why example 3 (hello.py) won't work.  I've beenover it dozens of times checking indentation, spelling, etc.  But theapp never gets into OnInit (determined by the old fashion way of putting
print's into the program at strategic stages).   A window flashes openand then disappears.  Process exited in the terminal.How are others using wxPython?  Do you find you need to run in adebugger?  Does that help?  What do you recommend?
Thanks for any suggestions.--Cheers,Lou PecoraCode 6362Naval Research LabWashington, DC  20375USAPh:  +202-767-6002email:  
[EMAIL PROTECTED]___Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig-- The extent to which an individual can resist being blindly led by tradition is a good measure of his vitality.  - Harry Partch
There is a computer disease that anybody who works with computers knows about. It's a very serious disease and it interferes completely with the work. The trouble with computers is that you 'play' with them! - Richard P. Feynman
Few people are capable of expressing with equanimity opinions which differ from the prejudices of their social environment.  Most people are not even capable of forming such opinions.  - Einstein
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Daniel Lord
Personally I am with Bill, I like Jython but it unfortunately has  
fallen way behind in Python versions.
But it has teh advantage that Java is supported on all main 'cross'  
platforms.

On Apr 11, 2006, at 14:43, Louis Pecora wrote:

> I bought the wxPython in Action book and started trying the simple
> examples in Chap. 1.  One thing I have run into is rather
> disappointing.  Many errors (e.g. I typed return true, instead of  
> return
> True) do not give the beloved Python tracback.  That's one of the nice
> things that made me choose Python.  Somehow once the app is  
> launched if
> there is a bug it just quits without any information.  I am now
> struggling to find out why example 3 (hello.py) won't work.  I've been
> over it dozens of times checking indentation, spelling, etc.  But the
> app never gets into OnInit (determined by the old fashion way of  
> putting
> print's into the program at strategic stages).   A window flashes open
> and then disappears.  Process exited in the terminal.
>
> How are others using wxPython?  Do you find you need to run in a
> debugger?  Does that help?  What do you recommend?
>
> Thanks for any suggestions.
>
> -- 
> Cheers,
>
> Lou Pecora
>
> Code 6362
> Naval Research Lab
> Washington, DC  20375
> USA
> Ph:  +202-767-6002
> email:  [EMAIL PROTECTED]
>
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] wxPython -- some disappointment using it.

2006-04-11 Thread Louis Pecora
I bought the wxPython in Action book and started trying the simple 
examples in Chap. 1.  One thing I have run into is rather 
disappointing.  Many errors (e.g. I typed return true, instead of return 
True) do not give the beloved Python tracback.  That's one of the nice 
things that made me choose Python.  Somehow once the app is launched if 
there is a bug it just quits without any information.  I am now 
struggling to find out why example 3 (hello.py) won't work.  I've been 
over it dozens of times checking indentation, spelling, etc.  But the 
app never gets into OnInit (determined by the old fashion way of putting 
print's into the program at strategic stages).   A window flashes open 
and then disappears.  Process exited in the terminal.

How are others using wxPython?  Do you find you need to run in a 
debugger?  Does that help?  What do you recommend? 

Thanks for any suggestions.

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  [EMAIL PROTECTED]

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig