Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

207
Views
con open(image.png,"rb") como f: en mecanografiado?

¿Cómo abrir archivos png como método: with open(path+im,"rb") as f: de python pero en mecanografiado? Si tengo una carpeta que contiene algunos png y quiero leerlos y convertirlos a base 64 en python, uso ese método, pero ¿cuál es el método correctivo en mecanografiado? ¿Puede alguien ayudarme por favor?

Tengo este código en python:

 def image_integrity(): list_of_sha256 = [] path = "./nft_test/" for im in os.listdir(path): with open(path+im,"rb") as f: f = base64.b64encode(f.read()) # read entire file as bytes h = hashlib.new("sha256") h.update(f) result = h.digest() result = base64.b64encode(result).decode("utf-8") print(result) list_of_sha256.append(result) return list_of_sha256

y quiero reescribirlo en mecanografiado.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

parece que quieres leer desde dir.

 fs.readFile( path.resolve(__dirname, './data.txt' ), 'utf-8', function(err, buf) { var data= buf.toString(); console.log('load', 'OK'.green); });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!