Hi, big fan of xpath on .net, and sax in python, but first time using xpath in python.
I have a small script, that uses xpath to select some nodes from a doc, iterates through them, and then ideally uses xpath again to get the relevant data from them. However I can't get that last bit, once I have the xmlNode I cannot get a context from...
I'd like to write a program able to "use" other programs by taking control of the mouse/keyboard and being able to "see" what's on the screen.
I used AutoIt to do something similar, but I had to cheat sometimes because the language is not that powerful, or maybe it's just that I suck and I'm not able to do that much with it :P
So... I...
Hi,
I'm trying to get a dict out of a method, so far I'm able to get the method name, and its arguments (using the inspect module), the problem I'm facing is that I'd like to have the default arguments too (or the argument type).
This is basically my unit test:
class Test:
def method1(anon_type, array=[], string="string", integer=...
I'm working on a small project, and I wanted to provide multiple caching options to the end user. I figured with Django it's pretty simplistic to swap memcached for database or file based caching. My memcached implementation works like a champ without any issues. I placed time stamps on my pages, and curl consistently shows the older tim...
How do I, in a single expression, get a dictionary
where one key-value pair has been added to a sub-dictionary
in some input dictionary? The input dictionary should be left unchanged. It
can be assumed the sub-dictionary does exist and that the new key-value pair is not already in the sub-dictionary.
Update 2 (see below for definition...
I have a python desktop application that needs to store user data. On Windows, this is usually in %USERPROFILE%\Application Data\AppName\, on OSX it's usually ~/Library/Application Support/AppName/, and on other *nixes it's usually ~/.appname/.
There exists a function in the standard library, os.path.expanduser that will get me a user's...
I have neglected my programming skills since i left school and now i want to start a few things that are running around in my head. Qt would be the toolkit for me to use but i am undecided if i should use Python (looks to me like the easier to learn with a few general ideas about programming) or C++ (the thing to use with Qt).
In my scho...
Hi, I'm new to Python and programming in general (a couple of weeks at most).
Concerning Python and using modules, I realise that functions can imported using from a import *.
So instead of typing
a.sayHi()
a.sayBye()
I can say
sayHi()
sayBye()
which I find simplifies things a great deal. Now, say I have a bunch of variables that...
An asyncore-based XMPP client opens a normal TCP connection to an XMPP server. The server indicates it requires an encrypted connection. The client is now expected to start a TLS handshake so that subsequent requests can be encrypted.
tlslite integrates with asyncore, but the sample code is for a server (?) and I don't understand what i...
I'm having a somewhat odd problem with Python(2.6.2) that I've come to the conclusion is a bug in the Vista port (I cant replicate it in XP or Linux).
I have a list of users, encrypted passwords, and their host that I am storing in a larger list (it's acting as a sort of database).
This all works fine and dandy, except for that there i...
I'd like to run a system process, intercept the output, and modify it real-time, line by line, in a Python script.
My best attempt, which waits for the process to complete before printing, is:
#!/usr/bin/env python
import subprocess
cmd = "waitsome.py"
proc = subprocess.Popen(cmd, shell=True, bufsize=256, stdout=subprocess.PIPE)
for l...
I am not very familiar with databases, and so I do not know how to partition a table using sqlachemy...
Your help would be greatly appreciated.
...
Is there any LINQ-like project for Python that can automatically query XML files and/or RDBMS tables? The syntax does not have to be exactly like LINQ in C#, but hopefully close in a pythonic way.
...
Hi!
I am currently faced with a design problem in my game design, not terrible but it bothers me enough so I want to ask others opinions :-)
I am currently experimenting with pygame, I have developed a little space shooter and now I would like to handle some bonuses.
Right now I have an abstract class Bonus from which derive all the b...
How to check available Python libraries on Google App Engine & add more?
Is SQLite available or we must use GQL with their database system only?
Thank you in advance.
...
What's the simplest way to put a python script into the system tray?
My target platform is Windows. I don't want to see the 'cmd.exe' window.
...
I'm still looking for a usable documentation tool chain. Working in the Java environment but also a Python user, I wondered if Sphinx would run on Jython 2.5?
...
How can I persistently modify the Windows environment variables from a Python script? (it's the setup.py script)
I'm looking for a standard function or module to use for this. I'm already familiar with the registry way of doing it, but any comments regarding that are also welcome.
...
Currently Google App Engine supports both Python & Java. Java support is less mature. However, Java seems to have a longer list of libraries and especially support for Java bytecode regardless of the languages used to write that code. Which language will give better performance and more power? Please advise. Thank you!
Edit:
http://grou...
hello to all.im using python API in our research project.i read lot of ppt and material, and finally understand this concept now i have task to execute simple function which is chek user credential thorough openid provider and return successful after the valid user check.....
...