Re: [Tutor] dbus.Array to string

2013-08-11 Thread Steven D'Aprano
On 12/08/13 11:40, eryksun wrote: On Sun, Aug 11, 2013 at 9:14 PM, Amit Saha wrote: import dbus ssid=dbus.Array([dbus.Byte(66), dbus.Byte(105), dbus.Byte(103), dbus.Byte(80), dbus.Byte(111), dbus.Byte(110), dbus.Byte(100), dbus.Byte(54), dbus.Byte(55), dbus.Byte(57), dbus.Byte(68), dbus.Byte(5

Re: [Tutor] dbus.Array to string

2013-08-11 Thread Steven D'Aprano
On 12/08/13 08:53, Amit Saha wrote: Hello all, The other day, I had to convert a dbus.Array [1] object to a string. I found a way to do it, but I am not sure if that is the best way. Does the Array object not have a "toString" method? Or similar? What do you get when you call str() or repr()

Re: [Tutor] Beginner question

2013-08-11 Thread Alan Gauld
On 10/08/13 04:30, eschneide...@comcast.net wrote: I've been learning python from the website 'inventwithpython.com', and I'm on a chapter that covers the following code: import random import time def displayIntro(): print('You are in a land full of dragons. In front of you,') print('you

[Tutor] Python Programming for the absolute beginner 3e, Ch3 Challenge 4

2013-08-11 Thread John Feleppa
Thanks for getting back to me... I am using Python 3.3.2. The challenge is as follows: # Chapter 3 Challenge 4 # # Write the psudocode for a program where the player and the computer # trade places in the number guessing game. That is, the player picks a # random number between 1 and 100 that t

[Tutor] Python and Web

2013-08-11 Thread Engineering
Dear All After a lot of struggling for weeks , I can read the serial port readings in my web page. Below is the code #!c:\Python27\Python.exe import cgi, cgitb; import sys, serial ,time cgitb.enable() ser = serial.Serial('COM27', 9600) numOfLines = 0 print "Content-type:text/html\n\n"

[Tutor] Beginner question

2013-08-11 Thread eschneider92
I've been learning python from the website 'inventwithpython.com', and I'm on a chapter that covers the following code: import random import time def displayIntro(): print('You are in a land full of dragons. In front of you,') print('you see two caves. In one cave, the dragon is friendly')

[Tutor] Python Arduino Web Page

2013-08-11 Thread Engineering
I have written the following code in Python for my Arduino #!c:\Python27\Python.exe import cgi, cgitb; import sys, serial cgitb.enable() ser = serial.Serial('COM27', 9600) myvar = ser.readline() print "Content-type:text/html\n\n" print """ Real Time Temperature window.o

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-11 Thread Alan Gauld
On 11/08/13 17:05, Alan Gauld wrote: this sounds like its just a spinning eggshell erm, make that egg-timer... auto spell correction strikes again! -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tu

Re: [Tutor] How to access a method defined in one class from another class (which is a thread) in Python3?

2013-08-11 Thread Alan Gauld
On 09/08/13 16:50, SM wrote: Sorry I only just picked this up. (ex: self.tab_fw = QtGui.QWidget(), self.tab_ann = QtGui.QWidget(), etc), its own textEdit window and its own progress bar widget. All the tabs are defined within this single class - they are not instances of the class, as the tabs