More Python2 migrations, patch from KA.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-21 00:04:37 +00:00
parent f86c833fe0
commit 76bad85642
11 changed files with 13 additions and 16 deletions

View File

@@ -104,7 +104,7 @@ class MyCellEditor(wxPyGridCellEditor):
elif key < 256 and key >= 0 and chr(key) in string.printable:
ch = chr(key)
if not evt.ShiftDown():
ch = string.lower(ch)
ch = ch.lower()
if ch is not None:
# Replace the text. Other option would be to append it.

View File

@@ -14,7 +14,7 @@ Have fun with it,
Harm van der Heijden (H.v.d.Heijden@phys.tue.nl)"""
import random,re,string
import random,re
from wxPython.wx import *
class WordFetcher:

View File

@@ -1,5 +1,4 @@
from wxPython.wx import *
import string, sys
class Test:
def __init__(self):

View File

@@ -3,7 +3,7 @@ Build a GUI Tree (wxWindows) from an XML file
using pyExpat
"""
import sys,string
import sys
from xml.parsers import pyexpat
from wxPython.wx import *
@@ -59,7 +59,7 @@ def EndElement( name ):
def CharacterData ( data ):
global NodeStack
if string.strip(data):
if data.strip():
app.tree.AppendItem(NodeStack[-1],data)

View File

@@ -1,5 +1,4 @@
from wxPython.wx import *
import string
class floatValidator(wxPyValidator):
@@ -24,7 +23,7 @@ class floatValidator(wxPyValidator):
if self.obj and self.attrName:
tc = wxPyTypeCast(self.GetWindow(), "wxTextCtrl")
text = tc.GetValue()
setattr(self.obj, self.attrName, string.atof(text))
setattr(self.obj, self.attrName, float(text))
return true

View File

@@ -20,7 +20,6 @@ Original comment follows below:
"""
from wxPython import wx
import string
# Not everybody will have Numeric, so let's be cool about it...
try: