>>> i = 1240832864000L
>>> i
1240832864000L
>>> print i
1240832864000
>>>
>>> '<script type="text/javascript"> var num = %s; </script>' % i
'<script type="text/javascript"> var num = 1240832864000; </script>'
The L only shows up when you trigger the object's __repr__
When and how are you sending this data to JavaScript? If you send it as JSON, you shouldn't have to worry about long literals or how Python displays its objects within Python.