FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!

Python version in the Webhosting




For someone interest, the python version of the Frihost hosting is Python 2.6.6, so some things that works in modules imported from 2.7 won't work here. One of the most common things missing in 2.6 is compression dictionaries, which are like this:
Code:
foo={i:j for i,j in zip(range(10),range(10))}
Note: this may not work
To convert it to 2.6-compatible you have to change it to something like this:
Code:
foo=dict([(i,j) for i,j in zip(range(10),range(10))])

An alternative if you cant make it work is:
Code:
result=dict()
for i,j in zip(range(10),range(10)):
   result[i]=j




0 blog comments below




FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.