and change it to, for example,
"{0}".format(sys.version)
and add a print at the end of your code, and see what happens. You will see the version number, e.g.
import sys
print "{0}.{1}.{2}.{3}.{4}
".format(sys.version_info[0], sys.version_info[1], sys.version_info[2], sys.version_info[3], sys.version_info[4])
Q:
jQuery local variable to a global variable
I have a form with multiple input fields. I want to make sure that user never enters data that is already there in the database.
I am using AJAX to do the check on the server side. For that I am using ajaxStart() and ajaxStop() events and when the user enters a value that already exists I want to stop it. However, I have no idea how to do that. My code goes like this:
var id_of_the_existing_value = $(this).val();
$(this).blur(function(){
$.ajax({
type: 'POST',
url: 'test.php',
data: {
id_of_the_existing_value: id_of_the_existing_value
},
success: function(data){
if(data!= "yes"){
alert('data is no');
}
}
});
});
This will work, but I want to avoid it. I would like to make an array, which will hold all the ids of the existing values. Then whenever I need to check it, I will have to check it one by one.
I am talking about local variable here. How can I make it global?
A:
It's easy to use a variable. Just use
Related links:
コメント