On 03/23/2013 12:08 AM, Robert Sjoblom wrote:
Hi list. I'll preface this by saying that I am very grateful for all
> of you, and thank you in advance to anyone that answers.
>
> I'm currently working on a roulette simulator, because it seemed like
> fun. I found out I needed a way to compare tw
>You can use bytes() function:
bytes('%d' % 3, 'utf-8')
>b'3'
>-m
thanks this has solved everything. can i ask if this is an issue only in python
3 where sockets cant send strings? the docs state the argument is a string, but
i believe that was for 2.7. I knew nothing about b'' or bytes
Hi list. I'll preface this by saying that I am very grateful for all
of you, and thank you in advance to anyone that answers.
I'm currently working on a roulette simulator, because it seemed like
fun. I found out I needed a way to compare two different outcomes, and
it was suggested to me that I s
On 03/22/2013 11:29 PM, Lolo Lolo wrote:
using a socket im trying to send a message between connections. it was a string and my python
complained:
> "TypeError: must be bytes or buffer, not str" .. so i put a b infront
of the string. now this works fine but the problem is after recieving
this
using a socket im trying to send a message between connections. it was a string
and my python complained:
"TypeError: must be bytes or buffer, not str" .. so i put a b infront of the
string. now this works fine but the problem is after recieving this message, i
need to send it back with an int
On 23/03/13 12:48, Phil wrote:
Just out of curiosity how can a beep sound be generated?
My interest in this came about because echo -e '\a' no longer works. Also print
'\a' doesn't work, presumably for the same reason. The following is also mute:
import Tkinter
Tkinter.Tk().bell()
Print '\a',
Just out of curiosity how can a beep sound be generated?
My interest in this came about because echo -e '\a' no longer works.
Also print '\a' doesn't work, presumably for the same reason. The
following is also mute:
import Tkinter
Tkinter.Tk().bell()
Print '\a', under Idle, causes a bell ico
On 03/22/2013 05:02 AM, miguel.gua...@hushmail.com wrote:
Greetings all!
>
>
> My name is Miguel Guasch, I'm a software tester who's trying to
> slowly get into automation, and eventually (in a couple of years)
> into development. For that, I need to learn. At the moment I'm
> studying computer
On 3/22/2013 5:02 AM, miguel.gua...@hushmail.com wrote:
Greetings all!
Hi.
I decided to learn python as a side project, so
I could get my feet wet with OOP and start actually being
productive. I understand the basics of OOP thanks to a class I took
about object modelling and design (UML on Ente
Greetings,
: I have the following data points.
: data = [1,2,0,9,0,1,4]
: I like to store in an array and print the odd-indexed points, i.e. 2, 9,1
: (considering index starts at 0)
:
: I have written the following code which is not running:
:
: import math
:
: number_list = [1,2,0,
On Fri, Mar 22, 2013 at 6:07 PM, Arijit Ukil wrote:
> I have the following data points.
> data = [1,2,0,9,0,1,4]
> I like to store in an array and print the odd-indexed points, i.e. 2, 9,1
> (considering index starts at 0)
>
> *I have written the following code which is** not **running:*
>
> impo
Please use a meaningful subject.
On 22.03.2013 13:37, Arijit Ukil wrote:
I have the following data points.
data = [1,2,0,9,0,1,4]
I like to store in an array and print the odd-indexed points, i.e. 2, 9,1
(considering index starts at 0)
You can simply slice your list:
>>> data = [1, 2, 0, 9, 0
I have the following data points.
data = [1,2,0,9,0,1,4]
I like to store in an array and print the odd-indexed points, i.e. 2, 9,1
(considering index starts at 0)
I have written the following code which is not running:
import math
number_list = [1,2,0,9,0,1,4]
number_list_1 = []
for k in range
Greetings all!
My name is Miguel Guasch, I'm a software tester who's trying to
slowly get into automation, and eventually (in a couple of years)
into development. For that, I need to learn. At the moment I'm
studying computer engineering in the evenings, and we do a lot of
work in C and assem
On 22/03/13 07:24, Arijit Ukil wrote:
f = open ("digi_2.txt", "r+")
lines = f.readlines()
for line in lines:
number_list = []
for number in line.split(','):
number_list.append(float(number))
s_data = []
for i in range(len(number_list)):
You hardly ever need to do this, its
Hi Arijit,
I have modified your program a bit and it is working fine for me. Values
greater than 5 are being printed. Here is the code:
f = open ("D:\\digi_2.txt", "r+") lines = f.readlines() number_list = [] for
line in lines: print line for number in line.split(','):
Hi,
I have another small problem. Pls help.
I have written the following code:
f = open ("digi_2.txt", "r+")
lines = f.readlines()
for line in lines:
number_list = []
for number in line.split(','):
number_list.append(float(number))
s_data = []
for i in range(len(number_list)):
17 matches
Mail list logo