0
votes
1answer
18 views
Passing key press event from HTML element to python?
I have a HTML page which is displayed by QWebView control in PyQT. This HTML page consists of an 'input' element as given below
<html>
<body>
<input ...
0
votes
0answers
8 views
google cloud endpoints discrepancy between documentation, and what works in my app
The documentation states you should load your api from javascript like this:
var ROOT = 'https://your_app_id.appspot.com/_ah/api';
gapi.client.load('your_app_id', 'v1', function() {
...
0
votes
1answer
17 views
Get scrollTop, scrollLeft etc. from element with selenium
In a Python/Django test for an element, that is scrolled via scrollTop, I want to get the value of scrollTop.
In JavaScript I get this value via
element.scrollTop
In Python I tried the following:
...
1
vote
0answers
26 views
Best way to use Jinja2 template in Javascript?
I'm trying to AJAXify some functionality of a page that uses Jinja2 and Flask. Problem is that I want the entire Jinja2 template to be rendered by Javascript but, this isn't possible with some of the ...
-1
votes
3answers
43 views
Passing variables from python to javascript over the internet [closed]
I want to create a python server that sends data to a web server across the internet, in the form of a number (variable). This number would be 1-100, and depending on what number it is, JavaScript ...
0
votes
0answers
15 views
Maps api geometry library for python
Using javascript google maps geometry apis, I can compute the coordinates of a second point, by giving the coordinates of a first point, distance required and angle. eg.
var point = new ...
0
votes
1answer
23 views
javascript equivalent of python's compile and exec
In python, one can take a string containing python code, compile it and run the resulting code with exec.
Can something similar be done with javascript (any implementation is good). My objective is ...
0
votes
1answer
69 views
+200
Programmatically select the first suggestion in django-autocomplete-light
How can I select the first given option? I'm feeding the autocomplete widget with the data from reverse geocoding results (city) basing on user's location. I have a database with cities and I need to ...
0
votes
0answers
35 views
Python HTML getElementsByClassName alike manipulate on file content
I have saved the source code of a page to a file using Sikuli. I need a "roundup" on a batch of matrix style placed elements. But I don't want to calculate dimensions between them. I want URLs to type ...
2
votes
1answer
40 views
Are there any python libraries that can safely interpret obfusticated javascript strings?
I want to be able de-obfusticate javascript strings in python where the javascript code maybe malicious. Are there any libraries available to do this?
I started to build my own but I quickly ...
0
votes
1answer
29 views
Python Mechanize: selecting an option
How do i select an option from the select tag?
This form contains only one select tag and no submit button. When an option is selected, it is supposed to call the javascript function ...
0
votes
1answer
12 views
multiple arguments with PySide QtCore.Slot decorator
How do you define multiple arguments? What types are supported? And why does it sometimes fail when I combine it with another decorator?
1
vote
0answers
34 views
How do you unpack javascript using jsbeautifier in python?
I have this javascript code which I want to unpack and beautify, it looks similar to this:
eval(function(p,a,c,k,e,r){e=String;if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return ...
0
votes
1answer
23 views
WebSocket javascript client and python server. Retreiving garbage in output
I am trying to send string/text data from browser client to python server and simply print it out. I have fallowed several examples on the internet, and all are the same: by using (javascript)
...
0
votes
6answers
99 views
How to check if a number is present in a group of ranges?
R1=[0,20]
R2=[15,20]
R3=[30,50]
Target=[0,50]
I need to check if the target range is covered by all the R(s).
In above example 0..20 and 30..50 is covered but not 20..30
is there an easy way to ...