Tagged Questions
1
vote
0answers
22 views
Brython: Moving Elements Every […] Microseconds
Good night. This is a question about Brython and any help will be welcome.
I'm looking for a way of moving elements (for example, a div) some pixels to the left (or to the right, top etc.) every time ...
-1
votes
0answers
19 views
Automated html site fill form
Dear stackoverflow users,
I'm trying to make a automated script which uploads the 2 files(one .tpr and one .cpt)
and fills the username and passwords and then submits.
How can I do that using Python?
...
-1
votes
0answers
31 views
How to parse HTML from eMail body - Python
I'm trying to parse incoming emails in python.
I get emails which are part text part HTML.
I want to get the HTML part and find a table in the HTML.
I tried using beatifulsoup. But when trying the ...
-2
votes
1answer
29 views
Render a webpage (includes some javascripts) in Python [on hold]
I'm new in programming with Python. I just want to create a little webcrawler.
I already created my idea in C# but my Raspberry Pi doesn't support the Mono project in the right way (There is a long ...
0
votes
0answers
35 views
PDF to HTML Form in Python App
I have a web app mainly written in Python/Django that is very form dependent for storing user information on the backend. I would like to use existing PDF's for standardized/regulated documents ie: W4 ...
0
votes
1answer
18 views
Python/HTML - Accented characters not rendering properly in browser
I am trying to get a page from wikipedia's API and print that page to a file, using Python.
json_data = json.loads(issue_request(params_html))
document = ...
1
vote
1answer
25 views
wxPython htmlWindow <textarea> not working correctly
I am writing a simple program using wx.html.htmlWindow, and I have problem: when I try to render <textarea></textarea>, it is not being showed! Maybe I am doing something wrong?
Code:
...
-1
votes
1answer
37 views
How can I store html in a MySQL table using python
Okay here is my code. Hopefully you can help me. I am using the MySQL lib called MySQLdb.
def createNick(self, user, nick):
try: # TRY STATEMENT HERE SO THE NICK CAN BE RECREATED
...
-7
votes
0answers
49 views
Which Language to Choose for a Web Application? [on hold]
I would like to thank you in advance for your time reading this.
I want to develop something.
A user should be directed to a website, where he can fill out a form. The server is going to do some ...
0
votes
1answer
27 views
How to retrieve the values of dynamic html content using Python
I'm using Python 3 and I'm trying to retrieve data from a website. However, this data is dynamically loaded and the code I have right now doesn't work:
url = eveCentralBaseURL + str(mineral)
...
-1
votes
0answers
46 views
Convert this PHP script to PYTHON
I want to use this upload form in my website : http://tutorialzine.com/2013/05/mini-ajax-file-upload-form/
However I can't use PHP. I would like to call a script python (upload.py) :
<form ...
1
vote
1answer
24 views
customize BeautifulSoup's prettify by tag
I was wondering if it would be possible to make it so that prettify did not create new lines on specific tags.
I would like to make it so that span and a tags do not split up, for example:
...
1
vote
3answers
65 views
Can I scrape data from web pages when the data comes from JavaScript?
I'm not exactly sure how to phrase my question but I'll give it my best shot.
If I load up a webpage, in the HTML it executes a JavaScript file. And if I view the page source I can see the source of ...
0
votes
1answer
25 views
Trouble Getting a clean text file from HTML
I have looked at these previous questions
I am trying to consolidate news and notes from websites.
Reputed News service websites allow Users to post comments and views.
I am trying to get only ...
-6
votes
1answer
54 views
How to convert a pdf file to html file using python [on hold]
Hi presently there are some tools for converting pdf to html, html to pdf online and also some command line tools too available, but i am trying to design that functionality using python
When i ...
1
vote
1answer
27 views
Serving image with flask
I have a programm which generates an image. Now, I’d like to make this picture for other user in the network thanks to flask. But I can’t display this picture with the following code :
...
1
vote
2answers
51 views
wrapping html with a python function
I want to be able to wrap a div based on it's id. For example given the following HTML:
<body>
<div id="info">
<div id="a1">
</div>
<div ...
0
votes
1answer
11 views
python: Given a BytesIO buffer, generate img tag in html?
Is it possible to generate a functional image tag in html from a BytesIO buffer? I'd like to do something along these lines:
import matplotlib
matplotlib.use('Agg')
import pylab
import Image
import ...
1
vote
1answer
45 views
data loss from django template during page reload
I am passing a variable to the django template from view file
view.py
if request.method == 'POST':
t_t = request.POST.get('t_t')
t_o = T(user_id=1, t=t, d=d)
t_o.save()
return ...
0
votes
1answer
37 views
external javascript/jquery does not load inside of django project
I am working on a django project that works with a postgres database.
I have a search form that allows users to search the database. The search form works just fine. I wanted to make it a little ...
0
votes
1answer
31 views
how to display a image in django template using for loop
I am trying to display a image in the django template
html file
{% for imge in q_i %}
<img src="{{ MEDIA_URL }}/{{ imge.0 }}" width="80" height="80" />
{% endfor %}
view.py
#...#
Q_I = []
...
-5
votes
0answers
143 views
How do I start to learn programming? [closed]
I am eager to learn some sort of programming language. Does anyone have any suggestions for a programming language to begin with? Maybe some books to read? For the education I want I will have to at ...
0
votes
2answers
33 views
How to generate reports in different formats (HTML, text, etc.) based on Python? [closed]
From Python it is required to output a text report with multiple sections and contents such as simple paragraphs, lists, tables, etc. created from basic Python data structures.
Is there a ...
0
votes
1answer
32 views
Bash - change image urls to base64 in html
28I tried to make a script that's converting images source from normal links to base64 encoding in html files.
But there is a problem: sometimes, sed tells me
script.sh: line 25: /bin/sed: ...
1
vote
1answer
42 views
Embed html button in GTK3 app?
I'd like to embed a Yandex.Money "Donate" html button into my GTK3 (Python) app. Is it possible somehow?
This is the code of the button:
<iframe allowtransparency="true" ...
0
votes
1answer
14 views
BeautifulSoup - adding attribute to tag
Question for you here, I'm trying to add an attribute to a tag here, wondering if I can use a BeautifulSoup method, or should use plain string manipulation.
An example would probably make this clear, ...
1
vote
1answer
63 views
html submit comment to document
I am trying to add a comment form to my HTML test site, but i can not get the form to write the comments to a file.
<form action="/Users/kyle/server/comments.html" method="POST">
Your ...
1
vote
1answer
70 views
Python regex: remove certain HTML tags and the contents in them
If I have a string that contains this:
<p><span class=love><p>miracle</p>...</span></p><br>love</br>
And I want to remove the string:
<span ...
0
votes
1answer
24 views
Django show ManyToMany field of model using ModelChoiceField
I have a "parent" model containing different fields, and one of them is a ManyToMany field refering to another model (that in turn, has several fields).
I would like to display a ModelChoiceField ...
0
votes
3answers
71 views
Transform HTML table to JSON
I have a huge HTML Table (about 500,000 rows) that I need to transform into a JSON file.
The table looks something like this:
<table>
<tr>
<th>Id</th>
...
-1
votes
1answer
36 views
Is it possible to make an IOS app in Python and then port to XCode? [closed]
Is it possible to write an IOS app in Python programming language and then port it into xCode to publish on the App Store?
0
votes
0answers
22 views
Bootstrap Dropdowns not functioning on apache/wsgi, but work fine on development server
So I'm building my first webapp in python/flask, and am currently in the process of "beautifying" it with bootstrap, but the dropdown menus are giving me some trouble. The dropdowns work fine when I ...
0
votes
1answer
66 views
how to add lists to a dictionary then output to .csv
I'm try to iterate through tables in html by a searchlabel, then update the found value to a dictionary, then write those values to a csv. The output currently works for both the url and the headline, ...
2
votes
1answer
39 views
Cannot load image in django
I am new to django. I tried to load an image through HTML(graph.html).
views.py includes
def avg_duration_vs_time_of_day(request):
figName="figGraph.png"
path="Telecom/Images/"+figName
...
1
vote
1answer
25 views
django- error while making the filefield optional
i am trying to a upload file. Uploading is working fine.
Models.py
class I(models.Model):
top=models.ForeignKey(T)
imgfile = models.FileField(upload_to='static/Uploaded_Images', blank= True)
class ...
-2
votes
2answers
27 views
how can i get all links from a html file with python using easyhtmlparser?
i'm trying to get all the links and images from a page using html parser
http://easyhtmlparser.sourceforge.net/
fd = open('file.html', 'r')
data = fd.read()
fd.close()
html = Html()
dom = ...
0
votes
3answers
35 views
file cleaner using regex
So I am trying to write my own scripts that will take in html files and return errors as well as clean them (doing this to learn regex and because I find it useful)
I am starting by having a quick ...
0
votes
1answer
16 views
how to call the server serving the page with a URL which references a python object function like “csvExport” and triggering it with a button
I have a python routine which I call with an HTML Button. I cannot call from that button with AJAX. It has to be a call via a URL, something like
onClick="location.href='server/csvExport'">
...
0
votes
2answers
41 views
jquery not working from cdn with django template
Here is my template section, loading jquery from CDN:
<head>
{% load staticfiles %}
<title>My Schedule</title>
<link href="{{ STATIC_URL }}css/bootstrap.min.css" ...
2
votes
1answer
37 views
How to Display Image with web.py
I am trying to let a user upload an image, save the image to disk, and then have it display on a webpage, but I can't get the image to display properly. Here is my bin/app.py:
import web ...
0
votes
1answer
35 views
cannot retrieve xpath using scrapy
Hello I am trying to get the xpath for title and text for class listCell. I believe I am doing it right because i get no errors but when i display it in a csv file i do not get nothing in the output ...
0
votes
0answers
39 views
calculate (x,y) coordinates(relatives to the top left corner of the screen) of words in a table in HTML
I get the words from txt and put them in a table in HTML format on the screen. Then I calculate the coordinates of each cell in the table. Here is the code:
def get_words(file):
"""This function ...
2
votes
1answer
48 views
Link to get http response works just once in django
I am having problem to get graphical result for second time either it be for a database query or two or more queries. For first time result is given as desired immediately but thereafter browser just ...
3
votes
1answer
83 views
Link is not working in django
<a href = "{% url 'ngraph' %}">Customer Count</a>
When I click on customer count it works only once and to make it work I have to run the program again, what is the problem here ? And ...
0
votes
1answer
19 views
Django expecting primary key I don't have
I am getting an exception:
invalid literal for int() with base 10: 'ljrh'
from this code trying to create an entry in a model:
day = itemize(value, getday(strip(key)))
add = ...
0
votes
1answer
55 views
How to execute system commands with a button press on a HTML file?
I have a website on my local server and I like to execute system commands on my local server with a button press in the html file that is displayed. Is there a way to either execute system commands ...
0
votes
2answers
52 views
Regular expression to extract a specific value from HTML anchors
I am trying to extract http://xyz.com/5 link from the string below. You can see that only for that one we have the class="next" attribute. So I am trying to get that based on this attribute.
<a ...
1
vote
1answer
18 views
Having multiple templates nested within each other using weby
I have set up a website using webpy.
I have my main page called layout.html. I load foo1.html into layout
$def with (content)
<html>
<head>
<title>Foo</title>
...
0
votes
1answer
56 views
Javascript/Php post login examples [closed]
I'm trying to understand how to use this unofficial vine api on github.
https://github.com/starlock/vino/wiki/API-Reference
I am very new to this. It seems like you need to log in and get the key ...
0
votes
1answer
53 views
How to send audio wav file generated at the server to client browser? [closed]
I'm using flask for my application. I would like to send an audio wav file from the server side to client with or without saving the wav file on the disk.
Any idea how to do this ?