Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: help with threading module and passing global variables
Post: help with threading module and passing global vari...

Hi I'm having a big trouble to get this to work. I have a function that I want to put in a thread (or multiprocess). This function requires 3 variables. One of the variables (var_1) is static and ...
ricardons General Coding Help 1 7,837 Feb-21-2019, 12:34 PM
    Thread: populate list with images and be able to select them
Post: populate list with images and be able to select th...

Ricardos 11 minutes ago Hi I'm relatively new to pypt5 and some help in the direction to take is appreciated. I want to do something like that shown in the following image [Image: https://i.ibb.co/...
ricardons GUI 0 2,127 Jan-11-2019, 03:45 PM
    Thread: read from txt file and get variables
Post: RE: read from txt file and get variables

how to I open the file how do i read the line by line? thanks
ricardons General Coding Help 4 3,383 Mar-16-2018, 09:25 AM
    Thread: read from txt file and get variables
Post: read from txt file and get variables

hi. i'm newbie in python and need some help I have a txt file like with a structure like that below ####inputs ###bla-bla-bla xpto = 2 zzz = 10.25 name = Jonh ### interval = 2 .... #####How can I...
ricardons General Coding Help 4 3,383 Mar-15-2018, 09:33 PM
    Thread: name a thread defined from a class
Post: RE: name a thread defined from a class

no solutions?
ricardons General Coding Help 1 2,381 Mar-10-2018, 10:59 PM
    Thread: name a thread defined from a class
Post: name a thread defined from a class

hi i have a class using a thread as object how can i give him a name. it will help the debugging in pycharm temp.py class WTemp(threading.Thread): def __init__(self, sleep): threading....
ricardons General Coding Help 1 2,381 Mar-10-2018, 11:05 AM
    Thread: Threads and Event
Post: Threads and Event

this is not working I don't understand this threading.Event what i am doing wrong? import threading import numpy as np from time import sleep def read(): event_rd.wait() #should b...
ricardons Data Science 1 2,998 Mar-08-2018, 04:22 PM
    Thread: dictionaries
Post: RE: dictionaries

thanks and if it is inside a class class NextionApp: def __init__(self): pages = [ {'id': '0', 'name': 'credits', 'components': [ {'id': '0', 't...
ricardons General Coding Help 5 3,574 Mar-07-2018, 11:07 AM
    Thread: dictionaries
Post: dictionaries

Hi I'm struggling with this variable that i think is a dictionary This is what i have page = [ {'id': 1, 'name': 'initial', 'components': [ {'id': 1, 'type': 'button', 'name': 'bt...
ricardons General Coding Help 5 3,574 Mar-07-2018, 10:33 AM
    Thread: Function to Continuasly monitor serial port and control other functions
Post: RE: Function to Continuasly monitor serial port an...

(Mar-03-2018, 09:33 PM)marsokod Wrote: You may want to use a thread or a process depending on what your function1 and function2 are doing. You can either start them manually, use a library like APSc...
ricardons General Coding Help 10 8,126 Mar-04-2018, 07:41 PM
    Thread: Function to Continuasly monitor serial port and control other functions
Post: RE: Function to Continuasly monitor serial port an...

(Mar-03-2018, 11:08 PM)marsokod Wrote: (Mar-03-2018, 10:16 PM)ricardons Wrote: Function1() acquires sensor data and show it on lcd Function2() is the same as 1 but also writes the data to a text f...
ricardons General Coding Help 10 8,126 Mar-04-2018, 12:08 AM
    Thread: Function to Continuasly monitor serial port and control other functions
Post: RE: Function to Continuasly monitor serial port an...

(Mar-03-2018, 09:08 PM)Larz60+ Wrote: what is the device that you are using, raspberry pi, arduino? I'm thinking there must be a way to trigger an interrupt (event in python) when there is a charate...
ricardons General Coding Help 10 8,126 Mar-03-2018, 10:16 PM
    Thread: Function to Continuasly monitor serial port and control other functions
Post: Function to Continuasly monitor serial port and co...

Hi I need to built a pythonfile.py that starts to do a task (monitor at all time a serial port) And when a certain condition is true(receive a certain byte in serial) start/stop certain functions tha...
ricardons General Coding Help 10 8,126 Mar-03-2018, 08:33 PM
    Thread: get the content of the byte as string
Post: add a \ in the begining of a string

if i have a='x02' how can i make b='\x02' if i do b="\"+ a i have an error SyntaxError: EOL while scanning string literal if i do b="\\"+a print(b) b='\\x02' which has \\ insted of \
ricardons General Coding Help 5 3,670 Mar-02-2018, 02:41 PM
    Thread: get the content of the byte as string
Post: add a \ in the begining of a string

if i have a='x02' how can i make b='\x02' if i do b="\"+ a i have an error SyntaxError: EOL while scanning string literal if i do b="\\"+a print(b) b='\\x02' which has \\ instead of \ if i do ...
ricardons General Coding Help 5 3,670 Mar-02-2018, 02:34 PM
    Thread: get the content of the byte as string
Post: RE: get the content of the byte as string

thanks the str() was what i was looking for
ricardons General Coding Help 5 3,670 Mar-02-2018, 12:11 PM
    Thread: get the content of the byte as string
Post: get the content of the byte as string

hi i want to transform b'p107\xff\xff\xff'i.e a byte into 'p107\xff\xff\xff'i.e a string how is it done
ricardons General Coding Help 5 3,670 Mar-02-2018, 11:49 AM
    Thread: portion of the bytes to string
Post: portion of the bytes to string

Hi, I'm not a programing guy and i have some difficulty doing something that i imagine is very simple for most of you I have some bytes (encode as latin-1) like b'f\x01\xff\xff\xff' ...
ricardons General Coding Help 1 2,609 Mar-02-2018, 09:52 AM
    Thread: serial communication write(comand) and read(result)
Post: serial communication write(comand) and read(result...

Hi maybe someone could have a look at my code or suggest a better one (or another place to look for) I need to do serial communication with a device: write to device and listen to what it is saying...
ricardons General Coding Help 1 2,900 Mar-01-2018, 03:56 PM
    Thread: serial write can't do it myself
Post: RE: serial write can't do it myself

thanks I will have a look
ricardons General Coding Help 4 4,371 Feb-27-2018, 10:10 AM

User Panel Messages

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