How would I convert test cases made by Selenium IDE to Python without exporting every test case by hand? Is there any command line converter for that job?
In the end I want to use Selenium RC and Pythons build in unittest to test my websites.
Thanks a lot.
Looking to put together a 3D side-scrolling action platformer. Since this is my first time trying to put together a non-simple adventure game, I'm at a loss for which engine to consider.
I would prefer one that supports scripting in python, since that's my primary language. Without tight controls, the game will suck... so speed is a priority. Cross-platform is also important to me.
Any suggestions?
I have an App Engine app written in Google's webapp framework and I want to add some credit card handling to it.
Does a library already exist to integrate payment processing into an App Engine Python app?
I want to memcache an xmldata using python,also needs to update the cache with the refreshed xmldata retreived from webserver,could any one help me with sample code.
What tools are available in Python to assist in parsing a context-free grammar?
Of course it is possible to roll my own, but I am looking for a generic tool that can generate a parser for a given CFG.
How do I type a floating point infinity literal in python?
I have heard
inf = float('inf')
is non portable. Thus, I have had the following recommended:
inf = 1e400
Is either of these standard, or portable? What is best practice?
I am currently get access to a cluster of Unix machines, but they don't have the software I need (numpy, scipy, matplotlib, etc), and I have to install them by myself (I don't have the root permission, either, so commands like apt-get or yast doesn't work).
In the worst case, I have to compile them all from source. Is there any better way to do so? I hear something about Enthought Python and Sage, but not sure what is the best way to do so.
Any suggestion?
Total Python newb here. I have a images directory and I need to return the names and urls of those files to a django template that I can loop through for links. I know it will be the server path, but I can modify it via JS. I've tried os.walk, but I keep getting empty results.
Consider this Python code for printing a list of comma separated values
for element in list:
print element + ",",
What is the preferred method for printing such that a comma does not appear if element is the final element in the list.
ex
a = [1, 2, 3]
for element in a
print str(element) +",",
output
1,2,3,
desired
1,2,3
I am writing a forum in Python. I want to strip input containing the right-to-left mark and things like that. Suggestions? Possibly a regular expression?
How to start a programm with Python?
I thougt this would be very easy like:
open(r"C:\Program Files\Mozilla Firefox\Firefox.exe")
But nothing happen.
How to do this?
Thanks in advance.
Hi,
I'd like to write some Python unit tests for my Google App Engine. How can I set that up? Does someone happen to have some sample code which shows how to write a simple test?
Hello.
I'm having a problem with the module subprocess.
I'm running a script from python through:
subprocess.Popen('./run_pythia.sh',shell=True).communicate()
and sometimes it just blocks and it doesn't finish to execute the script. Before I was using .wait() instead of .communicate() but then because of this:
http://dcreager.net/2009/08/06/subprocess-communicate-drawbacks/
I changed to .communicate(). Nevertheless the problem continues.
Can anyone help me?
My emacs hangs (Ubuntu 9 + emacs 23 + pyflakes) when I type """ quotes for string blocks.
anybody experience the same problem? I think, it may not be the emacs problem but some python mode or pyflakes which I use it for error checking.
Anybody hot around the issue? It really frustrating experience.
All the examples I've seen of sock.listen(5) in the python documentation suggest I should set the max backlog number to be 5. This is causing a problem for my app since I'm expecting some very high volume (many concurrent connections). I set it to 200 and haven't seen any problems on my system, but was wondering how high I can set it before it causes problems..
Anyone know?
Hi,
I want to convert the mysql database table contents to an Excel(.xls) or comma seperated file(csv) using python script... Is it possible? Any one can help me?
Thanks in advance,
Nimmy
I'd like to have a Python program start listening on port 80, but after that execute without root permissions. Is there a way to drop root or to get port 80 without it?
Is anyone having experience working with pycassa I have a doubt with it. How do I get all the keys that are stored in the database?
well in this small snippet we need to give the keys in order to get the associated columns (here the keys are 'foo' and 'bar'),that is fine but my requirement is to get all the keys (only keys) at once as Python list or similar data structure.
cf.multiget(['foo', 'bar'])
{'foo': {'column1': 'val2'}, 'bar': {'column1': 'val3', 'column2': 'val4'}}
Thanks.
I retrieved the data encoded in big5 from database,and I want to send the data as email of html content, the code is like this:
html += """<tr><td>"""
html += """unicode(rs[0], 'big5')""" # rs[0] is data encoded in big5
I run the script, but the error raised: UnicodeDecodeError: 'ascii' codec can't decode byte......
However, I tried the code in interactive python command line, there are no errors raised, could you give me the clue?
Is there a way in python to turn a try/except into a single line?
something like...
b = 'some variable'
a = c | b #try statement goes here
Where b is a declared variable and c is not... so c would throw an error and a would become b...
Does Python have a pool of all strings and are they (strings) singletons there?
More precise, in the following code one or two strings were created in memory:
a = str(num)
b = str(num)
?
I am just getting into Python development and would like to know which single IDE or editor is the best.
I mainly use Linux, but don't let that stop you if you think the best one is Win/Mac only.
Can python retrieve the name of the user that owns a windows service?
I've had a fiddle with win32serviceutil but to no avail, nor can I find much documentation on it beyond starting and stopping services.
Thanks!