Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Serial communication with a board
Post: RE: Serial communication with a board

Thanks a lot for the reply! Unofrtunately still don't work, I had tried to insert the parity paramenter on my project but without success..... from binascii import unhexlify import serial stringa ...
Bokka General Coding Help 2 5,307 Dec-07-2017, 07:34 AM
    Thread: Serial communication with a board
Post: Serial communication with a board

Hello! I have to write a simple program that send a hex string to an electronic instrument through the COM port of Pc and read the response. I had wrote that code: from binascii import unhexlify ...
Bokka General Coding Help 2 5,307 Dec-06-2017, 02:42 PM
    Thread: Async server/client
Post: RE: Async server/client

Ok, thanks a lot!
Bokka General Coding Help 2 3,840 May-29-2017, 03:09 PM
    Thread: Async server/client
Post: Async server/client

Hello! I have that 2 small programs 1 for server and 1 for client: Server: import socket serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serversocket.bind(('localhost', 8089)) ser...
Bokka General Coding Help 2 3,840 May-29-2017, 10:08 AM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

You are my hero! Thanks a lot!
Bokka General Coding Help 15 8,271 May-23-2017, 12:59 PM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

(May-23-2017, 12:12 PM)buran Wrote: 0E9F or CE9F as you claimed in previous posts? I have correct the code now. Result must be CE9F without "0x"
Bokka General Coding Help 15 8,271 May-23-2017, 12:14 PM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

FINALLY!!!! WITH THAT CODE: def crc16(data, bits=8):     crc = 0xFFFF     for op, code in zip(data[0::2], data[1::2]):         crc = crc ^ int(op+code, 16)         for bit in range(0, bits):         ...
Bokka General Coding Help 15 8,271 May-23-2017, 12:09 PM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

....and I can't understand why.....
Bokka General Coding Help 15 8,271 May-23-2017, 09:50 AM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

(May-23-2017, 07:49 AM)buran Wrote: do you NEED to write your own function? why not check available packages on PyPi. It look like at least 3 packages provide crc16 implementation Yes, I prefer to h...
Bokka General Coding Help 15 8,271 May-23-2017, 07:59 AM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

(May-22-2017, 11:59 AM)ichabod801 Wrote: I'm not getting a syntax error. I am getting a type error, but that may be because I don't understand what your data looks like. Please rerun it with a smal...
Bokka General Coding Help 15 8,271 May-23-2017, 07:46 AM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

I have that code, but I get a generic "Syntax error", I can't understand where I wrong... def calc(data):        crc_table=[0x0000,0xC0C1,0xC181,0x0140,0xC301,0x03C0,0x0280,0xC241,0xC601,0x06C0,0x07...
Bokka General Coding Help 15 8,271 May-22-2017, 08:22 AM
    Thread: Please help me to convert a function from vb to python
Post: RE: Please help me to convert a function from vb t...

(May-18-2017, 03:03 PM)micseydel Wrote: You're probably going to have a hard time getting someone to do that for you. If you give it a try, we'd be enthusiastic to help you learn Python, though. You...
Bokka General Coding Help 15 8,271 May-18-2017, 03:06 PM
    Thread: Please help me to convert a function from vb to python
Post: Please help me to convert a function from vb to py...

Hello everyone! So far I have always programmed with visual basic, but I happened to have to convert my code into python. I would need if somebody can convert this function from vb to python (2.7): ...
Bokka General Coding Help 15 8,271 May-18-2017, 02:07 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020