I am on OSX Snow Leopard (10.6.2) I can install anything I need to. I would preferably like a Python or Java solution. I have searched on Google and found lots of information on writing my own program to do this, but this is a just a quick and dirty experiment so I don't want to invest a lot of time on writing a bunch of code to do this, I am sure someone else has done this already.
Hello,
I use a c++ dll in python. That dll uses other dlls.
I want to know if it's possible to include all the dll's in my .exe using py2exe without calling them directlly. If so, how can I do it?
Thanks in advance :)
I have two points in 3D:
(xa,ya,za)
(xb,yb,zb)
And I want to calculate the distance:
dist = sqrt((xa-xb)^2 + (ya-yb)^2 + (za-zb)^2)
What's the best way to do this with Numpy, or with Python in general? I have:
a = numpy.array((xa,ya,za))
b = numpy.array((xb,yb,zb))
A periodic computer generated message (simplified):
Hello user123,
- (604)7080900
- 152
- minutes
Regards
Using python, how can I extract "(604)7080900", "152", "minutes" (i.e. any text following a leading "- " pattern) between the two empty lines (empty line is the \n\n after "Hello user123" and the \n\n before "Regards"). Even better if the result string list are stored in an array. Thanks!
Given the following function:
def foo(a, b, c):
pass
How would one obtain a list/tuple/dict/etc of the arguments passed in, without having to build the structure myself?
Specifically, I'm looking for Python's version of JavaScript's arguments keyword or PHP's func_get_args() method.
What I'm not looking for is a solution using *args or **kwargs; I need to specify the argument names in the function definition (to ensure they're being passed in) but within the function I want to work with them in a list- or dict-style structure.
How do you guys deploy your code on your servers? I am using Fabric and Python and I would like a more automated way of pulling code from the repository through the use of public keys, but without any ops or manual intervention to set up the public keys.
Are you storing them in the code as text or in a database and generate the pk file on the fly?
What is the best way to save a user profile with Google App Engine (Python) ?
What I did to solve this problem is create another Model, with a UserProperty, but requesting the profile from the user I have to do something like this:
if user:
profile = Profile.all().filter('user =', user).fetch(1)
if profile:
property = s.get().property
Any ideas?
I am working on a project that requires programmatically distributing a compressed file that in a format that is associated with my software. I am writing the software in Python.
I would use .zip, but I don't want to overwrite any previouse filetype associations. ( with zip utilities )
How do I use lookahead assertion to determine if a certain character exist at most a certain number of times in a string.
For example, let's say I want to check a string that has at least one character to make sure that it contains "@" at most 2 times. Thanks in advance. Using python if that matters.
Hey everyone, I was wondering how would I start programming an interface to trading stocks in Etrade in python. I am attempting to make an automated trading bot, but there is no api publicly available for automated trading with Etrade. Thanks in advance. ^^
Hello,
I'm writing a program in python using dbus that detects inserted usb drives and manipulates the files inside of them. However, I can't seem to retrieve the path on my system of an inserted usb. Is there someway that I can get the path of an inserted usb in dbus, perhaps by using the GetProperty() method? I have tried using GetProperty("block.device"), but that returns /dev/sdc1 which doesn't exist on my system. Thanks in advance for any help!
Are there any publicly available SOAP 1.2/WSDL 2.0 compliant free web services for testing a Python based soap client library (e.g. Zolera SOAP Infrastructure)?
So far, it appears to me that Google Web API may be the only option.
Otherwise, how can one test a SOAP 1.2 compliant client library?
I'm looking to find a way to in real-time find the shortest path between nodes in a huge graph. It has hundreds of thousands of vertices and millions of edges. I know this question has been asked before and I guess the answer is to use a breadth-first search, but I'm more interested in to know what software you can use to implement it. For example, it would be totally perfect if it already exist a library (with python bindings!) for performing bfs in undirected graphs.
I would like to convert this string
foo_utf = u'nästy chäräctörs with å and co.' # unicode
into this
foo_ascii = 'nästy chäräctörs with å and co.' # ASCII
.
Any idea how to do this in Python (2.6)? I found unicodedata module but I have no idea how to do the transformation.
I am trying to use python's multiprocessing library to hopefully gain some performance. Specifically I am using its map function. Now, for some reason when I swap it out with its single threaded counterpart I don't get any memory leaks over time. But using the multiprocessing version of map causes my memory to go through the roof. For the record I am doing something which can easily hog up loads of memory, but what would the difference be between the two to cause such a stark difference?
I can look inside setup.py I suppose to see if it's a distutils package. But in the process of familiarizing myself with python package management I have noticed that there seems to be more than one way to do it. So:
How can I check an unzipped packages directory or setup.py to see how to build it?
Hello,
I want to know if it's possible to control "Microsoft Speech Recognition" using c#.
Is it possible, for instance, to simulate the click on "On: Listen to everything I say" programmatically using c# or python?
I am looking for a convenient way to create a list of lists for which the lists within the list have consecutive numbers. So far I only came up with a very unsatisfying brute-typing force solution (yeah right, I just use python for a few weeks now):
block0 = []
...
block4 = []
blocks = [block0,block1,block2,block4]
I appreciate any help that works with something like nrBlocks = 4.
Generally I use lxml for my HTML parsing needs, but that isn't available on Google App Engine. The obvious alternative is BeautifulSoup, but I find it chokes too easily on malformed HTML. Currently I am testing libxml2dom and have been getting better results.
Which pure Python HTML parser have you found performs best? My priority is the ability to handle bad HTML over speed.
Let's say I managed to get the dictionary opened for iTunes in the Applescript editor:
How would I access the "search" commands using Python with pyobjc?
I know I get can hold of the iTunes application using:
iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes")
but after I do a dir on it, I don't see the search command in the returned dictionary. Help please!
Does anyone know of an example where it is shown how to drag a button from one panel to another in wxPython?
I have created a bitmap button in a panel, and I would like to be able to drag it to a different panel and drop I there.
I haven't found any examples using buttons, just text and files.
I am using the latest version of Python and wxPython.
Hi,
I am working on Enterprise Search and we are using Fast ESP and for now i have 4 projects but i have no information about stages and python. But i realize that i have learn custom stage development. Because we have a lot of difficulties about document processing. I want to know how can i develop custom stage and especially i wanna know about how i can find Attributefilter stage source code. I am waiting your answers