VC++ types to ctypes

2006-06-12 Thread lux
Hi to all,
i need to traslate this struct in python using ctypes

struct Soptions
{
char  chVolumeLabel[128];
__int32  nSessionToImport;
BS_BOOL bJolietFileSystem;
BS_BOOL bBootable;
TCHAR  chBootImage[_MAX_PATH];
BS_BOOL bFinalize;
BS_BOOL bTestBurn;
BS_BOOL bPerformOPC;
BS_BOOL bVerifyAfterBurn;
__int32  nCacheSize;
BS_BOOL bUnderrunProtection;
BS_BOOL bEjectAfterBurn;
__int32  nCopies;
}

I try to convert:

char xxx[128] - c_char*128
__int32  - c_int
BS_BOOL - c_byte

TCHAR  chBootImage[_MAX_PATH]; - ???

But not work...
how to solve it?

Thank's, Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: VC++ types to ctypes

2006-06-12 Thread lux
Thank you now it work!!!


Thomas Heller ha scritto:

 lux wrote:
  Hi to all,
  i need to traslate this struct in python using ctypes
 
  struct Soptions
  {
  char  chVolumeLabel[128];
  __int32  nSessionToImport;
  BS_BOOL bJolietFileSystem;
  BS_BOOL bBootable;
  TCHAR  chBootImage[_MAX_PATH];
  BS_BOOL bFinalize;
  BS_BOOL bTestBurn;
  BS_BOOL bPerformOPC;
  BS_BOOL bVerifyAfterBurn;
  __int32  nCacheSize;
  BS_BOOL bUnderrunProtection;
  BS_BOOL bEjectAfterBurn;
  __int32  nCopies;
  }
 
  I try to convert:
 
  char xxx[128] - c_char*128
  __int32  - c_int
  BS_BOOL - c_byte
 
  TCHAR  chBootImage[_MAX_PATH]; - ???
 
  But not work...
  how to solve it?
 
  Thank's, Luca
 

 _MAX_PATH is 260.
 TCHAR is normally a unicode (wide) or a ascii (ansi) character, depending
 on if _UNICODE is defined by the compiler.  Assuming ascii,
 TCHAR chBootImage[_MAX_PATH]  - c_char * 260
 
 Thomas

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Button and Key Event

2006-03-16 Thread lux
Thanks,
I think that the solution for my problem is only to use an
AcceleratorTable.
In this way I can capture the key pressed event
without the button problem

Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


Button and Key Event

2006-03-15 Thread lux
Hi,
how to enable EVT_CHAR or EVT_KEY_DOWN in a wxButton?

Thank's, Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


EVT_ICONIZE lost focus

2006-03-14 Thread lux
Hi,
I have a wxFrame with some TextCtrl,
if I minimize the Frame when normalize it
lost the Focus and I must click to give the focus to textCtrl again

How can resolve?

Thank's,
Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


wxGridCellEditor and EVT_CHAR

2005-12-19 Thread lux
Hi to all,
I need to handle EVT_CHAR in a wxGrid when wxCellEditor is activated,
but I don't know how.
Can anyone help me?

Thank's,
Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


wxGrid and Focus Event

2005-11-29 Thread lux
Hi,
How can I capture the EVT_SET_FOCUS on a wxGrid?

Tank's in advance
Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxGrid and Focus Event

2005-11-29 Thread lux
Can you try this code?

If you press only the TAB key
the focus go from the TextCtrl to the Grid (I suppose)
but onGridFocus in not called.

any idea?
Luca.


##

import wx
import wx.grid

app = wx.PySimpleApp()

f = wx.Frame(None, -1, )
p = wx.Panel(f, -1)
s = wx.BoxSizer(wx.VERTICAL)

t1 = wx.TextCtrl(p)
s.Add(t1)

g = wx.grid.Grid(p, -1)
g.CreateGrid(2, 2)
s.Add(g, 1, wx.EXPAND)

def onGridFocus(evt):
print onGridFocus
evt.Skip()

def onCellSelected(evt):
print onCellSelected
evt.Skip()

g.Bind(wx.grid.EVT_GRID_SELECT_CELL, onCellSelected)
g.Bind(wx.EVT_SET_FOCUS, onGridFocus)

p.SetSizer(s)
f.Show()

app.MainLoop()

##

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: wxGrid and Focus Event

2005-11-29 Thread lux
TANKS!!!
Now it work!!!

Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


python and VisualFox dbf

2005-11-15 Thread lux
Hi,
I've a dfb written in VisualFox,
I need to send a pack and reindex
but in odbc is not supported...

Anybody know how to do this?

TIA,
Luca

-- 
http://mail.python.org/mailman/listinfo/python-list


Stampare su stampante aghi

2005-09-22 Thread lux
Salve a tutti,
sono alle prese con delle stampe su
stampanti ad aghi...

Per stampare puro testo la soluzione piĆ¹ gettonata
sembra essere

f = open(LPT1:)
f.write(bla bla)
f.close()

devo dire che funziona benissimo, ma mi piacerebbe
essere slegato falla parallela (sempre meno frequente)
e inviare il puro testo da stampare scegliendo una delle
stampanti installate sulla macchina senza starmi a
preoccupare di come o dove sia configurata (locale, rete, usb, etc).

Come posso fare?

Grazie, Luca.

-- 
http://mail.python.org/mailman/listinfo/python-list


Enter as Tab in wxPython

2005-09-12 Thread lux
Hi,
how to modify the Enter key behavior
in order to be equal to the Tab Key.
I need navigate between the ctrl
only with the Enter Key.

Tanks, Luca

PS: sorry for my English

-- 
http://mail.python.org/mailman/listinfo/python-list


wxPython field validation

2005-07-20 Thread lux
Hi all,
I'm using wxPython and I need to block
the cursor (focus) in a TextCtrl until the field
value is valid.

I've look EVT_KILL_FOCUS but I can't stop the
focus beavoir (no focus to next field)

Any ideas?

Tanks a lot and sorry for my english.

-- 
http://mail.python.org/mailman/listinfo/python-list