File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,7 @@ This is a little similar implementation of `genpy` for uPy. In order to use ross
55## Features
66
77- [x] uPy files gen with publish availability
8- - [ ] uPy files gen with subscribe availability
9- - [ ] Actions
8+ - [x] uPy files gen with subscribe availability
109- [ ] Services
1110
1211## Installation
Original file line number Diff line number Diff line change @@ -50,6 +50,11 @@ def create_message(self):
5050 script_addr = self .addr .split ('/' )[0 ]
5151 script_name = self .addr .split ('/' )[1 ].split ('.' )[0 ]
5252
53+ #manage init file
54+ initpy = open ("{}/__init__.py" .format (script_addr ), 'a' )
55+ initpy .write ('from ._{} import {}\n ' .format (script_name , script_name ))
56+ initpy .close ()
57+
5358 #script created
5459 script = open ("{}/_{}.py" .format (script_addr ,script_name ), 'w' )
5560 #import input
You can’t perform that action at this time.
0 commit comments