gvalkov/tailon-legacy

does the file __main__.py have been used

zhangchengtest opened this issue · 6 comments

does the file main.py have been used

Hello @zhangchengtest,

Can you be a bit more specific? It doesn't have to be used, but it makes it easier to call tailon as a module, i.e:

python -m tailon <tailon args>

@gvalkov thanks a lot for your answer, and I did not find the method "main()" in the main.py, could you give me a hint? and is it ok to write 'from . main import main' in main.py, i am very confused with it.

Since version 0.6.0 there is no longer a main.main() function, because tailon provides two executable scripts - tailon and wtee that share the same frontend and backend code (see entry_points in setup.py). When you run tailon, you execute main.main_tailon and when you run wtee, you execute main.main_wtee.

I mean this file main.py , is it ok to write 'from . main import main' ? and the method main() not exist, but in main.py, it execute main()

Sorry, my bad for misunderstanding you. You're absolutely right. I must have forgotten to update it in the big update to 0.6.0. Some day I plan on splitting tailon from wtee into separate projects. In the mean time, main should probably call main.main_tailon() for backward compatibility.

Thanks for the catch.

I remove wtee from tailon and renamed tailon_main back to main. This should eliminate the confusion, I hope.