Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: autostart python scripts in background (Windows10)
Post: RE: autostart python scripts in background (Window...

(Sep-30-2019, 11:18 PM)snippsat Wrote: Do not use os.system(),subprocess has replaced it in safer way a long time ago. Can force silent always using subprocess. import subprocess si = subprocess.S...
john36 General Coding Help 4 7,727 Oct-01-2019, 01:36 PM
    Thread: autostart python scripts in background (Windows10)
Post: RE: autostart python scripts in background (Window...

(Sep-30-2019, 03:21 PM)john36 Wrote: os.system('python connect_to_hortex_base_palette.py')I added C:/Users/OEM/Desktop/program/: os.system('python C:/Users/OEM/Desktop/program/connect_to_hortex_base...
john36 General Coding Help 4 7,727 Sep-30-2019, 08:34 PM
    Thread: autostart python scripts in background (Windows10)
Post: autostart python scripts in background (Windows10)

Hi, I have problem with autostart python scripts in Windows10: I made BAT file and put it to autostart folder, BAT file contens: @echo off "C:\Windows\py.exe" "C:\Users\OEM\Desktop\program\main_v4.p...
john36 General Coding Help 4 7,727 Sep-30-2019, 03:21 PM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-30-2019, 08:04 PM)Skaperen Wrote: good, version 3. so you started writing some parts before you realized the need to use bytes and the quick workaround is to convert strings to bytes. i've ha...
john36 Networking 18 9,508 Aug-01-2019, 07:54 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-27-2019, 12:53 AM)Skaperen Wrote: data in the source code needs to be put in quotes. use a type of quote different than any quotes that are part of the data. make the string be bytes type by ...
john36 Networking 18 9,508 Jul-30-2019, 06:20 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-25-2019, 08:06 AM)Gribouillis Wrote: I'm glad it works, but I still believe you're doing something that's not needed. First I don't see why you need to convert a string to bytes in the first pl...
john36 Networking 18 9,508 Jul-25-2019, 09:06 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

I solved my problem: def rawbytes(s): """Convert a string to raw bytes without encoding""" outlist = [] for cp in s: num = ord(cp) if num < 255: outlist.appe...
john36 Networking 18 9,508 Jul-25-2019, 07:03 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-24-2019, 11:05 AM)Gribouillis Wrote: What I see in the code is that you're sending the output of con_dat() through the socket labeler_datasend = con_dat(aa_labeler_frame) ... labeler_socket.sen...
john36 Networking 18 9,508 Jul-24-2019, 11:23 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-24-2019, 09:50 AM)Gribouillis Wrote: john36 Wrote:becose i didn't know yet how will be look like this variable, I will be have many different data \xab\xcd\xef\xgh...I understand that you can't...
john36 Networking 18 9,508 Jul-24-2019, 10:59 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

Sry but you don't understand my question: I have def routine, this routine return different string for example variable = '\x01\x81\xaa\x76\x00\x5d\x44\x00\x00\x00\x00\x57\x47\x5f\...' And in the nex...
john36 Networking 18 9,508 Jul-24-2019, 09:08 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-21-2019, 08:55 PM)john36 Wrote: (Jul-21-2019, 08:28 PM)Gribouillis Wrote: Why don't you write variable = b'\x01\x81\xaa\x76\x00\x5d\x44\x00\x00\x00\x00\x57\x47\x5f\...' labeler_socket.send(va...
john36 Networking 18 9,508 Jul-23-2019, 06:30 AM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-21-2019, 08:28 PM)Gribouillis Wrote: Why don't you write variable = b'\x01\x81\xaa\x76\x00\x5d\x44\x00\x00\x00\x00\x57\x47\x5f\...' labeler_socket.send(variable)What happens if you do this? tha...
john36 Networking 18 9,508 Jul-21-2019, 08:55 PM
    Thread: Send raw string via socket with out any changes
Post: RE: Send raw string via socket with out any change...

(Jul-21-2019, 08:26 PM)Gribouillis Wrote: Why don't you write variable = b'\x01\x81\xaa\x76\x00\x5d\x44\x00\x00\x00\x00\x57\x47\x5f\...'What happens if you do this? I tried: raw_data = '\x01\x81\xaa...
john36 Networking 18 9,508 Jul-21-2019, 08:40 PM
    Thread: Send raw string via socket with out any changes
Post: Send raw string via socket with out any changes

Hi, I have problem with sending raw string data via socket. I made communication between PC(python script) and labeler Markem Imaje. Labeler has RS232 and converter Ethernet/RS232 and i have to send r...
john36 Networking 18 9,508 Jul-21-2019, 08:18 PM

User Panel Messages

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