wx standard paths

Hi All,

my wxpython application has a polling file bit that doesnt require wx.App()

but i need to use standard path to save the error log.

I am getting the following error. Any help…

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\docsbox>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type “help”, “copyright”, “credits” or “license” for more information.

import wx
wx.StandardPaths.Get()
09:36:43: Debug: …..\src\common\stdpbase.cpp(51): assert “traits” failed in wx
StandardPathsBase::Get(): create wxApp before calling this
<wx._misc.StandardPaths; proxy of <Swig Object of type ‘wxStandardPaths *’ at 0x
1274b68> >

cheers

Thomas

Hi Thomas,

···

On 6/4/07, Thomas Thomas wrote:

my wxpython application has a polling file bit that doesnt require wx.App()
but i need to use standard path to save the error log.
I am getting the following error. Any help..

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Users\docsbox>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)]
on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.StandardPaths.Get()
09:36:43: Debug: ..\..\src\common\stdpbase.cpp(51): assert
"traits" failed in wx
StandardPathsBase::Get(): create wxApp before calling this
<wx._misc.StandardPaths; proxy of <Swig Object of type 'wxStandardPaths *'
at 0x
1274b68> >

I don't think you can use wx.StandardPaths (or almost any other wx
methods/classes) without istantiating a wx.App. Creating a wx.App is
mandatory for almost all the wx actions I know of.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

Again, yet another reason why Python itself would benefit
from having a std_pathes in the standard library.

Karsten

···

On Mon, Jun 04, 2007 at 11:56:24PM +0200, Andrea Gavana wrote:

I don't think you can use wx.StandardPaths (or almost any other wx
methods/classes) without istantiating a wx.App. Creating a wx.App is
mandatory for almost all the wx actions I know of.

--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346