Go to advanced search

by mmkw43
Sun Jun 06, 2021 3:15 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Re: Threads -- need better understanding

Thanks scruss. I wasn't familiar with Xorg at all but see that it is the linux backbone? of the GUI? Don't know anything about it or whether there is an issue seeing it around 20% on cpu usage as my tkinter script is running? There is always some sort of ongoing tkinter activity in the script. The s...
by mmkw43
Sat Jun 05, 2021 8:18 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Re: Threads -- need better understanding

Awesome ! -- then you know what I'm saying. Can I call you Fil for short? Yeah, me a ham early on (which I haven't messed with in years -- mostly idiots now) and going to the radio/tv repair shop to dig through their trash. Worked in radio a long time. Don't know if you remember Allied radio but act...
by mmkw43
Sat Jun 05, 2021 6:30 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Re: Threads -- need better understanding

Ok -- good to know. There is much going on, a lot of tkinter and a few loops that I can improve. Fact is, seeing top results I know the fast loop is the problem because I can slow it down and reduce cpu consumption dramatically. Haven't had the time today but was going to look at doing it RIGHT. The...
by mmkw43
Sat Jun 05, 2021 2:27 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Re: Threads -- need better understanding

But, here you may have a problem. If a compute intensive thread that never waits is running it may be a while before the kernel gets around to reading whatever inputs you have on your other threads. Your system will start to respond to input slowly and erratically. Yes, there are some very rare thi...
by mmkw43
Sat Jun 05, 2021 2:15 pm
Forum: Python
Topic: Relay stopped working after night
Replies: 12
Views: 387

Re: Relay stopped working after night

just some 2 cents maybe not relating to your issue but I always set the pullup resistor or put one in and always turn on a transistor that interfaces with a relay (with another pullup there). and generally opto isolate everything as well.
by mmkw43
Fri Jun 04, 2021 11:55 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Re: Threads -- need better understanding

So, even as fast as 100msec it's feasible to run a loop thread like I'm doing? It's working fine but is it good practice? Or should I be looking at multiprocessing instead? I just saw something that said it may be the best choice for events that are "cpu bound" and threads are best for I/O...
by mmkw43
Fri Jun 04, 2021 9:56 pm
Forum: Python
Topic: Threads -- need better understanding
Replies: 13
Views: 393

Threads -- need better understanding

I'm trying to go back and get a better grasp of what is really happening with my python script(s), especially with threading and how it interacts with the cpu. I plan on doing some experimenting tomorrow with some code and have been playing with my new toy, the TOP command. I also want to experiment...
by mmkw43
Fri May 28, 2021 4:36 pm
Forum: General discussion
Topic: Removable medium is inserted
Replies: 2
Views: 136

Re: Removable medium is inserted

and what the heck does "don't show available options for those media types? mean ? !

A: It doesn't make any sense at all and there is no documentation anywhere on explaining it

B: It's poor grammar. What "those media types" --- huh ?????
by mmkw43
Fri May 28, 2021 4:07 pm
Forum: General discussion
Topic: Removable medium is inserted
Replies: 2
Views: 136

Removable medium is inserted

Apparently there's no way to get rid of this popup screen when installing a USB drive? I tried pcmanfm preferences and unchecked all the volume management stuff but that doesn't do it.

Is there a way? -- thank you
by mmkw43
Mon May 24, 2021 6:38 pm
Forum: General discussion
Topic: Updated 20 minutes ago, desktop image won't leave
Replies: 2
Views: 163

Re: Updated 20 minutes ago, desktop image won't leave

this is crazy.
desktop preferences >
layout> no image
colour> black
ok

nothing.
just continues to show the default temple image.
by mmkw43
Mon May 24, 2021 6:34 pm
Forum: General discussion
Topic: Updated 20 minutes ago, desktop image won't leave
Replies: 2
Views: 163

Updated 20 minutes ago, desktop image won't leave

I have a recent download of RPI OS (3/4/2021) that I always use and updated it. Now for the first time it won't get rid of the desktop image. Of course, choosing no image and the color black but it doesn't make the change. Tried 4 or 5 times. FYI I'm using the RPI desktop download (without all the a...
by mmkw43
Wed May 19, 2021 2:44 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Re: Cython experiment

Yeah, I got into this bad habit early of putting sudo where it didn't belong. sometimes it solved a problem, other times not but just left it there (NOT a good idea I realize). I get sudo now but didn't for a long time actually. And I see that subprocess is overkill for some of the things I'm doing....
by mmkw43
Tue May 18, 2021 8:46 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Re: Cython experiment

also -- it always been my understanding you have to use subprocess to interact with terminal.

shows what I know.
cat /proc/cpuinfo is a command right?
by mmkw43
Tue May 18, 2021 5:13 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Re: Cython experiment

Well, finally ran into a video that makes it more understandable -- https://www.youtube.com/watch?v=2OgGqklYH8o&t=311s&ab_channel=Techlahoma What concerns me is the size of the C file it creates (although it's working fine). I think it's because for cython to run more efficiently (and make a...
by mmkw43
Tue May 18, 2021 2:14 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Re: Cython experiment

Well, I appreciate it but my latest endeavor is to understand what exactly is happening with cython. It works but I'm in the dark about what the 2 files exactly are that are created and if in fact, I have truly created a C module (mars) that would be more difficult to analyze, compared to python. Th...
by mmkw43
Mon May 17, 2021 11:54 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Re: Cython experiment

I'm just trying to deter people who don't write code for a living. Maybe I should post the entire script so you can tell me what a novice I am. I already know that -- perfection is not my goal. I'll never be Joe Bonamassa on guitar either. Actually, I'm rather proud of my desire to LEARN -- maybe no...
by mmkw43
Mon May 17, 2021 8:29 pm
Forum: Python
Topic: Cython experiment
Replies: 10
Views: 447

Cython experiment

Well, I tried something in an effort to conceal code at least a little for my python script by experimenting with cython, thinking that maybe I can make part of the code a module (written in C?) that I can import. I put a question mark after that because although I have it working, I'm really not su...
by mmkw43
Fri May 14, 2021 6:23 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

Ok. I have some ideas. I used pyarmor and on the smaller program I have, no issues at all but on the more elegant version of the same thing (with 2x the code), it crashed the script which has never happened at all. I'll end this thread with this but wonder if there are other choices for obfuscating ...
by mmkw43
Fri May 14, 2021 2:11 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

What are the basics of Cython in a few words? I know nothing about it other than some simple statements I read about "converting python to c" (although I'm sure it's not that simple) Does it offer more protection or worth learning about? And to answer, the one project has about 3K lines bu...
by mmkw43
Thu May 13, 2021 11:41 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

IF I go ahead and do a product with this, (it's a 2 part system connected with an RS485 link) I'll just send it out as a pyc file. I did do a spot of code that looks for the cpu number and if it isn't a match it shuts down and gave that file a weird name etc. I was thinking maybe I could put everyth...
by mmkw43
Thu May 13, 2021 4:00 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

mp3 files in a final product :) I had deleted my trash can icon and thank god I remembered that. in the business I'm in (or was), I know of 2 products using the pi. both use standard cases too, saving the dough on doing their own. btw, my "gripe" was finding out too late in the game that p...
by mmkw43
Wed May 12, 2021 8:29 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

I didn't know I was actually. "Sucks" has a very broad meaning. I wasn't being derogatory and you know it but I'm glad you had the chance to vent. Feel better? Anyway -- thanks for the help. I wasn't dissing python for cryin out loud. So let me ask something (for my own education) (serious...
by mmkw43
Wed May 12, 2021 5:39 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

If you read carefully, I wasn't being aggressive. ------ jeeeeze edit -- fact is, my perspective is about the entire "product" -- not writing some application for business or an internet tie in. but alas electronic products barely exist anymore so call me old fashioned in wanting to make i...
by mmkw43
Wed May 12, 2021 3:02 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

Well it's for an electronic product. What's the point in giving it away? I've had several products on the market in a specific industry that were all microcontroller based and the hard work I put into writing the code "belonged to me". No different from the recipe for Heinz 57. I tried pya...
by mmkw43
Tue May 11, 2021 8:42 pm
Forum: Python
Topic: Interpreter ?
Replies: 29
Views: 1908

Re: Interpreter ?

So what is the advantage of an interpreted language? You would think that the mindset would be to have more efficiency and not to the translation on the fly. ? I'm glad I took the time to learn python/tkinter (vb.net was my introduction to writing code) but I kinda wish I would have attempted C beca...

Go to advanced search