Of course it's not, sounds like the OP has a problem with discipline, both his own (actually work rather than play with child), and the child (who hasn't been told to leave alone)
I'm assuming that there is someone else actually looking after the child, you can't leave a 2 year old alone for more than a couple of minutes (and even then you have to keep one eye on them)
I'm amazed to see some people here on HN could be that judgemental. You don't even know me and you somehow think that I wouldn't have asked my kid to let me work alone. My wife is there all day to take care of the child, and even though she does everything she can in her capacity, I don't know how much can you discipline a 2 year old who just can't resist being with her dad. Not sure how understanding/wise toddlers are in your part of the world.