Closed pvhil closed 2 years ago
Thanks for the PR. I'm curious to which other boards you have this code. I did some digging and I think a better way to handle the parsing would be to do something like this:
f = open(duckyScriptPath,"r",encoding='utf-8')
previousLine = ""
for line in f:
line = line.rstrip()
print(line)`
or if that is too much memory:
line = f.readline()
while line:
line = f.readline().rstrip()
print(line)
If you could update the PR with this change, I should be able to get it merged in soon. Thanks.
I love to use the trinket M0 because it fits perfectly in a usb drive.
Will have a look later. Thanks :)
ok that should work
Thanks for the changes. I'm giving a talk at BSidesIowa next month. Would you mind if I mentioned your trinket port/fork? Thanks.
Wow Thats cool! Yeah I do not mind you can mention it.
Hi again, Im just wondering if theres a video of your talk at bsidesiowa? Would love to watch it :)
It was recorded. The BSidesIowa people said the videos should be up on their YouTube channel in the next few weeks.
Hi! First of all, I love this project.
But I had some memory problems with some smaller circuitpython boards and biig payload files.
Then i saw this code below:
It is opening the file and it is saving it as the variable f, then its making a list from f into duckyScript variable. I thought because of creating the list, it is using double the memory, so i thought about a method without creating a list that should reduce memory use.
It is directly reading from the file (f)