How to delete the project after updated the latest pymakr version?
-
Hi, i am using the latest version of pymakr plugin with the "upload" button and "download" button. May i know how can i delete the project file inside the pytrack device?
-
@MJ On my Pycom.gpy I imported os, took a look at the directory, then os.remove('FILE NAME')
>>> import os >>> os.listdir() ['sys', 'lib', 'cert', 'boot.py', '%1', 'test2.py', 'project.pymakr'] >>> os.remove('test2.py') >>> os.listdir() ['sys', 'lib', 'cert', 'boot.py', '%1', 'project.pymakr'] >>>
-
@mdnncl01
this was only sample how to go.
You can implement this simple operation self, this is not really problem for abandon project ;-)
If you do not know how to do this then google is your friend
https://stackoverflow.com/a/20530049/3114457
-
@livius the problem is that shutil.rmtree contains the os.walk attribute that is not supported by our devices
Traceback (most recent call last):
File "<stdin>", line 16, in <module>
File "firmware/lib/shutil.py", line 9, in rmtree
AttributeError: 'module' object has no attribute 'walk'
-
@mdnncl01
try something like this:
https://stackoverflow.com/a/2656408/3114457
-
hello guys,
for me it is absolutely essential to understand how to delete a folder from the program with all the subfolders and files; therefore recursive deletion of a specific folder. I tried in every way but nothing, unfortunately shutil.rmtree does not work and it is absurd for me to abandon a project with these devices for this reason. From the program I have to delete only one folder /flash/myFolder. Please help me.
-
You can also delete individual files from the REPL:
import os os.unlink('file.py')
you can also specify the full path:
os.unlink('/flash/lib/old_lib.py')
-
Hi,
There is currently no way to manually delete a file via pymakr. You can either connect to your device via FTP which will allow you to delete files, or format the device by running:
import os
os.mkfs('/flash')If, for what ever reason, your device is stuck and you cannot get to the REPL please follow the instructions found here https://docs.pycom.io/chapter/toolsandfeatures/bootmodes.html to safe boot into the "factory firmware"
-
Hi!!!!
Good afternoon MJ
I Think you have to Delete /Format flask disk in Micropython its right
Go ahed in terminal
import os
os.mkfs('/flah')run that command...
once run that command format your flask disk like delete all files from your Micropython(Lopy/Wipy) not delete files in your SD card.
-
@mj Hello, I have the same question using ATOM