Code Monkey home page Code Monkey logo

Comments (4)

aaronnguyen avatar aaronnguyen commented on August 18, 2024

Could try to list all the devices in "/dev" then capture only /dev/sd* listings. (/dev/sda, /dev/sdb, /dev/sdc). But then after that validate that they are sd cards somehow.

Never ran into that issue before. let me see if I can replicate it.
And I'll test a few things out. Let me know if you come up with a solution and if we can add it.

from osid-python3.

mistrgrieve avatar mistrgrieve commented on August 18, 2024

from osid-python3.

aaronnguyen avatar aaronnguyen commented on August 18, 2024

listing all devices in /dev then looking for devices didn't seem very effective.
'sudo fdisk -l' did work for me though (l being lowercase L).
The backend should have started with the su crontab, so there shouldn't be any issues with root access. (hopefully)

on the snap side note, you can fork the code and port to whatever you want. I don't mind at all!
I have not heard of snap, just did a quick search, looks like scratch? Would love to see how that project turns out!

from osid-python3.

aaronnguyen avatar aaronnguyen commented on August 18, 2024

Note: found a solution in this question https://codereview.stackexchange.com/questions/152486/parsing-the-lsblk-output

using lsblk might be better, no root access needed. and can display just the disk names and size with the command "lsblk -d -o name,size -n". Will list the mmcblk0 (rpi disk) so will just have it ignore it.

from osid-python3.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.