top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Python Script Hashplings, python fallback

0 votes
46 views

If I execute a Python3 script with this haspling (#!/usr/bin/python3.3) and Python3.3 is not installed, but Python3.2 is installed, would the script still work? Would it fall back to Python3.2?

posted Jul 25, 2013 by Ahmed Patel

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

The answer is "probably not." If you just want to use the latest version of Python 3 you have installed on your system, use: "#!/usr/bin/python3". When you use the specific minor version numbers, they point to that specific minor version.
Actually, the preferred shebang line is of the form: "#!/usr/bin/env python3". This way the end users can override the interpreter with, say, a virtualenv, rather than being stuck with the system default.

answer Jul 25, 2013 by Salil Agrawal
Similar Questions
0 votes

How can write a python script which will execute some perl scripts in a gui and shouldn't be post processed....?

+1 vote

I am Automating some repetitive works through Sikuli and Python scripting languages. I have multiple workflows. I need to schedule this script for every two hours. Can anyone guide me how to schedule the scripts for every two hours.

Is there any way to schedule the python programming through Task scheduler in windows platform.

My environment
OS:Windows
Programming languages: Sikuli,Python

+2 votes
import json,httplib,urllib
connection = httplib.HTTPSConnection('api.parse.com', 443)
params =
urllib.urlencode({"username":"cooldude6","password":"p_n7!-e8"})
connection.connect()
connection.request('GET', '/1/login?%s' % params, '', {
 "X-Parse-Application-Id": "${APPLICATION_ID}",
 "X-Parse-REST-API-Key": "${REST_API_KEY}",
 "X-Parse-Revocable-Session": "1"
 })
result = json.loads(connection.getresponse().read())
print result

I need ruby equivalent code for this python script


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...