pyserial and file open conflict?

P

p.wallstedt

Hi all!

I have a small but rather annoying problem with pyserial. I want to
open a file on disk for reading and then open a com-port, write lines
from the file to the port and then read something back and compare it
to the next line in the file. Should be simple. And it is, apart from
the fact that the file seems to be doubled ...? Or it loops through
the file twice.

If I exclude the "import serial" it works.

Any ideas?

thanks
Peter
 
H

Henrique Dante de Almeida

Em Thu, 15 May 2008 08:03:40 -0700, p.wallstedt escreveu:
Hi all!

I have a small but rather annoying problem with pyserial. I want to open
a file on disk for reading and then open a com-port, write lines from
the file to the port and then read something back and compare it to the
next line in the file. Should be simple. And it is, apart from the fact
that the file seems to be doubled ...? Or it loops through the file
twice.

If I exclude the "import serial" it works.

Any ideas?

thanks
Peter

Are you sure you need to reinvent the wheel ? For example, pppd has the
"chat" application:

http://www.hmug.org/man/8/chat.php
 
P

Peter

Your problem is in line 117 of your program.

--
Grant Edwards                   grante             Yow! Hmmm ... an arrogant
                                  at               bouquet with a subtle
                               visi.com            suggestion of POLYVINYL
                                                   CHLORIDE ...

Do you have to much time?
 
P

Peter

"Do you have a sense of irony?" he asked, already knowing the answer.

Grant - "Do you have a sence of appropriateness"? he asked, already
knowing the answer. I had no idea this is a comedy club. I might argue
that my reply was also some sort of humor, but you clearly didn't see
it that way. Maybe you should try living according to the rules you
make for others?

Diez - Did you mean the section which covers Asperger's Syndrome?

I'm just being a hacker here guys ... according to the guidelines.

It's amazing how such a simple question gets derailed immediately.
Without any light on the subject whatsoever.
 
H

Henrique Dante de Almeida

Grant - "Do you have a sence of appropriateness"? he asked, already
knowing the answer. I had no idea this is a comedy club. I might argue
that my reply was also some sort of humor, but you clearly didn't see
it that way. Maybe you should try living according to the rules you
make for others?

Diez - Did you mean the section which covers Asperger's Syndrome?

I'm just being a hacker here guys ... according to the guidelines.

It's amazing how such a simple question gets derailed immediately.
Without any light on the subject   whatsoever.

Try asking about your problem again. Think before writing. Read your
text after you write it. Tell what you are trying to do, how you are
trying to do and what's the buggy behaviour. Copy the relevant part of
your source code here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top