On 2006-03-08, luca72 [EMAIL PROTECTED] wrote:
Belive me for a person of my age and my background ( i'm a
physics, but at my time no computer was allowed) all that for
you is simple,
Believe me, it wasn't simple for us. We had to guess what you
were doing wrong since you wouldn't show us
Here is my code ; why after the readline the port close?
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
ser.bytesize =serial.EIGHTBITS
ser.setRTS(level = 0)
ser.setDTR(level = 0)
luca72 wrote:
Here is my code ; why after the readline the port close?
What is the line of code before the first one shown here?
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
def OnButton1Button(self, event):
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
ser.bytesize =serial.EIGHTBITS
ser.setRTS(level = 0)
ser.setDTR(level = 0)
On 2006-03-07, luca72 [EMAIL PROTECTED] wrote:
Here is my code; why after the readline the port close?
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
ser.bytesize =serial.EIGHTBITS
Grant Edwards wrote:
On 2006-03-07, luca72 [EMAIL PROTECTED] wrote:
Here is my code; why after the readline the port close?
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
ser.bytesize
On 2006-03-07, Steve Holden [EMAIL PROTECTED] wrote:
Here is my code; why after the readline the port close?
ser = serial.Serial(0)
ser.baudrate = 9600
ser.parity = serial.PARITY_ODD
ser.stopbits = serial.STOPBITS_TWO
ser.bytesize =serial.EIGHTBITS
Hello Grant and Hello Steve.
Pls. don't kill me, but if you try the code above written you see that
after the read the port close.
My question is only: why it close without the close command?
--
http://mail.python.org/mailman/listinfo/python-list
1)
Peter Hansen was asking you for the code AFTER the ser.readline() not
BEFORE!! the code you have originally posted here
2)
the best way how to examine if your code works is to try to write some
simplest code as possible first (not buttons, not GUI etc..., just a
simple code)
(all this
Ok you write that it close :Because the ser object is never used
after that point, so it
get's garbage collected and deleted.
But for example if i make one button with the same caracteristic of the
previous com port:
def OnButton1Button(self, event):
ser = serial.Serial(0)
Peter Hansen was asking you for the code AFTER the ser.readline()
not
BEFORE!! the code you have originally posted here
OK IS MY MISTAKE; EXCUSE.
I have read the example but if i ask is bucause i don't or maybe i
don't understand the example
Regaards
Luca
--
On 2006-03-07, luca72 [EMAIL PROTECTED] wrote:
Hello Grant and Hello Steve.
Pls. don't kill me, but if you try the code above written you see that
after the read the port close.
My question is only: why it close without the close command?
I've answered that question TWICE.
The ser object is
[luca]
Here is my code; why after the readline the port close?
ser = serial.Serial(0)
[...]
ser.readline()
Why after this the port close.
[Grant]
Because the ser object is never used after that point, so it
get's garbage collected and deleted.
[Steve]
On 2006-03-07, luca72 [EMAIL PROTECTED] wrote:
Ok you write that it close :Because the ser object is never
used after that point, so it get's garbage collected and
deleted.
Yes.
But for example if i make one button with the same caracteristic of the
previous com port:
def
Richie Hindle wrote:
A piece of that code has been chopped off by someone's newsreader - it's the
body of a method, and ser.readline() is the last line of that method.
I'm pretty sure that's true. Technically, however, it's still a guess,
though at this point one I'm sure we're all
On 2006-03-07, Peter Hansen [EMAIL PROTECTED] wrote:
Serial ports aren't trivial, and combining them with a GUI
program written by a rookie is a pretty big order. You can
learn enough to figure this out, but it will be lots of work
and a challenge. If you're up to it, please go read that
Dear All
Thanks for your help, and patience.
Now all works in the right mode.
Belive me for a person of my age and my background ( i'm a physics, but
at my time no computer was allowed) all that for you is simple, is not
for me.
So many Thanks and Regards
Luca
--
Hello
I have solve the problem of configuration with pyserial but i have
another question.
The serial port close every time i make the read and re-open when i do
i new write.
In my script there is not write close , why it close ?
Thaks Luca
--
On 2006-03-06, luca72 [EMAIL PROTECTED] wrote:
I have solve the problem of configuration with pyserial but i
have another question. The serial port close every time i make
the read and re-open when i do i new write.
I doubt it.
In my script there is not write close, why it close ?
How on
luca72 wrote:
I have solve the problem of configuration with pyserial but i have
another question.
The serial port close every time i make the read and re-open when i do
i new write.
Please describe what you are observing that makes you say that the port
is closing.
In my script there is
Hello here is a part of code, the values for settings comes from combo
box:
here i take the ATR of the smartcard inserted in the reader, and than i
store the read data in a textctrl.
Sniffing the data with serial port monitor i see that the answer is ok
but after the answer the port close, why?
On 2006-03-06, luca72 [EMAIL PROTECTED] wrote:
Hello here is a part of code,
No.
Wrong.
The part of code you posted tells us nothing. We can not
help you if you keep posting vague descriptions of what you
imagine is wrong and small, out-of-context chunks of irrelevant
code.
and than i store the read data in a textctrl.
That's got nothing to do with pyserial.
Ok i know but for this reason i put :
Another point is the textctrl: it store only the first byte and not
the
other why?, the byte are like 22 and all are readed
Luca wrote:
and than i store the read data in a textctrl.
That's got nothing to do with pyserial.
Ok i know but for this reason i put :
Another point is the textctrl: it store only the first byte and not
the
other why?, the byte are like 22 and all are readed
On 2006-03-06, Luca [EMAIL PROTECTED] wrote:
Another point is the textctrl: it store only the first byte
and not the other why?, the byte are like 22 and all are
readed
No clue. I don't know what textctrl is or what it's
supposed to do.
a = ser.readline()
a =
Grant and Steve,
I am wowed and amazed how supportive and helpful you (and other people
in this group as well of course) are.
Thanks.
(sorry for OT)
Petr Jakes
--
http://mail.python.org/mailman/listinfo/python-list
26 matches
Mail list logo