473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

IpAddrCtrl.SetValue() problems

rob
Hello! :)

I'm relatively new to python so bear with me. I have run into a
problem with IPAddrCtrl and can't seem to find any info on google etc.
Here is a code snippet from my app and the error. I just want to set
a default value in the IP address field from a variable read from a
config file is all...

CODE:
(just the important bits)
NOTE: I changed the 2nd import a little to make it more ovbious that I
was using masked.IPAddrCtrl in the code.
-----------
#from wx.lib.maskededit import IpAddrCtrl ## old import format
import wx.lib.masked as masked

self.ip = masked.IpAddrCtrl(self, -1, style = wx.TE_PROCESS_TAB)
self.ip.SetValue(config.Get("ipaddress"))

-----------

ERROR:
Traceback (most recent call last):
File "mydlg.pyo", line 787, in IPAddrDialog
File "mydlg.pyo", line 240, in __init__
File "wx\lib\masked\ipaddrctrl.pyo", line 148, in SetValue
NameError: global name 'types' is not defined

Oh and I'm using wxpython 2.5.2.8u and Python 2.3.4. I did have this
working with the previous version of wxpython (2.5.1.5u) and I have
changed the imports accordingly (I think). Can anyone help me out
with this as I have been stuck on this for a few days now.

Thanks

-Rob
Jul 18 '05 #1
2 2324
rob wrote:
I'm relatively new to python so bear with me. I have run into a
problem with IPAddrCtrl and can't seem to find any info on google etc.
IPAddrCtrl is part of wxPython. wxPython has its own mailing list,
where you will generally get more, better, or faster responses
than if you ask here.
ERROR:
Traceback (most recent call last):
File "mydlg.pyo", line 787, in IPAddrDialog
File "mydlg.pyo", line 240, in __init__
File "wx\lib\masked\ipaddrctrl.pyo", line 148, in SetValue
NameError: global name 'types' is not defined


"types" is a module in the Python standard library. Looking
at the source for ipaddrctrl, in \python23\lib\site-packages\
wx\lib\masked\ipaddrctrl.py, you can see that line 148
tries to use items from that module, but the module has
never been imported!

This is a bug in wxPython. Please report it in the bug tracker at
http://sourceforge.net/tracker/?grou...63&atid=109863 .

-Peter
Jul 18 '05 #2
rob
Thanks for the reply. I'll try the wxpython mailing list.

-Rob

<SNIP>
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James S | last post by:
Hi, Basically I've been fighting with this code for a few days now and can't seem to work around this problem. Included is the output, the program I use to get this error and the source code for...
9
by: Lawrence Oluyede | last post by:
I have a list of strings and i'd like to build up an enum from them... is there a way to do that? Thanks in advance. -- Lawrence "Rhymes" Oluyede http://loluyede.blogspot.com
1
by: Michael | last post by:
Hello I have a problem. The following program throws a "0" instead of a "25". I´m from the JAVA world, and in JAVA the output is "25" Hope, anybody can help me Thanks .. class Content
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
15
by: Charles Law | last post by:
I have adapted the following code from the MSDN help for PropertyInfo SetValue. In the original code, the structure MyStructure is defined as a class MyProperty, and it works as expected. There is...
3
by: blackno666 | last post by:
Hello, I am new to Python/wxPython and am experiencing first problems. I have a dialog which includes a SpinCtrl and a Slider. I want the Slider to affect the SpinCtrl and vice versa...
2
by: David W. Fenton | last post by:
I think at various times we've all encountered this problem: A subform is on a main form. From the code of the main form we refer to some property of/control on the child form thus: ...
1
by: Mario Lacunza | last post by:
--------- Mensaje reenviado -------- De: Mario Lacunza <mario.lacunza@gmail.com> Para: Lista Python Ing <python-list@python.org> Asunto: Problems with PyGridTableBase Fecha: Sat, 09 Sep 2006...
3
by: no1zson | last post by:
I have been working on this application for weeks now, it is almost finished, but I am getting errors that I am unable to work through. Can someone look at my code and see if anything stands out...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.