3

I'm trying to deploy some code on several nodes for a distributed project. These nodes only have Python 2.5 on them, which is a problem because I'm sending data in json (mostly just json.loads and json.dumps). I can't install new modules or upgrade python for policy reasons.

I guess one way to get around this would be to manually convert strings in json to python objects and vice versa, but this sounds painful. Is there an easier way to do this?

santosh.ankr
  • 671
  • 4
  • 12
  • 2
    Can't you install it privately somewhere in your HOME and set PYTHONPATH to be able to find it? – mgilson Apr 06 '13 at 02:21
  • So the problem is not that we don't have administrator access on those machines, it seems to be that they're running on old hardware, are unstable, and have other live projects running on them also using python. Any kind of configuration changes to python will probably not be allowed. – santosh.ankr Apr 06 '13 at 02:26
  • @santosh.ankr You don't need to make configuration changes, you can just add the simplejson module to your application's sources. That's probably a better idea than coding it on your own. – Thomas Orozco Apr 06 '13 at 02:28
  • 1
    That's exactly my answer bellow, you don't need to to anything on those machines just download simplejson module and add it to your application as any other module you have there and import it. – gonz Apr 06 '13 at 02:33

1 Answers1

5

What about manually downloading simplejson and use it as an application module? You can get it here: https://pypi.python.org/pypi/simplejson

gonz
  • 5,226
  • 5
  • 39
  • 54