Hi,
I am writting apython script and I am running out of time. I need to so some things that I know pretty well in bash, so I just wonder how can I embed some bash lines into apython script.
Thanks
I am using python and want to create a fullscreen window. I know about the pygame.FULLSCREEN flag but when I use that there's areas of black around the screen. Is there any way to get the monitor size using python so I can make the window the correct size?
Hi all,
Matplotlib and pylab doesn't work in python cgi. but it's working properly in python shell.. Any one can help me....... Plz.......
Thanks in advance......
I have a bunch of HTML files I downloaded using HTTPLIB2 package in Python. ' ' are showing as 'Â '.
02/12/2004Â is showing while 02/12/2004 is the desired format.
How do I replace the 'Â ' with ' ' in Python? Thanks a lot!
In Python, is there a mean to enforce the use of spaces or tabs indentation with a per file basis ?
Well, perhaps "enforce" is too strong, its more like "recommands".
I keep getting files with mixed indentation and this is annoying... (to say the least) Python itself can tell when there is a problem, but I am searching something to do that at the editor level, like it exists for the charset.
Hi All,
I know that there is the PyObjC bridge is OSX and what I want to do is to put apython application/script in the rightclick context menu of OS X. there is the OnMyCommand plugin but I dont think that supports python. I've had a look at how to do it in Carbon/ Objective-C and i'll admit it im a wuss and am just not smart enough yet to grok how to do it (I aint even close to groking it actually.)
Anybody got any idea's on how I might go about this?
Cheers
Is there any python library that can keep a client-side SQLite database in sync with a server-side PostgreSQL database?
There are solutions for Java, such as Daffodil or SymmetricDS. Is there something similar for python?
When I try to print a Unicode string in a windows console, I get a "UnicodeEncodeError: 'charmap' codec can't encode character ...." error. I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a "?" instead of failing in this situation?
Edit: I'm using Python 2.5.
Hello
i want to create apython application that consume a php nusoap webservice
and get the result and save it in database
what is the best way to do that using python
regards
Hi guys, I had written a program in Python 3, but now want to convert it into Python 2 code. Are there any utilities to do that automatically?
Thanks, R
I need apython script that will do the following:
connect to a URL, and that URL will return a number like 1200.
Use the number, to download xml files named: 1 to x where x is the number from #1.
store the files in a particular directory.
Sorry I've never written apython script, so if you could guide me along that would be great (maybe with a some comments).
I will be running this as a cron job if that matters.
The Ruby LESS gem looks awesome - and I am working on a Python/Pylons web project where it would be highly useful. CSS is, as someone we're all familiar with recently wrote about, clunky in some important ways. So I'd like to make it easier on myself.
Is there an existing Python module or library that provides parallel functionality?
I'm writing a web app using Python and the web.py framework, and I need to use memcached throughout.
I've been searching the internet trying to find some good documentation on the python-memcached module, but all I could find was this example on the MySQL website, and the documentation on its methods isn't great.
Hello. I have a Java app that takes pretty much time to be initialized (so I can't use command-line like interface) and I need to pass text and receive the output of a Java method from Python. Is it possible to load the Java application, have it opened all the time the Python script runs and use a method from that app?
How would you convert an integer to base 62 (like hexadecimal, but with these digits: '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ').
I have been trying to find a good Python library for it, but they all seems to be occupied with converting strings. The Python base64 module only accepts strings and turns a single digit into four characters. I was looking for something akin to what URL shorteners use.
If you look at the following line of python code:
bpy.ops.object.particle_system_add({"object":bpy.data.objects[2]})
you see that in the parameters there is something enclosed in braces. Can anyone tell me what the braces are for (generically anyway)? I haven't really seen this type of syntax in python and I can't find any documentation on it.
Any help is greatly appreciated. Thank you.
I want to declare an Array and all items present in the ListBox Should Be deleted irrespective of the Group name present in the ListBox. can any body help me coding in Python. I am using WINXP OS & Python 2.6.
I need to create a large matrix (array) structure (3 axis) and each element should store the reference to aPython object (myclass instance). Is it possible to use numpy to create such an array. Which data type should I use in order to store Python references?
The advantage of numpy is the support of slicing at different levels. The alternativee is to create a nested (nested) list but it is a cumbersome solution.
How can I write to files using Python (on Windows) and use the Unix end of line character?
e.g. When doing:
f = open('file.txt', 'w')
f.write('hello\n')
f.close()
Python automatically replaces \n with \r\n.
I'd like to be able to post twitter messages from python 3.0. None of the twitter API I have looked at support python 3.1. Since the post proceedure only requires this :
JSON: curl -u username:password -d status="your message here" http://api.twitter.com/1/statuses/update.json
I was wondering if it is possible with the standard libraries to format this so a message could be sent. My head says it should be possible.
I'd like my Python script to read some data out of a postgresql dump file. The Python will be running on a system without postgresql, and needs to process the data in a dump file.
It looks fairly straightforward to parse the CREATE TABLE calls to find the column names, then the INSERT INTO rows to build the contents. But I'm sure there would be quite a few gotchas in doing this reliably. Does anyone know of a module which will do this?
What is the equivalent of the backticks found in Ruby and Perl in Python? That is, in Ruby I can do this:
foo = `cat /tmp/baz`
What does the equivalent statement look like in Python? I've tried os.system("cat /tmp/baz") but that puts the result to standard out and returns to me the error code of that operation.
Looking to use FastLZ in Python, or something similar. Tried Google and didn't find anything. Wondering if there is another algorithm with similar performance available in Python?
Hey,
I'm new to python so I really don't know the language very well.
the following example was taken from here http://docs.python.org/library/json.html
>>> import json
>>> json.loads('["foo", {"bar":["baz", null, 1.0, 2]}]')
[u'foo', {u'bar': [u'baz', None, 1.0, 2]}]
what does the u mean? and how do i know which elements are available in the dictionary?
I am attempting to to use python to gain some performance on a task that can be highly parallelized using http://docs.python.org/library/multiprocessing.
When looking at their library they say to use chunk size for very long iterables. Now, my iterable is not long, one of the dicts that it contains is huge: ~100000 entries, with tuples as keys and numpy arrays for values.
How would I set the chunksize to handle this and how can I transfer this data quickly?
Thank you.