Web Development
int64
0
1
Data Science and Machine Learning
int64
0
1
Question
stringlengths
28
6.1k
is_accepted
bool
2 classes
Q_Id
int64
337
51.9M
Score
float64
-1
1.2
Other
int64
0
1
Database and SQL
int64
0
1
Users Score
int64
-8
412
Answer
stringlengths
14
7k
Python Basics and Environment
int64
0
1
ViewCount
int64
13
1.34M
System Administration and DevOps
int64
0
1
Q_Score
int64
0
1.53k
CreationDate
stringlengths
23
23
Tags
stringlengths
6
90
Title
stringlengths
15
149
Networking and APIs
int64
1
1
Available Count
int64
1
12
AnswerCount
int64
1
28
A_Id
int64
635
72.5M
GUI and Desktop Applications
int64
0
1
0
0
I want to send and receive messages between two Python programs using sockets. I can do this using the private IPs when the computers are connected to the same router, but how do I do it when there are 2 NATs separating them? Thanks (my first SO question)
false
12,014,203
0
0
0
0
Redis, could work but not the exact same functionality.
1
668
0
6
2012-08-17T23:03:00.000
python,sockets,nat
How do I communicate between 2 Python programs using sockets that are on separate NATs?
1
1
3
12,020,661
0
1
0
I'd like to write a script, preferably a Python code, to fill text areas in web pages and then click certain buttons. I've come across some solutions for this but none worked, mainly because cookies were not stored properly, for exmaple, there was a Python script to login to Facebook, which did seem to get it right in ...
false
12,022,570
-0.132549
0
0
-2
You can also take a look at IEC which uses windows API to run an instance of Internet explorer and give commands to it. Although it may not be good for large scale automation, but it is very easy to use.
0
4,599
0
1
2012-08-18T22:05:00.000
python,facebook,text,login,fill
Script to open web pages, fill texts and click buttons
1
1
3
28,718,663
0
0
0
I want to find a link by its text but it's written in non-English characters (Hebrew to be precise, if that matters). The "find_element_by_link_text('link_text')" method would have otherwise suited my needs, but here it fails. Any idea how I can do that? Thanks.
false
12,023,402
0
1
0
0
In the future you need to pastebin a representative snippet of your code, and certainly a traceback. I'm going to assume that when you say "the code does not compile" that you mean that you get an exception telling you you haven't declared an encoding. You need a line at the top of your file that looks like # -*- codin...
0
258
0
1
2012-08-19T00:55:00.000
python,selenium,hyperlink
Selenium in Python: how to click non-English link?
1
1
2
12,023,574
0
0
0
I'm sorry if my question is too elementary. I have some python code, which makes the machine act as a transparent proxy server using "twisted" library. Basically I want my own transparent proxy OUTSIDE my internal network and since I want to be able to monitor traffic, I need to have my own server. So I need a machine ...
true
12,027,815
1.2
0
0
1
Go for Amazon Ec2 instance, Ubantu server. If your process is not much memory consuming , you can go with Micro instance(617 Mb ram, 8 Gb HD) which is free for first year. Or you could go with small instance (1.7 GB ram and 8Gb HD), which might cost you little more. For setting up the python code to run 24/7 , you can...
0
223
1
0
2012-08-19T15:49:00.000
python,webserver,hosting
Web server to run python code
1
1
2
12,027,902
0
0
0
Is there any way to log http requests/responses using Selenium Webdriver (firefox)? I guess it's possible to drive web traffic through proxy and log it, but maybe there is more simple "internal" selenium solution? Asked this question on #selenium channel: you will need to proxy it to capture the requests so, look...
false
12,034,013
0.291313
0
0
3
No, WebDriver doesn't have any methods to examine or modify the HTTP traffic occurring between the browser and the website. The information you've already gotten from the Selenium IRC channel (likely even from a Selenium committer) is correct. A proxy is the correct approach here.
0
1,705
0
3
2012-08-20T07:53:00.000
python,selenium,webdriver
Is there any way to log http requests/responses using Selenium Webdriver (firefox)?
1
1
2
12,036,058
0
1
0
I have to make a html page with css and javascript that I have to enter a url in a form. With this url, I have to get some information from the html of the page with a Python 3.2 Script. I start learning Python some days ago and I have some question: I need CherryPy/Django to do that? (I'm asking because I executed a ...
false
12,043,333
0.197375
0
0
1
No, you don't need a web framework, but in general it's a good idea. Django seems like brutal overkill for this. CherryPy or Pyramid or some micro framework seems better. You can have an HTML page that calls the CherryPy server, but since this page obviously is a part of the system/service you are building, serving it ...
0
1,126
0
0
2012-08-20T18:49:00.000
html,ajax,django,python-3.x,cherrypy
Call python script from html page
1
1
1
12,043,550
0
0
0
I've been using Paramiko today to work with a Python SSH connection, and it is useful. However one thing I'd really like to be able to do over the SSH is to utilise some Pythonic sugar. As far as I can tell I can only use the inbuilt Paramiko functions, and if I want to anything using Python on the remote side I would ...
true
12,044,262
1.2
1
0
0
Well, that is what SSH created for - to be a secure shell, and the commands are executed on the remote machine (you can think of it as if you were sitting at a remote computer itself, and that either doesn't mean you can execute Python commands in a shell, though you're physically interact with a machine). You can't se...
0
705
0
0
2012-08-20T19:57:00.000
python,ssh,paramiko
using python commands within paramiko
1
1
2
12,044,350
0
1
0
Have been using ActivePython on windows7 and lxml seems working without an issue.. There were a lot of other third party packages I had & they were working too.. Until I wanted to use it inside Web2Py. All the others seem to be working if I copy them directly inside c:/web2py/applications/myApp/modules With lxml, see...
true
12,046,683
1.2
0
0
1
If you are using the Windows binary version of web2py, it comes with its own Python 2.5 interpreter and is self-contained, so it won't use your system's Python 2.7 nor see any of its modules. Instead, you should switch to running web2py from source. It's just as easy as the binary version -- just download the zip file ...
0
277
0
0
2012-08-20T23:41:00.000
python,lxml,web2py,activepython
python - web2py - can't seem to find lxml - ActivePython - windows7
1
1
1
12,047,285
0
0
0
I have no way to wake up a thread being blocked by poll.poll() function . Could someone help me ?
false
12,050,072
1
0
0
7
The way to handle this is to have an extra file descriptor included in the list of descriptors passed to poll(). For that descriptor wait for a read to be ready. Have any other thread which wants to awaken the thread waiting on poll() write to that extra descriptor. At that point, the thread which called poll() resu...
1
4,068
0
5
2012-08-21T07:24:00.000
python,sockets
How to wake up a thread being blocked by select.poll.poll() function from another thread in socket programming in python?
1
2
3
17,333,359
0
0
0
I have no way to wake up a thread being blocked by poll.poll() function . Could someone help me ?
false
12,050,072
-0.066568
0
0
-1
Use a timeout in your poll call, so it doesn't block indefinitely. N.B.: the timeout value is in milliseconds.
1
4,068
0
5
2012-08-21T07:24:00.000
python,sockets
How to wake up a thread being blocked by select.poll.poll() function from another thread in socket programming in python?
1
2
3
12,050,224
0
0
0
This is the problem I'm trying to solve, I want to write an application that will read outbound http request packets on the same machine's network card. This would then be able to extract the GET url from it.On basis of this information, I want to be able to stop the packet, or redirect it , or let it pass. However I ...
false
12,072,506
0
0
0
0
Using pcap you cannot stop the packets, if you are under windows you must go down to the driver level... but you can stop only packets that your machine send. A solution is act as a pipe to the destination machine: You need two network interfaces (without address possibly), when you get a packet that you does not found...
0
1,109
0
0
2012-08-22T11:53:00.000
python,c,networking
Stop packets at the network card
1
1
4
12,075,452
0
0
0
I have a question. I have read various RFCs and so many info on internet. I read that DNS through UDP has a 512 bytes limit. I want to write a python program that use this max limit to create a well generated DNS request. It is very important to use UDP and not the TCP DNS implementation. I have tried using public libr...
true
12,083,628
1.2
0
0
-1
The 512 bytes limit is for a dns message, not specifically for a request, and the limitation is only valid for responses, which can contain Resource Records. For a request you are limited to the 253 bytes of the domain name. You might be able to manually create a query containing Resource Records, but it will probably...
0
988
0
0
2012-08-23T01:37:00.000
python,dns,size
Make a 512 UDP bytes DNS request
1
1
2
12,087,906
0
0
0
I need python script that can sniff and decode SIP messages in order to check their correctness. As a base for this script I use python-libpcap library for packets sniffing. I can catch UDP packet and extract SIP payload from it, but I don't know how to decode it. Does python has any libraries for packets decoding? I'v...
true
12,094,148
1.2
0
0
4
Finally I did this with help of pyshark from the sharktools (http://www.mit.edu/~armenb/sharktools/). In order to sniff IP packages I used scapy instead of libpcap.
0
5,300
0
3
2012-08-23T14:38:00.000
python,sip,decode,pcap
Decode SIP messages with Python
1
1
3
12,708,904
0
1
0
I'm building an Android IM chat app for fun. I can develop the Android stuff well but i'm not so good with the networking side so I am looking at using XMPP on AWS servers to run the actual IM side. I've looked at OpenFire and ejabberd which i could use. Does anyone have any experience with them or know a better one? I...
false
12,095,507
0
1
0
0
As an employee of ProcessOne, the makers of ejabberd, I can tell you we run a lot of services over AWS, including mobile chat apps. We have industrialized our procedures.
0
365
0
0
2012-08-23T15:48:00.000
python,ruby,amazon-ec2,amazon-web-services,xmpp
Running XMPP on Amazon for a chat app
1
2
2
12,095,630
0
1
0
I'm building an Android IM chat app for fun. I can develop the Android stuff well but i'm not so good with the networking side so I am looking at using XMPP on AWS servers to run the actual IM side. I've looked at OpenFire and ejabberd which i could use. Does anyone have any experience with them or know a better one? I...
false
12,095,507
0.099668
1
0
1
Try to explore more about Amazon SQS( Simple Queuing Service) . It might come handy for your requirement.
0
365
0
0
2012-08-23T15:48:00.000
python,ruby,amazon-ec2,amazon-web-services,xmpp
Running XMPP on Amazon for a chat app
1
2
2
12,095,743
0
1
0
Trying to debug a website in IE9. I am running it via Python. In chrome, safari, firefox, and opera, the site loads immediately, but in IE9 it seems to hang and never actually loads. Could this possibly be an issue with http pipelining? Or something else? And how might I fix this?
false
12,098,732
0.099668
0
0
1
You need to specify what Python "Web server" you're using (e.g. bottle? Maybe Tornado? CherryPy?), but more important, you need to supply what request headers and what HTTP response go in and out when IE9 is involved. You may lift them off the wire using e.g. ngrep, or I think you can use Developers Tools in IE9 (F12 k...
0
408
0
0
2012-08-23T19:30:00.000
python,windows,debugging,internet-explorer-9,pipeline
IE9 and Python issues?
1
1
2
12,098,951
0
0
0
I have a script that is intended to be run by multiple users on multiple computers, and they don't all have their Dropbox folders in their respective home directories. I'd hate to have to hard code paths in the script. I'd much rather figure out the path programatically. Any suggestions welcome. EDIT: I am not using th...
false
12,118,162
0
0
0
0
One option is you could go searching for the .dropbox.cache directory which (at least on Mac and Linux) is a hidden folder in the Dropbox directory. I am fairly certain that Dropbox stores its preferences in an encrypted .dbx container, so extracting it using the same method that Dropbox uses is not trivial.
0
12,977
0
20
2012-08-25T00:18:00.000
python,directory,dropbox
How to determine the Dropbox folder location programmatically?
1
1
8
12,118,287
0
0
0
is snmp really required to manage devices ? i'd like to script something with python to manage devices (mainly servers), such as disk usage, process list etc. i'm learning how to do and many article speak about snmp protocole. I can't use, for example, psutil, or subprocess or os modules, and send information via udp ...
true
12,147,224
1.2
0
0
1
The SNMP is a standard monitoring (and configuration) tool used widely in managing network devices (but not only). I don't understand your question fully - is it a problem that you cannot use SNMP because device does not support it (what does it support then?) To script anything you have to know what interface is expos...
0
197
1
0
2012-08-27T18:11:00.000
python,monitoring,snmp
is snmp required
1
2
2
12,147,545
0
0
0
is snmp really required to manage devices ? i'd like to script something with python to manage devices (mainly servers), such as disk usage, process list etc. i'm learning how to do and many article speak about snmp protocole. I can't use, for example, psutil, or subprocess or os modules, and send information via udp ...
false
12,147,224
0.099668
0
0
1
No, it's not required, but your question is sort of like asking if you're required to use http to serve web pages. Technically you don't need it, but if you don't use it you're giving up interoperability with a lot of existing client software.
0
197
1
0
2012-08-27T18:11:00.000
python,monitoring,snmp
is snmp required
1
2
2
12,148,746
0
0
0
I need to know what mechanism is more efficient (less RAM/CPU) to read and write files, especially write. Possibly a JSON data structure. The idea is perform these operations in a context of WebSockets (client -> server -> read/write file with data of the actual session -> response to client).... Best idea is to store...
false
12,154,854
0
0
0
0
They will probably both be about the same. I/O is generally a lot slower than CPU, so the entire process of reading and writing files will depend on how fast your disk can handle the requests. It also will depend on the data-processing approach you take. If you opt to read the whole file in at once, then of course it w...
1
335
0
0
2012-08-28T07:44:00.000
python
Write/Read files: NodeJS vs Python
1
1
1
12,154,925
0
1
0
I have a project which requires a great deal of data scraping to be done. I've been looking at Scrapy which so far I am very impressed with but I am looking for the best approach to do the following: 1) I want to scrape multiple URL's and pass in the same variable for each URL to be scraped, for example, lets assume I ...
false
12,160,673
0.197375
0
0
3
1) In the BaseSpider, there is an __init__ method that can be overridden in subclasses. This is where the declaration of the start_urls and allowed_domains variables are set. If you have a list of urls in mind, prior to running the spider, than you can insert them dynamically here. For example, in a few of the spiders ...
0
2,710
0
1
2012-08-28T13:47:00.000
python,scrapy
Scrapy approach to scraping multiple URLs
1
1
3
12,161,314
0
1
0
Is there any way to generate various events like: filling an input field submitting a form clicking a link Handling redirection etc via python beautiful soup library. If not what's the best way to do above (basic functionality).
true
12,161,140
1.2
0
0
1
BeautifulSoup is a tool for parsing and analyzing HTML. It cannot talk to web servers, so you'd need another library to do that, like urllib2 (builtin, but low-level) or requests (high-level, handles cookies, redirection, https etc. out of the box). Alternatively, you can look at mechanize or windmill, or if you also r...
0
102
0
0
2012-08-28T14:10:00.000
python,web-scraping,beautifulsoup
Generate various events in 'Web scraping with beautiful soup'
1
1
1
12,163,450
0
0
0
Which should be used and for what? Is there any advantage to one over the other?
true
12,184,372
1.2
0
0
5
It is only a matter of abstraction levels. In most cases, you will want to use the highest level API. Layer1 API is a direct mapping of Amazon's API layer2 API add some nice abstractions like a generator for scan and query results as well as answer cleaning. When you call layer2, it calls layer1 which ends up genera...
0
271
0
3
2012-08-29T18:35:00.000
python,boto,amazon-dynamodb
In Python Boto's API for DynamoDB, what are the differences between Layer1 and Layer2?
1
1
1
12,184,769
0
0
0
Is it possible for a client to establish a SSL connection to a server using the server's certificate already exchanged through other means? The point would be to encrypt the connection using the certificate already with the client and not have to rely on the server to provide it. The server would still have the private...
false
12,195,063
0
0
0
0
In TLS, the server (the side which listen's for connections) always needs a certificate. Client-side certificates may be used only for peer authentication, but not for the channel encryption. Keep in mind also, that you can't simply "encrypt" a connection without some infrastructure to verify the certificates in some w...
0
2,594
0
3
2012-08-30T10:42:00.000
python,encryption,twisted,ssl
SSL connection with client-side certificate
1
1
2
12,195,181
0
0
0
Is it possible to change the file name of a file with selenium in python before/after it downloads? I do not want to use the os module. Thanks! For example, what if my file was being download to C:\foo\bar, and its name is foo.csv, could i change it to bar.csv.
false
12,201,074
0.53705
0
0
3
No this is not possible with any Selenium library. Use the normal Python method of renaming a file.
0
1,061
0
0
2012-08-30T16:05:00.000
python,selenium
changing the name of a downloaded file selenium
1
1
1
12,201,383
0
1
0
I just have a simple question here. I'm making a total of 10 calls to the Twitch TV API and indexing them, which is rather slow (15 seconds - 25 seconds slow). Whenever I make these calls browser side (i.e. throw them into my url), they load rather quickly. Since I am coding in python, is there any way I could fetch/in...
true
12,202,815
1.2
0
0
1
If you don't expect them to change constantly, you can cache the results in memcache and only hit the real API when necessary. On top of that, if you think that the API calls are predictable, you can do this using a backend, and memcache the results (basically scraping), so that users can get at the cached results rath...
0
159
0
1
2012-08-30T18:00:00.000
python,api,google-app-engine,jinja2
API Call Is Extremely Slow Server Side on GAE but Fast Browser Side
1
1
1
12,203,940
0
1
0
Are there any generally accepted practices to get around this? Specifically, for user-submitted images uploaded to a web service. My application is running in Python. Some hacked solutions that came to mind: Display the uploaded image from a local directory until the S3 image is ready, then "hand it off" and update th...
false
12,241,945
0.197375
0
1
1
I'd save time and not do anything. The wait times are pretty fast. If you wanted to stall the end-user, you could just show a 'success' page without the image. If the image isn't available, most regular users will just hit reload. If you really felt like you had to... I'd probably go with a javascript solution like...
0
323
0
0
2012-09-03T04:22:00.000
python,amazon-s3,amazon-web-services
What are some ways to work with Amazon S3 not offering read-after-write consistency in US Standard?
1
1
1
12,242,133
0
0
0
I have a CherryPy application running successfully using the built-in digest authentication tool and no session support. Now, I would like to expose additional features to certain users. Is it possible to obtain the currently-authenticated user from the authorization system?
false
12,251,490
0.066568
0
0
1
Found the user name encoded in the HTTP request header Authorization. I am able to parse it from there. If there's a "better" place to obtain the username, I'm open to improvements!
0
2,411
0
2
2012-09-03T16:37:00.000
python,http,authentication,cherrypy
How to get username with CherryPy digest authentication
1
1
3
12,255,276
0
1
0
I'm trying to use Selenium for some app testing, and I need it to plug a variable in when filling a form instead of a hardcoded string. IE: this works name_element.send_keys("John Doe") but this doesnt name_element.send_keys(username) Does anyone know how I can accomplish this? Pretty big Python noob, but used Google ...
false
12,289,700
0
0
0
0
I think username might be a variable in the python library you are using. Try calling it something else like Username1 and see if it works??
0
9,992
0
7
2012-09-05T21:00:00.000
python,selenium
Passing variables through Selenium send.keys instead of strings
1
2
5
60,626,053
0
1
0
I'm trying to use Selenium for some app testing, and I need it to plug a variable in when filling a form instead of a hardcoded string. IE: this works name_element.send_keys("John Doe") but this doesnt name_element.send_keys(username) Does anyone know how I can accomplish this? Pretty big Python noob, but used Google ...
false
12,289,700
0.039979
0
0
1
Try this. username = r'John Doe' name_element.send_keys(username) I was able to pass the string without casting it just fine in my test.
0
9,992
0
7
2012-09-05T21:00:00.000
python,selenium
Passing variables through Selenium send.keys instead of strings
1
2
5
47,662,083
0
0
0
Are there any Tools / Chrome plugins like "Advanced REST Plugin" for Chrome that I can use to Test Twisted RPC JSON calls? Or do I have to write some Python code to do this?
false
12,292,723
0.379949
0
0
2
When it comes to testing, you sould always use code, so that if you change something in the future or if you have to fix a bug, testing your changes will be a matter of seconds: python mytestsuite.py
0
76
0
0
2012-09-06T03:53:00.000
python,django,testing,twisted,twisted.web
Tools to Test RPC twisted calls?
1
1
1
12,486,382
0
1
0
I need to export a website(.html page) to a XML file. The website contains a table with some data which i require for using in my web project. The table in the website is formed using some javascript, so i cannot get the data by getting the page source. Please tell me how I can export the table in the website to a XML ...
true
12,295,834
1.2
0
0
4
You could try to reverse engineer the javascript code. Maybe it's making an ajax request to a service, that delivers the data as json. Use your browsers developer tools/network tab to see what's going on.
0
2,036
0
1
2012-09-06T08:20:00.000
php,javascript,python,xml,perl
Export a website to an XML Page
1
1
1
12,295,930
0
0
0
I need nodes in different shapes in NetworkX, some rectangle and triangle nodes. Does anybody know if it is possible? regards
true
12,317,388
1.2
0
0
4
Found it, there is a property node_shape that allows changing shape.
0
1,795
0
4
2012-09-07T11:38:00.000
python,networkx
changing node shape in NetworkX
1
1
1
12,317,478
0
0
0
In selenium i am trying to enter text into the tinymce text area, but i am having trouble selecting the text area to input the text. Is there a way to select the text area behind tinymce or anyway to select tinymce so i can enter text. thanks
false
12,320,273
0.066568
0
0
1
Use command: runScript Target: tinyMCE.get('text_area_id').setContent('Your text here') or you can use tinyMCE.activeEditor.setContent('Your text here') which will select either the first or the last mceEditor, I forget..
0
525
0
1
2012-09-07T14:39:00.000
python,selenium,tinymce
Having trouble inputting into tinymce via selenium
1
1
3
22,871,270
0
0
0
I have read this example from AutobahnPython: https://github.com/tavendo/AutobahnPython/tree/master/examples/websocket/broadcast It looks pretty easy to understand and practice. But I want to add a little more. Members who submit the correct secret string can send the messages, anyone else can only view the information...
false
12,321,301
0.099668
1
0
1
Well it is purely your logic in the code. When you receive the message you are simply broadcasting it, what you have to do is to pass this onto a custom function, and there, do a check: Create a temporary array that contains list of active authenticated users. when user logs on, it should send this special string, ma...
0
1,310
0
1
2012-09-07T15:39:00.000
python,websocket,broadcasting,autobahn
Python - Broadcasting with WebSocket using AutobahnPython
1
1
2
14,835,403
0
0
0
I currently have the problem that I have a server script running on one computer as localhost:12123. I can connect to it using the same computer but using another computer in the same network does not connect to it (says it does not exist). Firewall is disabled. Does it have to do with permissions? The socket is create...
false
12,333,831
0.099668
0
0
1
Bind to 0.0.0.0 or the outside IP address instead, obviously.
0
1,991
0
0
2012-09-08T19:34:00.000
python,sockets,port
How to make HTTP server with port not 80 available for network?
1
1
2
12,333,846
0
0
0
I created a program which listens to particular socket in python, however I ctrl+c'd script which resulted in .close() nor called, however how can I free the socket now.
false
12,336,611
0.197375
0
0
2
The socket is closed when the process exits. The port it was using may hang around for a couple of minutes, that's normal, then it will disappear. If you need to re-use the port immediately, set SO_REUSEADDR before binding or connecting.
0
142
0
0
2012-09-09T04:57:00.000
python,sockets
closing a previously opened socket
1
1
2
12,336,669
0
1
0
I want to scrape a webpage that changes its content via a <select> tag. When I select a different option, the content of the page dynamically changes. I want to know if there is a way that I can change the option from a python script so I can get the content from all different pages of all different options in <select>...
false
12,349,295
0
0
0
0
I assume you use some library like urllib to do the scraping. You already know the website's content changes dynamically. I also assume that the dynamic content uses server-side interaction. This means, using javascript (ajax) the browser requests new data from the server, based on the value from the selection). If s...
0
2,430
0
3
2012-09-10T09:57:00.000
python,web-scraping
How to scrape a webpage that changes content from tag
1
2
2
12,349,430
0
1
0
I want to scrape a webpage that changes its content via a <select> tag. When I select a different option, the content of the page dynamically changes. I want to know if there is a way that I can change the option from a python script so I can get the content from all different pages of all different options in <select>...
false
12,349,295
0
0
0
0
As @Tichodroma said, when the select is changed, either: Some content previously hidden on the page is made visible, or: An ajax call is made to retrieve some additional content and add it to the DOM In both cases, JavaScript is involved. Have a look at it, and depending on what is happening (case #1 or #2), you shou...
0
2,430
0
3
2012-09-10T09:57:00.000
python,web-scraping
How to scrape a webpage that changes content from tag
1
2
2
12,349,434
0
1
0
Backdrop: Am building a shopify app using a test store provided by shopify. #Python #Django- Problem: I have setup shopify webhooks for my test store using the python API for the topics "products/update" and "products/delete". But my endpoints are not called by shopify when I manually update or delete a product on my t...
true
12,354,189
1.2
0
0
1
Thanks for the answers guys, but I found out that the issue was something else. I forgot to make a CSRF exemption for the POST request URL that Shopify calls and also forgot to add a trailing slash '/' at the end of the URL I told the webhook to call. I guess I would have caught these errors if I used something like po...
0
2,272
0
2
2012-09-10T14:50:00.000
python,django,shopify,webhooks
Shopify webhook not working when product updated/deleted
1
2
2
12,423,594
0
1
0
Backdrop: Am building a shopify app using a test store provided by shopify. #Python #Django- Problem: I have setup shopify webhooks for my test store using the python API for the topics "products/update" and "products/delete". But my endpoints are not called by shopify when I manually update or delete a product on my t...
false
12,354,189
0.099668
0
0
1
I don't have the creds to comment apparently, so I'll put this in an "answer" - to use the term very loosely - instead. I ran into something similar with the Python API, but soon realized that I was doing it wrong. In my case, it was toggling the fulfillment status, which then fires off an email notifying customers of ...
0
2,272
0
2
2012-09-10T14:50:00.000
python,django,shopify,webhooks
Shopify webhook not working when product updated/deleted
1
2
2
12,389,770
0
0
0
Is there any way to count the number of currently connected clients in a zeromq socket? If that's not possible, is there any way to determine whether the socket has no client connected to it? Thanks.
true
12,368,120
1.2
0
0
2
You could simply implement an counter with a second socket. Each time you have an active client or you close your socket, send a message on your "socket counter". ZeroMQ is made to combine sockets.
0
1,053
0
3
2012-09-11T10:54:00.000
python,zeromq
Counting The Number of Connection in a ZeroMQ Socket
1
1
1
12,396,881
0
1
0
I'm thinking if a user submits a message and they click a 'suggest tags' button, their message would be analyzed and a form field populated wIthaca random words from their post. Is it possible to do this on a scalable level? Would JavaScript be able to handle it or better to Ajax back to python? I'm thinking certain co...
false
12,372,258
0
0
0
0
Agree with @unwind , it depends on the content length of the text and your algorithm to grab the tags(scalability)
0
60
0
0
2012-09-11T14:39:00.000
javascript,python,tags
Is it possible to automatically pull random "tags" from a long string of text?
1
2
2
12,372,353
0
1
0
I'm thinking if a user submits a message and they click a 'suggest tags' button, their message would be analyzed and a form field populated wIthaca random words from their post. Is it possible to do this on a scalable level? Would JavaScript be able to handle it or better to Ajax back to python? I'm thinking certain co...
false
12,372,258
0
0
0
0
Of course it's possible, you pretty much described the algorithm to test, and it doesn't seem to contain any obviously non-computable steps: Split the message into words Filter out the common words Sort the words by length Pick the top ten and present them as tags Not sure what you mean by "scalable level", this soun...
0
60
0
0
2012-09-11T14:39:00.000
javascript,python,tags
Is it possible to automatically pull random "tags" from a long string of text?
1
2
2
12,372,295
0
0
0
I am trying to download emails using imaplib with Python. I have tested the script using my own email account, but I am having trouble doing it for my corporate gmail (I don't know how the corporate gmail works, but I go to gmail.companyname.com to sign in). When I try running the script with imaplib.IMAP4_SSL("imap.gm...
false
12,375,113
0.197375
1
0
2
IMAP server is still imap.gmail.com -- try with that?
0
321
0
1
2012-09-11T17:43:00.000
python,gmail,gmail-imap,imaplib
IMAP in Corporate Gmail
1
1
2
12,375,120
0
0
0
I would like to know why doesn't python2.7 drop blocking operations when ctrl+c is pressed, I am unable to kill my threaded application, there are several socket waits, semaphore waits and so on. In python3 ctrl+c dropped every blocking operation and garbage-collected everything, released all the sockets and whatsoever...
true
12,382,229
1.2
0
0
0
I guess you are launching the threads and then the main thread is waiting to join them on termination. You should catch the exception generated by Ctrl-C in the main thread, in order to signal the spawned threads to terminate (changing a flag in each thread, for instance). In this manner, all the children thread will t...
0
487
0
0
2012-09-12T06:19:00.000
python,multithreading,python-2.7,exit,kill
Terminate python application waiting on semaphore
1
1
1
12,390,276
0
1
0
I am trying to fetch the HTML content of a website using urllib2. The site has a body onload event that submit a form on this site and hence it goes to a destination site and render the details I need. response = urllib2.urlopen('www.xyz.com?var=999-999') www.xyz.com contains a form that is posted to "www.abc.com"...
false
12,384,056
0.197375
0
0
1
You have to figured out the call to that second page, including parameters sent, so you can make that call yourself from your python code, best way is navigate first page with google chrome page inspector opened, then go to Network tab where the POST call would be captured and you can see the parameters sent and all. T...
0
296
0
0
2012-09-12T08:29:00.000
python,urllib2
Fetch html content from a destination url that is on onload of the first site in urllib2
1
1
1
12,384,339
0
0
0
I want to parse application layer protocols from network trace using Google protocol buffer and replay the trace (I am using python). I need suggestions to automatically generate protocol message description (in .proto file) from a network trace.
false
12,398,517
0
0
0
0
So you want to reconstruct what .proto messages were being passed over the application-layer protocol? This isn't as easy as it sounds. First, .proto messages can't be sent raw over the wire, as the receiver needs to know how long they are. They need to be encapsulated somehow, maybe in an HTTP POST or with a raw 4-b...
0
455
0
0
2012-09-13T02:12:00.000
python,protocol-buffers,pcap
Google protocol buffer for parsing Text and Binary protocol messages in network trace (PCAP)
1
1
1
12,399,100
0
0
0
I have a consumer which listens for messages, if the flow of messages is more than the consumer can handle I want to start another instance of this consumer. But I also want to be able to poll for information from the consumer(s), my thought was that I could use RPC to request this information from the producers by usi...
true
12,407,485
1.2
1
0
1
After some researching it seems that this is not possible. If you look at the tutorial on RabbitMQ.com you see that there is an id for the call which, as far as I understand gets consumed. I've choosen to go another way, which is reading the log-files and aggregating the data.
0
2,271
0
3
2012-09-13T13:31:00.000
python,rabbitmq,messaging,pika
RPC calls to multiple consumers
1
1
2
12,478,098
0
1
0
I am building a screen clipping app. So far: I can get the html mark up of the part of the web page the user has selected including images and videos. I then send them to a server to process the html with BeautifulSoup to sanitize the html and convert all relative paths if any to absolute paths Now I need to render t...
true
12,436,551
1.2
0
0
1
Download the complete webpage, extract the style elements and the stylesheet link elements and download the files referenced the latter. That should give you the CSS used on the page.
0
118
0
0
2012-09-15T10:24:00.000
python,web-scraping
Python : Rendering part of webpage with proper styling from server
1
1
1
12,437,002
0
1
0
Scenario: User loads a page, image is being generated, show loading bar, notification event sent to browser. I am using python code to generate the image. Would it be ideal to have a web server that launches the script or embed a webserver code into the python script? Once the image is finished rendering, the client sh...
false
12,498,694
0.099668
0
0
1
I personally love Socket.IO and I would to it with it. Because it would be simpler a way. But that may be a bit too much work to set up just for that. Especially since it is not that simple in Python from what I heard compare to node where it really is about 10 lines server side. Without Socket.IO could do a long polli...
0
88
0
0
2012-09-19T16:11:00.000
php,javascript,python
Javascript-Python: serve dynamically generated images to client browser?
1
1
2
12,498,821
0
1
0
I have written many scrapers but I am not really sure how to handle infinite scrollers. These days most website etc, Facebook, Pinterest has infinite scrollers.
false
12,519,074
0.066568
0
0
1
Finding the url of the ajax source will be the best option but it can be cumbersome for certain sites. Alternatively you could use a headless browser like QWebKit from PyQt and send keyboard events while reading the data from the DOM tree. QWebKit has a nice and simple api.
0
29,452
0
31
2012-09-20T18:56:00.000
python,screen-scraping,scraper
scrape websites with infinite scrolling
1
1
3
12,529,766
0
1
0
Is there any feasible way to upload a file which is generated dynamically to amazon s3 directly without first create a local file and then upload to the s3 server? I use python. Thanks
false
12,570,465
0
0
1
0
Given that encryption at rest is a much desired data standard now, smart_open does not support this afaik
0
52,339
0
38
2012-09-24T18:09:00.000
python,amazon-s3,amazon
How to upload a file to S3 without creating a temporary local file
1
2
12
56,126,467
0
1
0
Is there any feasible way to upload a file which is generated dynamically to amazon s3 directly without first create a local file and then upload to the s3 server? I use python. Thanks
false
12,570,465
0.033321
0
1
2
I assume you're using boto. boto's Bucket.set_contents_from_file() will accept a StringIO object, and any code you have written to write data to a file should be easily adaptable to write to a StringIO object. Or if you generate a string, you can use set_contents_from_string().
0
52,339
0
38
2012-09-24T18:09:00.000
python,amazon-s3,amazon
How to upload a file to S3 without creating a temporary local file
1
2
12
12,570,568
0
0
0
What is the best way to communicate between a Python 3.x and a Python 2.x program? We're writing a web app whose front end servers will be written in Python 3 (CherryPy + uWSGI) primarily because it is unicode heavy app and Python 3.x has a cleaner support for unicode. But we need to use systems like Redis and Boto (AW...
false
12,597,394
0.379949
1
0
2
The best way? Write everything in Python 2.x. It's a simple question: can I do everything in Python 2.x? Yes! Can I do everything in Python 3.x? No. What's your problem then? But if you really, really have to use two different Python versions ( why not two different languages for example? ) then you will probably have ...
0
1,491
0
3
2012-09-26T08:15:00.000
python,python-3.x,python-2.x
communication between Python 3 and Python 2
1
1
1
12,599,590
0
0
0
Any web server might have to handle a lot of requests at the same time. As python interpreter actually has GIL constraint, how concurrency is implemented? Do they use multiple processes and use IPC for state sharing?
false
12,603,678
0.132549
0
0
2
You usually have many workers(i.e. gunicorn), each being dispatched with independent requests. Everything else(concurrency related) is handled by the database so it is abstracted from you. You don't need IPC, you just need a "single source of truth", which will be the RDBMS, a cache server(redis, memcached), etc.
1
2,640
0
16
2012-09-26T14:11:00.000
python,django,concurrency,webserver
How does a python web server overcomes GIL
1
2
3
12,604,317
0
0
0
Any web server might have to handle a lot of requests at the same time. As python interpreter actually has GIL constraint, how concurrency is implemented? Do they use multiple processes and use IPC for state sharing?
false
12,603,678
0.066568
0
0
1
As normal. Web serving is mostly I/O-bound, and the GIL is released during I/O operations. So either threading is used without any special accommodations, or an event loop (such as Twisted) is used.
1
2,640
0
16
2012-09-26T14:11:00.000
python,django,concurrency,webserver
How does a python web server overcomes GIL
1
2
3
12,603,848
0
0
0
I've got an XML file I want to parse with python. What is best way to do this? Taking into memory the entire document would be disastrous, I need to somehow read it a single node at a time. Existing XML solutions I know of: element tree minixml but I'm afraid they aren't quite going to work because of the problem I...
false
12,612,229
0.197375
0
0
2
The best solution will depend in part on what you are trying to do, and how free your system resources are. Converting it to a postgresql or similar database might not be a bad first goal; on the other hand, if you just need to pull data out once, it's probably not needed. When I have to parse large XML files, especi...
0
3,511
0
3
2012-09-27T00:04:00.000
python,xml,xml-parsing,large-files
Parsing a large (~40GB) XML text file in python
1
1
2
12,613,046
0
0
0
I'm writing some XML with element tree. I'm giving the code an empty template file that starts with the XML declaration:<?xml version= "1.0"?> when ET has finished making its changes and writes the completed XML its stripping out the declarion and starting with the root tag. How can I stop this? Write call: ET.Elemen...
false
12,612,648
1
0
0
6
There are different versions of ElementTree. Some of them accept the xml_declaration argument, some do not. The one I happen to have does not. It emits the declaration if and only if encoding != 'utf-8'. So, to get the declaration, I call write(filename, encoding='UTF-8').
0
13,577
0
10
2012-09-27T01:06:00.000
python,xml,elementtree
Python - Element Tree is removing the XML declaration
1
1
2
19,738,566
0
0
0
Here's what I need to do: I need to copy files over the network. The files to be copied is in the one machine and I need to send it to the remote machines. It should be automated and it should be made using python. I am quite familiar with os.popen and subprocess.Popen of python. I could use this to copy the files, BUT...
false
12,613,552
0
0
0
0
per my experience, use sftp the first time will prompt user to accept host public key, such as The authenticity of host 'xxxx' can't be established. RSA key fingerprint is xxxx. Are you sure you want to continue connecting (yes/no)? once you input yes, the public key will be saved in ~/.ssh/known_hosts, and next t...
0
1,825
1
0
2012-09-27T03:14:00.000
python,shell,terminal,centos
How to automate the sending of files over the network using python?
1
1
3
12,613,729
0
0
0
I am finding Neo4j slow to add nodes and relationships/arcs/edges when using the REST API via py2neo for Python. I understand that this is due to each REST API call executing as a single self-contained transaction. Specifically, adding a few hundred pairs of nodes with relationships between them takes a number of secon...
false
12,643,662
0.07983
0
1
2
Well, I myself had need for massive performance from neo4j. I end up doing following things to improve graph performance. Ditched py2neo, since there were lot of issues with it. Besides it is very convenient to use REST endpoint provided by neo4j, just make sure to use request sessions. Use raw cypher queries for bulk...
0
12,651
0
18
2012-09-28T16:15:00.000
python,neo4j,py2neo
Fastest way to perform bulk add/insert in Neo4j with Python?
1
1
5
31,026,259
0
0
0
I've been inspecting two similar solutions for supporting web sockets via sockJS using an independent Python server, and so far I found two solutions. I need to write a complex, scalable web socket based web application, and I'm afraid it will be hard to scale Tornado, and it seems Vertx is better with horizontal scali...
false
12,652,336
0.291313
0
0
3
Vertx has build-in clustering support. I haven't tried it with many nodes, but it seemed to work well with a few. Internally it uses hazelcast to organise the nodes. Vertx also runs on a JVM, which has already many monitoring/admin tools which might be useful. So Vertx seems to me like the "batteries included" solution...
0
1,306
1
2
2012-09-29T11:32:00.000
python,tornado,vert.x,sockjs
Vertx SockJS server vs sockjs-tornado
1
1
2
13,562,205
0
1
0
I currently have been assigned to create a web crawler to automate some reporting tasks I do. This web crawler would have to login with my credentials, search specific things in different fields (some in respect to the the current date), download CSVs that contain the data if there is any data available, parse the CSVs...
false
12,693,054
0.066568
0
0
1
Adding to mechanize: if your page has a javascript component that mechanize cant handle, selenium drives an actual web browser. If you're hellbent on using ruby, you can also use WATIR, but selenium has both ruby and python bindings.
0
321
0
3
2012-10-02T15:08:00.000
c++,python,ruby-on-rails,web-applications,web-crawler
Easiest way to tackle this web crawling task?
1
2
3
12,697,280
0
1
0
I currently have been assigned to create a web crawler to automate some reporting tasks I do. This web crawler would have to login with my credentials, search specific things in different fields (some in respect to the the current date), download CSVs that contain the data if there is any data available, parse the CSVs...
false
12,693,054
0
0
0
0
While this is not a great Stackoverflow question, since you are a student and it's for an internship, it seems like it would be in poor form to flag it, or down-vote it. :) Basically, you can pretty much accomplish this task with any of the languages you listed. If you want learning Ruby as a part of your experience f...
0
321
0
3
2012-10-02T15:08:00.000
c++,python,ruby-on-rails,web-applications,web-crawler
Easiest way to tackle this web crawling task?
1
2
3
12,693,218
0
0
0
my network does not support the ipv6 hence i have no access to ipv6 servers, is there any solution to connect to them using sockets that uses 'AF_INET' domain? or any kind of other solutions? is there any server on the Internet that does such a convert for free? i can reed python and c++.
false
12,698,862
0.291313
0
0
3
No; you cannot connect to an IPv6 server without some form of IPv6 transit. Depending on your network, you may be able to set up a 6to4 gateway. This is a server configuration change, though, and is outside the scope of Stack Overflow.
0
557
0
2
2012-10-02T21:47:00.000
c++,python,sockets,networking,network-programming
can i connect to a ipv6 address via a AF_INET domain socket?
1
1
2
12,698,891
0
0
0
I'm writing up an IRC bot from scratch in Python and it's coming along fine. One thing I can't seem to track down is how to get the bot to send a message to a user that is private (only viewable to them) but within a channel and not a separate PM/conversation. I know that it must be there somewhere but I can't find it ...
true
12,707,239
1.2
1
0
2
Are you looking for /notice ? (see irchelp.org/irchelp/misc/ccosmos.html#Heading227)
0
2,449
0
0
2012-10-03T11:08:00.000
python,protocols,irc
IRC msg to send to server to send a "whisper" message to a user in channel
1
1
1
12,721,513
0
0
0
I'm trying to track several keywords at once, with the following url: https://stream.twitter.com/1.1/statuses/filter.json?track=twitter%2C%20whatever%2C%20streamingd%2C%20 But the stream only returns results for the first keyword?! What am I doing wrong?
true
12,708,573
1.2
1
0
0
Try without spaces (ie. the %20). Doh!
0
163
0
0
2012-10-03T12:34:00.000
python,twitter,urlencode
Twitter Public Stream URL when several track keywords?
1
1
1
12,708,663
0
1
0
I have a server which files get uploaded to, I want to be able to forward these on to s3 using boto, I have to do some processing on the data basically as it gets uploaded to s3. The problem I have is the way they get uploaded I need to provide a writable stream that incoming data gets written to and to upload to boto ...
true
12,714,965
1.2
0
1
3
boto is a Python library with a blocking API. This means you'll have to use threads to use it while maintaining the concurrence operation that Twisted provides you with (just as you would have to use threads to have any concurrency when using boto ''without'' Twisted; ie, Twisted does not help make boto non-blocking o...
0
636
1
4
2012-10-03T18:54:00.000
python,stream,twisted,boto
Boto reverse the stream
1
1
2
12,716,129
0
0
0
I am trying to send commands to a server via a python script. I can see the socket connection being established on the server. But the commands I am sending across , do not seem to make it through(server does a read on the socket). The server currently supports a telnet command interpreter. ie: you telnet to the comman...
true
12,730,293
1.2
0
0
23
Telnet is a way of passing control information about the communication channel. It defines line-buffering, character echo, etc, and is done through a series of will/wont/do/dont messages when the connection starts (and, on rare occasions, during the session). That's probably not what your server documentation means. ...
0
30,360
0
22
2012-10-04T15:06:00.000
python,sockets,network-programming,telnet
How does telnet differ from a raw tcp connection
1
1
3
12,730,703
0
1
0
I would like to translate a few hundred words for an application I'm writing. This is a simple, one-off project, so I'm not willing to pay for the the google translate API. Is there another web service which will do this? Another idea is to just send a search to Google, and scrape the result from the first result. For ...
false
12,730,426
0
0
0
0
Or go to MicrosoftTranslator.com, and paste your text in one box, have it translate and cut and paste the result? Failing that, the MS Translator API can be used for up to 2 million characters a month for free...so maybe use that?
0
184
0
0
2012-10-04T15:14:00.000
python,web-scraping,translation
Automate translation for personal use
1
1
3
16,074,293
0
0
0
I'm unit testing a URL fetcher, and I need a test url which always causes urllib2.urlopen() (Python) to time out. I've tried making a php page with just sleep(10000) in it, but that causes 500 internal server error. How would I make a resource that causes a connection timeout in the client whenever it is requested?
true
12,753,527
1.2
1
0
0
While there have been some good answers here, I found that a simple php sleep() call with an override to Apache's timeout was all I needed. I know that unit tests should be in isolation, but the server this endpoint is hosted on is no going anywhere.
0
615
0
3
2012-10-05T20:22:00.000
php,python,apache,url,timeout
How should I create a test resource which always times out
1
2
5
12,941,867
0
0
0
I'm unit testing a URL fetcher, and I need a test url which always causes urllib2.urlopen() (Python) to time out. I've tried making a php page with just sleep(10000) in it, but that causes 500 internal server error. How would I make a resource that causes a connection timeout in the client whenever it is requested?
false
12,753,527
0.039979
1
0
1
Connection timeout? Use, for example, netcat. Listen on some port (nc -l), and then try to download data from that port.. http://localhost:port/. It will open connection, which will never reply.
0
615
0
3
2012-10-05T20:22:00.000
php,python,apache,url,timeout
How should I create a test resource which always times out
1
2
5
12,753,554
0
0
0
I have a list for followers: lof = [31536003, 15066760, 75862029] I can get the follower count for each follower in the list: user = tweepy.api.get_user(31536003) print user.followers_count However, I am trying to write a list comprehension that can return a list in python. The list should be a list of the follower co...
true
12,755,611
1.2
0
0
5
Found the answer.... loc = [tweepy.api.get_user(friend).followers_count for friend in lof]
0
1,505
0
2
2012-10-06T00:21:00.000
twitter,python-2.7
Find the number of follower using tweepy
1
1
1
12,755,702
0
1
0
I just deployed a Flask app on Webfaction and I've noticed that request.remote_addr is always 127.0.0.1. which is of course isn't of much use. How can I get the real IP address of the user in Flask on Webfaction? Thanks!
false
12,770,950
0.158649
0
0
4
The problem is there's probably some kind of proxy in front of Flask. In this case the "real" IP address can often be found in request.headers['X-Forwarded-For'].
0
42,164
0
33
2012-10-07T17:09:00.000
python,flask,webfaction
Flask request.remote_addr is wrong on webfaction and not showing real user IP
1
1
5
12,770,986
0
0
0
I want to be able to access the elements of a webpage with python. I use Python 2.5 with Windows XP. Currently, I am using pywinauto to try to control IE, but I could switch to a different browser or module if it is needed. I need to be able to click the buttons the page has and type in text boxes. So far the best I've...
false
12,780,635
0.197375
0
0
2
I think for interacting with webserver better is to use cUrl. All webservers function are responses for GET or POST request (or both). in order to call them, just call the urls that buttons are linked to and/or send POST data attaching that data to appropiate request obj before calling send method. cUrl is able to retr...
0
694
0
0
2012-10-08T11:17:00.000
python,webpage,pywinauto
How to control and interact with elements on a webpage displayed with IE or a different browser with pywinauto
1
1
2
13,868,001
0
0
0
I'm using Python to write a simple client to Move users, Reset password, Extend user account using Tim Golden's active_directory module. Currently I'm using the module with the default domain that I logged in with, and it works perfectly. But now I can't find any way to connect to another domain using the same module, ...
true
12,796,443
1.2
0
0
0
It seems that active_directory is using default Win32 API, which doesn't support user/pass binding to a different DC. You may have to use ldap module and find a workaround
0
913
0
0
2012-10-09T09:05:00.000
python,active-directory
Connect to AD domain with authentication using Python
1
1
1
14,350,855
0
0
0
I am trying to run the functional tests in parallel with multiprocess plugin which gives me random TimeoutException sometimes my tests are really simple, each of them just goes to a webpage and check if certain element exists. does anybody know what might be the cause? thanks
false
12,808,978
1
0
0
7
Try running nosetests with the --process-timeout value set to something higher than your tests would reasonably take: nosetests --processes=2 --process-timeout=120
0
1,972
0
4
2012-10-09T21:52:00.000
python,selenium,multiprocessing,nosetests,parallel-testing
parallel testing with selenium + nose
1
1
1
14,650,568
0
0
0
I am uploading videos to YouTube by using YouTube Data API (Python client library). Is it possible to set monetizing for that video from API rather than going to my account on the YouTube website and manually setting monetization for that uploaded video? If yes, then how can I do it from API? I am unable to find it in ...
false
12,840,696
0.379949
0
0
2
That's not something that's supported as part of the public YouTube Data API.
0
1,037
0
7
2012-10-11T13:29:00.000
python,youtube-api
Enable Monetization on YouTube video using YouTube API
1
1
1
12,842,420
0
0
0
I have developed my own program, but I would like to be able to dynamically tell the user that there is an update available for the program. This program is designed to be cross-platform, and is written in python. There will be two types of updates: 1) data updates (an xml file that includes the information required to...
false
12,842,693
0.462117
0
0
5
Set up a simple web service that returns the current version number of the xml file and the executable. Have your program dial home to this web service on startup, and if the web service returns a newer version number then what the program has in its local copy then display a message to the user saying they could upda...
1
7,942
0
5
2012-10-11T15:03:00.000
python,xml
python - Check for updates for a program
1
1
2
12,842,752
0
0
0
How can a client both react to user input and data received from the server? I created a UDP server, which can handle multiple clients and can react to the data received from each clients. So far the clients only react to user input. Is it possible, that the clients check for both user input and data on a specific port...
false
12,851,908
0
0
0
0
Consider using threads. Python threading is restricted; only one thread runs at a time within the interpreter, but if a thread is waiting for I/O (or a 'sleep') then other threads can run. You still need to use queues and semaphores and so forth. See the 'threading' module in the library.
0
90
0
0
2012-10-12T03:44:00.000
python,sockets,input,udp,port
Socketprogramming python
1
1
2
12,851,967
0
0
0
I am trying to run a python file from the telnet session Steps: Dailyscript.py Telnetting in to montavista from the telnet session I am trying to run another python file "python sample.py" sample.py Importing TestLib (in this file) But, when I run directly form my linux box, it is running fine. Is there any thing ...
false
12,862,260
0
1
0
0
Most likely the problem is that TestLib.py isn't in your working directory. Make sure your Dailyscript.py sets its directory to wherever you ran it from (over SSH) before executing python sample.py. Also, if you have SSH access, why aren't you just using SSH?
1
581
0
0
2012-10-12T15:22:00.000
python
Import Error: No Module found named TestLIb
1
1
1
12,863,073
0
0
0
Hello from what i understand that using Python i can dynamically send kml data to Google earth client. i was wondering is this possible for collada files? i need it in combination to load models in Google earth. so far i can do it manually.
false
12,874,266
0
0
0
0
You can do this, you would probably do it by creating a KML NetworkLink file that loads a KMZ that contains a KML file that points to a .dae file that is collada. That can all be autogenerated from Python. There are libraries to generate it or you can roll your own. Just search generate collada python and you'll find s...
0
356
0
0
2012-10-13T14:55:00.000
python,kml,google-earth,collada
Dynamically generate collada files
1
1
1
12,878,019
0
0
0
I'm writing a client-server app with Python. The idea is to have a main server and thousands of clients that will connect with it. The server will send randomly small files to the clients to be processed and clients must do the work and update its status to the server every minute. My problem with this is that for the ...
false
12,877,643
0.099668
0
0
1
There is generally speaking no problem with having even tens of thousands of sockets at once on even a very modest home server. Just make sure you do not create a new thread or process for each connection.
0
3,588
0
5
2012-10-13T22:36:00.000
python,sockets,client-server
Handle multiple socket connections
1
1
2
12,877,653
0
1
0
I want to catch the 1 thousand most viewed youtube videos through gdata youtube api. However, only the first 84 are being returned. If I use the following query, only 34 records are returned (plus the first 50). Anyone knows what is wrong? "http://gdata.youtube.com/feeds/api/standardfeeds/most_popular?start-index=1" re...
false
12,879,754
0.197375
0
0
1
YouTube will not provide this to you. They intentionally rate limit their feeds to prevent abuse.
0
164
0
0
2012-10-14T06:11:00.000
python,youtube,gdata
Youtube GData 2 thousand most viewed
1
1
1
12,892,498
0
1
0
I have a remote method created via Python web2py. How do I test and invoke the method from Java? I was able to test if the method implements @service.xmlrpc but how do i test if the method implements @service.run?
false
12,890,137
0.049958
1
0
1
I'd be astonished if you could do it at all. Java RMI requires Java peers.
0
2,053
0
0
2012-10-15T06:06:00.000
java,python,rmi,rpc,web2py
Using Java RMI to invoke Python method
1
1
4
12,890,526
0
1
0
I've started to learn python the past couple of days. I want to know the equivalent way of writing crawlers in python. so In ruby I use: nokogiri for crawling html and getting content through css tags Net::HTTP and Net::HTTP::Get.new(uri.request_uri).body for getting JSON data from a url what are equivalents of these...
false
12,890,897
0.148885
0
0
3
Between lxml and beautiful soup, lxml is more equivalent to nokogiri because it is based on libxml2 and it has xpath/css support. The equivalent of net/http is urllib2
0
5,706
0
2
2012-10-15T07:18:00.000
python,ruby,web-crawler
Going from Ruby to Python : Crawlers
1
1
4
12,891,191
0
0
0
I want to access with Selenium (through) Python, a URL that demands authentication. When visit the URL, manually a new authentication window pops up, on which I need to fill in a username and password. Only after clicking on “OK” this window disappears and I return to the original site. As I want to visit this URL on a...
false
12,893,264
0.197375
0
0
1
Using driver.get("https://username:password@somewebsite.com/") should directly log you in, without the popup being displayed, What about this did not work for you? EDIT I am not sure this will work but after driver.get("https://username:password@somewebsite.com/") Try accepting alert. For the alert - @driver.switch_t...
0
3,449
0
2
2012-10-15T09:57:00.000
python,firefox,authentication,selenium,form-submit
How to Submit Https authentication with Selenium in python
1
1
1
12,893,410
0
1
0
I have 10000 files in a s3 bucket.When I list all the files it takes 10 minutes. I want to implement a search module using BOTO (Python interface to AWS) which searches files based on user input. Is there a way I can search specific files with less time?
false
12,904,326
0.291313
0
1
3
There are two ways to implement the search... Case 1. As suggested by john - you can specify the prefix of the s3 key file in your list method. that will return you result of S3 key files which starts with the given prefix. Case 2. If you want to search the S3 key which are end with specific suffix or we can say extens...
0
5,534
0
2
2012-10-15T21:29:00.000
python,amazon-s3,boto
Search files(key) in s3 bucket takes longer time
1
1
2
12,907,767
0
0
0
As the title says, I'm curious if the functionality of editing a sent chat message can be replicated programatically using the Skype4Py api. I'm not sure when Skype added this feature, and the API, as far as I know, hasn't been maintained in some years, so I was just curious. I don't see anything that looks like it wo...
false
12,908,271
0
0
0
0
Looking at the docs, each chat message has a body (the text of the message) and a IsEditable property. So long as IsEditable=True you should be able to do m.Body = "some new text"
0
667
0
0
2012-10-16T05:44:00.000
python,skype4py
Is it possible to edit a previously sent chat message using the Skype4Py api?
1
1
1
15,720,075
0
0
0
I am writing a python script to copy python(say ABC.py) files from one directory to another directory with the same folder name(say ABC) as script name excluding .py. In the local system it works fine and copying the files from one directory to others by creating the same name folder. But actually I want copy these fi...
false
12,909,334
-0.099668
1
0
-1
I used the same script, but my host failed to respond. My host is in different network. WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
0
9,452
1
2
2012-10-16T07:14:00.000
python
How to Transfer Files from Client to Server Computer by using python script?
1
1
2
66,757,126
0
0
0
I'm working on a suite of tests using selenium webdriver (written in Python). The page being tested contains a form that changes its displayed fields based upon what value is selected in one of its select boxes. This select box has about 250 options. I have a test (running via nose, though that's probably irrelevant...
false
12,936,533
0.132549
0
0
2
In as much as a small amount of plastic explosive solves the problem of forgetting your house keys, I implemented a solution. I created a class that tracks a list of resources and the time they were added to it, blocks when a limit is reached, and removes entries when their timestamp passes beyond a timeout value. I ...
0
2,907
0
2
2012-10-17T14:23:00.000
python,selenium,webdriver,urllib2,tcp-ip
tcp/ip port exhaustion with selenium webdriver
1
1
3
12,940,958
0
0
0
I am trying to download only files modified in the last 30 minutes from a URL. Can you please guide me how to proceed with this. Please let me know if I should use shell scripting or python scripting for this.
false
12,940,223
0.379949
1
0
2
If the server supports if-modified-since, you could send the request with If-Modified-Since: (T-30 minutes) and ignore the 304 responses.
0
170
0
0
2012-10-17T17:45:00.000
python,bash,shell
Download files modified in last 30 minutes from a URL
1
1
1
12,940,327
0
0
0
Basically I want a Java, Python, or C++ script running on a server, listening for player instances to: join, call, bet, fold, draw cards, etc and also have a timeout for when players leave or get disconnected. Basically I want each of these actions to be a small request, so that players could either be processes on sa...
false
12,945,278
0.132549
1
0
2
Anything else? Maybe a cup of coffee to go with your question :-) Answering your question from the ground up would require several books worth of text with topics ranging from basic TCP/IP networking to scalable architectures, but I'll try to give you some direction nevertheless. Questions: Listen on ports or use sock...
0
2,321
0
2
2012-10-18T00:04:00.000
java,python,optimization,webserver,multiplayer
Multiplayer card game on server using RPC
1
2
3
12,946,896
0
0
0
Basically I want a Java, Python, or C++ script running on a server, listening for player instances to: join, call, bet, fold, draw cards, etc and also have a timeout for when players leave or get disconnected. Basically I want each of these actions to be a small request, so that players could either be processes on sa...
false
12,945,278
0.066568
1
0
1
Honestly, I'd start with classic LAMP. Take a stock Apache server, and a mysql database, and put your Python scripts in the cgi-bin directory. The fact that they're sending and receiving JSON instead of HTTP doesn't make much difference. This is obviously not going to be the most flexible or scalable solution, of cours...
0
2,321
0
2
2012-10-18T00:04:00.000
java,python,optimization,webserver,multiplayer
Multiplayer card game on server using RPC
1
2
3
12,963,229
0
1
0
I like to use Python's SimpleHTTPServer for local development of all kinds of web applications which require loading resources via Ajax calls etc. When I use query strings in my URLs, the server always redirects to the same URL with a slash appended. For example /folder/?id=1 redirects to /folder/?id=1/ using a HTTP 30...
false
12,953,542
0.321513
0
0
5
The right way to do this, to ensure that the query parameters remain as they should, is to make sure you do a request to the filename directly instead of letting SimpleHTTPServer redirect to your index.html For example http://localhost:8000/?param1=1 does a redirect (301) and changes the url to http://localhost:8000/?p...
0
6,427
0
13
2012-10-18T11:26:00.000
python,simplehttpserver,webdev.webserver
Why does SimpleHTTPServer redirect to ?querystring/ when I request ?querystring?
1
1
3
25,786,569
0
0
0
For the last few days I have been trying ti install the Native Client SDK for chrome in Windows and/or Ubuntu. I'm behind a corporate network, and the only internet access is through an HTTP proxy with authentication involved. When I run "naclsdk update" in Ubuntu, it shows "urlopen error Tunnel connection failed: 407...
true
12,964,666
1.2
0
0
0
I got a solution- not a direct one, though. managed to use a program to redirect the HTTPS traffic through the HTTP proxy. I used the program called "proxifier". Works great.
0
1,326
1
1
2012-10-18T22:21:00.000
python,google-nativeclient
Installing Chrome Native Client SDK
1
1
2
13,452,816
0
1
0
I'm using the python framework Boto to interact with AWS DynamoDB. But when I use "item_count" it returns the wrong value. What's the best way to retrieve the number of items in a table? I know it would be possible using the Scan operation, but this is very expensive on resources and can take a long time if the table i...
true
12,999,262
1.2
0
0
5
The item_count value is only updated every six hours or so. So, I think boto is returning you the value as it is returned by the service but that value is probably not up to date.
0
592
0
3
2012-10-21T15:33:00.000
python,amazon-web-services,boto,amazon-dynamodb
Boto's DynamoDB API returns wrong value when using item_count
1
1
1
13,003,481
0
1
0
I have a cherrypy web server that needs to be able to receive large files over http post. I have something working at the moment, but it fails once the files being sent gets too big (around 200mb). I'm using curl to send test post requests, and when I try to send a file that's too big, curl spits out "The entity sent w...
false
13,002,676
0
0
0
0
Huge file uploads always problematic. What would you do when connection closes in the middle of uploading? Use chunked file upload method instead.
0
4,776
0
3
2012-10-21T22:07:00.000
python,http,post,upload,cherrypy
Python: sending and receiving large files over POST using cherrypy
1
1
2
26,299,500
0
1
0
I'm extremely new to Python, read about half a beginner book for Python3. I figure doing this will get me going and learning with something I actually want to do instead of going through some "boring" exercises. I'm wanting to build an application that will scrape Reddit for the top URL's and then post these onto my ow...
true
13,040,048
1.2
0
0
2
Would it make sense to keep the Python scraper application running on it's own server, which then writes the scraped URL's to the database? Yes, that is a good idea. I would set up a cron job to run the program every so often. Depending on the load you're expecting, it doesn't necessarily need to be on its own serve...
0
570
0
2
2012-10-23T22:04:00.000
python,json,reddit
Scraping news sites with Python
1
1
1
13,040,391
0
0
0
I have a file which contains raw IP packets in binary form. The data in the file contains a full IP header, TCP\UDP header, and data. I would like to use any language (preferably python) to read this file and dump the data onto the line. In Linux I know you can write to some devices directly (echo "DATA" > /dev/devic...
false
13,040,834
0.197375
0
0
2
No; there is no /dev/eth1 device node -- network devices are in a different namespace from character/block devices like terminals and hard drives. You must create an AF_PACKET socket to send raw IP packets.
0
2,540
1
3
2012-10-23T23:25:00.000
python,linux,networking,packet
Writing raw IP data to an interface (linux)
1
1
2
13,040,908
0