[Tutor] Fwd: Problem wxPython

2006-02-28 Thread Prabhakar K
Hai to all,       I installed ActivePython-2.4.1-247-win32-ix86 and wxPython2.6-win32-ansi-2.6.2.1-py2 in my system. When i Run a wxPython example.. geeting an Errors   Traceback (most recent call last):  File "E:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 310, i

Re: [Tutor] Telnet to cisco device

2006-02-28 Thread STREET Gideon (SPARQ)
Thanks all for the replies. I got tcpwatch up and running and where the program was hanging is actually a page prompt, so now I just need to get the script to pass a space whenever that prompt comes up I'm surprised it worked and got to that point (that's a testament to the online tutorials).

Re: [Tutor] Unexpected Behavior in unittest

2006-02-28 Thread Danny Yoo
> I wish it were that simple. 'test3.py' is the name of the file > containing the test case class. I left the invocation out of my output > excerpt. It should look like this: Hi Barry, Ok. But still go back and make sure you're running the right file. The error message says that: > Trace

Re: [Tutor] Unexpected Behavior in unittest

2006-02-28 Thread Carroll, Barry
Danny: I wish it were that simple. 'test3.py' is the name of the file containing the test case class. I left the invocation out of my output excerpt. It should look like this: J:\My Documents\Projects\Mongoose\symgen\test3.py F =

Re: [Tutor] Unexpected Behavior in unittest

2006-02-28 Thread Danny Yoo
> In this case, the assignment to lg.cs failed. > >> > F > == > FAIL: test_cs (__main__.cs_tryout) > -- > Traceback (most recent call last): >

[Tutor] Unexpected Behavior in unittest

2006-02-28 Thread Carroll, Barry
Greetings: This is a fairly long-winded question. I beg your indulgence. I am writing unit tests for our bar code scanner test software, and I have encountered some results that I cannot explain nor get around. Here is the scenario. Our program implements a generator class for creating 'la

Re: [Tutor] switch-case in python

2006-02-28 Thread Ewald Ertl
Hi! Have a look to the Python-Cookbook at ActiveState. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/410692 This is a recipe for simulating a switch. HTH Ewald 铁石 wrote: > I know this may seem to be stupid. > but as I found that there's no > switch-case control flow in python, > a

Re: [Tutor] switch-case in python

2006-02-28 Thread Hugo González Monteverde
Yep, it is an often mentioned thing. Using: --- if condition: action elif condition2: action2 else: defaultaction --- is pythonic. Also using a dictionary and indexing using the case is very fast and useful when there are many options. This approach is described here

Re: [Tutor] switch-case in python

2006-02-28 Thread Bob Gailer
铁石 wrote: > I know this may seem to be stupid. > but as I found that there's no > switch-case control flow in python, > an I just can't remember( or know) any > method to make such a control flow. > if cond1: stmts elif cond2: stmts ... else: stmts No need for break. > > > --

[Tutor] switch-case in python

2006-02-28 Thread 铁石
I know this may seem to be stupid. but as I found that there's no switch-case control flow in python, an I just can't remember( or know) any method to make such a control flow. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/

Re: [Tutor] Telnet to cisco device

2006-02-28 Thread Python
On Tue, 2006-02-28 at 16:36 +1000, STREET Gideon (SPARQ) wrote: > tn.read_until('Username: ') #expected prompt after telnetting to the > router > tn.write(user + '\r\n') #hopefully write username and pass character > return > Sending both \r and \n may be confusing things. I'd recommend using t

Re: [Tutor] Telnet to cisco device

2006-02-28 Thread David Heiser
Title: Message   The following works with the Cisco switch that I have available. Cisco 4006 with CatOS 6.2. It may not work with your model/OS or your switch may be configured differently. For instance, the default prompt terminates with "(enable)" so I used "tn.read_until(')')" instead of

Re: [Tutor] RDT server for excel

2006-02-28 Thread János Juhász
Hi Danny, Hi Bob, thanks your help. RTD is really very win32 specific. The long name is RealTimeData service, that is implemented as COM service. It retrieves real-time data from a program that supports COM automation. With this service an excel cell can hold the answer of this service called by