Media player in python

I have installed all things properly but I am getting error in line numer 7 as:
dirName = os.path.dirname(os.path.abspath(__file__))
NameError: name '__file__' is not defined
. I want to test the code given in this blog; wxPython: Creating a Simple Media Player - Mouse Vs Python
so will someone help me...I am beginner in python programming so I want to learn it.I have successfully run other simple programs in my windows 7 PC.

Replies

You are reading an archived discussion.

Related Posts

Niel Armstrong, the first man on the moon is no more. Armstrong died at the age of 82 following the complications after a heart-bypass surgery he had about a month...
Hello..am doing Pre-Final Year in Computer Science Engineering Major, i was thinking abt doing some mini projects so that it will be more value when doing final year projects ,...
So, if you love putting files on the cloud and are obsessed with accessing you favorite songs from anywhere, anytime - this news will probably be of interest to you....
India had thrashed Australia in under 19 cricket world cup final. Captain Unmukt Chand had made unbeated 111 studded with 6 Six's. Awesome batting performance!! CONGRATULATIONS INDIA ! -CB
First impressions of the new Discover 125ST. It churns out 12.8bhp and comes with a 5-speed gearbox. Fact File Engine Fuel Petrol Type 4 valve, Air Cooled, 124.58cc Bore/stroke 54x54.4...