AFAIK communist influence on both Indian and Pakistani independence was negligible at best. (And, once again, socialism =/= communism.) The main drive for independence came from Gandhi's Congress party, which has basically ruled ever since India gained independence. Anyway, after independence, India displayed a rather sizeable communist party (which in some regional states actually ruled), but Pakistan did not. Somehow a predominantly Muslim population and communism don't mix well, it seems. On the international scene India has adopted the so-called Third Way (between communism and capitalism) for quite some time. (Also ofcourse, once both India and Pakistan became independent the Bangla Desh separation occurred, but that is another matter.)