How i can send the commands from keyboards using python. I am trying to automate mac app (GUI).
Hello, I am trying to automate a app using python. I need help to send keyboard commands through python. I am using powerBook G4. ...
Hello, I am trying to automate a app using python. I need help to send keyboard commands through python. I am using powerBook G4. ...
I'm new to threading and was wondering if it's bad to spawn a lot of threads for various tasks (in a server environment). Do threads take up a lot more memory/cpu compared to more linear programming? ...
Are there any specific advantages or disadvantages to either? ...
I'm writing a Django app that performs various functions, including inserting, or updating new records into the database via the URL. So some internal application sends off a request to /import/?a=1&b=2&c=3, for example. In the view, I want to create a new object, foo = Foo() and have the members of foo set to the data in the request.GE...
I am new to C++/Python mixed language programming and do not have much idea about Python/C API. I just started using Boost.Python to wrap a C++ library for Python. I am stuck at wrapping a function that takes pointer to an array as an argument. Following (2nd ctor) is its prototype in C++. class AAF{ AAF(AAF_TYPE t); AAF(double v0, ...
Is there any way besides Shoes to develop and distribute cross-platform GUI desktop applications written in Ruby? I come to believe that general bugginess of _why's applications is exceptionally crippling in case of Shoes, and anything more complex than a two-button form is a pain to maintain. RubyGTK, wxRuby, etc seem to be promising,...
I have a list of dictionaries like so: listDict = [{'id':1,'other':2},{'id':3,'other':4},{'id':5,'other':6}] I want a list of all the ids from the dictionaries. So, from the given list I would get the list: [1,3,5] It should be one line. I know I've done this before, I've just forgotten the syntax...Thanks ...
I've got some strange behavioral differences between Python's subprocess.call() and os.system() that appears to be related to setgid. The difference is causing Perl's taint checks to be invoked when subprocess.call() is used, which creates problems because I do not have the ability to modify all the Perl scripts that would need untaint c...
I have a taskbar menu that when clicked is connected to a slot that gets the trigger event. Now the problem is that I want to know which menu item was clicked, but I don't know how to send that information to the function connected to. Here is the used to connect the action to the function: QtCore.QObject.connect(menuAction, 'triggered(...
I am writing a python extension to provide access to Solaris kstat data ( in the same spirit as the shipping perl library Sun::Solaris::Kstat ) and I have a question about conditionally returning a list or a single object. The python use case would look something like: cpu_stats = cKstats.lookup(module='cpu_stat') cpu_stat0 = ...
I am an avid fan of the Spring framework for Java (by Rod Johnson). I am learning Python and was excited to find about Spring for Python. I would be interested in hearing the community's views on the comparison of these two flavours of Spring. How well does it fit Python's paradigms etc. ...
Okay lets say i have a list, and i want to check if that list exists within another list. I can do that doing this: all(value in some_map for value in required_values) Which works fine, but lets say i want to the raise an exception when a required value is missing, with the value that it is missing. How can i do that using list compre...
In mod_wsgi I send the headers by running the function start_response(), but all the page content is passed by yield/return. Is there a way to pass the page content in a similar fashion as start_response()? Using the return.yield statement is very restrictive when it comes to working with chunked data. E.g. def Application(): b = ...
Hello. I have a python template engine that heavily uses regexp. It's uses concatenation like re.compile( regexp1 + "|" + regexp2 + "*|" + regexp3 + "+" ) I can modify individual substrings (regexp1, regexp2 etc). Is it any small and light expression that match nothing so i can use it inside a template where i don't want any matches...
Hi, I like to use python for almost everything and always had clear in my mind that if for some reason I was to find a bottleneck in my python code(due to python's limitations), I could always use a C script integrated to my code. But, as I started to read a guide on how to integrate python. In the article the author says: There are se...
Hi - You probably know that IE has this thing where you can save a web page, and it will automatically download the html file and all he image/css/js files that the html file uses. Now there is one problem with this- the links in the html file are not changed. So if I download the html page of example.com, which has an < a href=/hi.ht...
Hi I'm guessing this is going to involve regexp or something, but I'll give it a shot. At the minute, a user can break a website by typing something similar to £$(*£$(£@$&£($ in the title field, which is converted into a slug using Django slugify. Because none of these characters can be converted, Django returns an error. My question ...
hi, i've got an appengine project and in my template i want to do something like {% for i in range(0, len(somelist)) %} {{ somelist[i] }} {{ otherlist[i] }} {% endfor %} i've tried using 'forloop.counter' to access list items too, but that didn't work out either. any suggestions? regards, mux ...
Any python OpenID server available? I'd like to host my own openid provider, is there anything available in python? ...
I have a program in Python that gets a window handle via COM from another program (think of the Python program as an addin) I set this window to be the main Python frame's parent so that if the other program minimizes, the python frame will too. The problem is when I go to exit, and try to close or destroy the main frame, the frame.clos...