I am looking for a Python-Chat
Hello! Is there an active Python-Chat? Thanks in advance! ...
Hello! Is there an active Python-Chat? Thanks in advance! ...
I am using wxPython and I want to use an OpenGL based canvas, but I don't want the context to support deprecated functionality. I've navigated through pyopengl and pyglet in Eclipse, but it did not look like they support this. I'm saying this because I could not find WGL functions used in assigning attributes to a context, as in this whi...
Hi I have a list of tuples (each tuple item is a pair of integers) and I would like to add a constant value to each tuple in the list. For example [(x0,y0),(x1,y1),...] -> [(x0+xk,y0+yk),(x1+xk,y1+yk)....] xk,yk are constants How do I do this Thanks ...
I'm very new to Feedparser and have returned to Python after a long break so would appreciate any help. I've tried the docs, which are very good, but I'm still slightly lagging. How would I get Feedparser to take an rss feed and from that get the title and description of the first 10 items and label each item independently so that they...
How can I break into a running test with the pdb interactive debugger? This is the test: class UserTestCase(TestCase): def test_register_should_create_UserProfile(self): c = Client() response = c.post('/account/register/', {u'username': [u'john'], u'email': [u'[email protected]'], u'bnewaccount': [u'Signup']}) self.assert...
Hello All, I want to know how to read and store the xml data in an array.I m not sure which method to use or class Can anyone tell which xml lib to use for reading the xml ...
I know that the word “enterprise” gives some people the creeps, but I am curious to know if anyone has experience creating enterprise applications, similar to something like say… Java EE applications, which are highly concurrent, distributed applications with Django? I know Java has its own issues but its kind of viewed as THE enterprise...
How would i print contents of a Python Tkinter.Canvas control? I've read that it is possible to print to a postscript printer from this control but examples are hard to come by. So, any ideas how what is needed to print the contents (including images)? If you've got a cross-platform method all the better! ...
I can't quite figure out what's going on with string templates: t = Template('cannot teach an ${dog.old} ${tricks.new}. ${why} is this ${not} working') print t.safe_substitute({'dog.old': 'old dog', 'tricks.new': 'new tricks', 'why': 'OH WHY', 'not': '@#%@#% NOT'}) This prints: cannot teach an ${dog.old} ${tricks.new}. OH WHY is this...
I'm trying to convert the following code to Python from MATLAB for an EEG Project (partly because Python's slightly cheaper!) Hopefully someone can point me in the right direction: I've started to alter it but got bogged down: Particularly trying to find equivalent functions. Tried scipy.org (NumPy_for_Matlab_Users etc.) but I'm not s...
I want to use Fabric to deploy my web app code to development, staging and production servers. My fabfile: def deploy_2_dev(): deploy('dev') def deploy_2_staging(): deploy('staging') def deploy_2_prod(): deploy('prod') def deploy(server): print 'env.hosts:', env.hosts env.hosts = [server] print 'env.hosts:', env.hosts S...
Hello Everybody!! I am implementing the reddit.com source code on ubuntu karmic 9.10. I have followed all the steps and in one step where i am using paster command it throws an error. $paster shell example.ini File "/usr/local/lib/python2.6/dist-packages/Pylons-0.9.6.2- py2.6.egg/pylons/middleware.py", line 11, in from webhelper...
Hi, In my application I have a loop that in each turn creates an instance of a class which performs some operations. In this class I have a signal timer that when invoked is supposed to exit the current turn in the loop gracefully and allow the next operation to continue without any interruption. In it's current state it raises an exce...
I want to write a folder on a windows system, Vista and Win7 with NTFS file systems. The folders may contain the characters å, ä and/or ö, "förjävligt" for example. The python files and every string in it is currently in UTF-8, how do I convert it to suite the Windows file system? ...
Just after standard pythonmodule imports? If I postpone it to the main function and do my specific module imports before it, it gives error (which is quite obvious). Python Style guide no where mentions the correct location for it. ...
On Linux, I have a c shared library that depends on other libs. LD_LIBRARY_PATH is properly set to allow the linker to load all the libraries. When I do: libgidcwf = ctypes.cdll.LoadLibrary(libidcwf_path) I get the following error: Traceback (most recent call last): File "libwfm_test.py", line 12, in <module> libgidcwf = ...
We are deploying django application, I found in the documentation that it is recommended to use WSGI appoach for doing that. Before deploying I wanted to know, why it is recommended over other two approaches i.e. using mod_python and fastcgi... Thanks a lot. ...
Hi, I want to write a script which permits a user to modify his Contacts, can you help me ? thanks, ...
I'd like to time a block of code without putting it in a separate function. for example: def myfunc: # some code here t1 = time.time() # block of code to time here t2 = time.time() print "Code took %s seconds." %(str(t2-t1)) however, I'd like to do this with the timeit module in a cleaner way, but I don't want to make a sepa...
Hello, I am currently developing an application that receives GPS data gathered using and android phone. I need to analyze that data in terms of speed, acceleration, etc... My question is: Can I trust the speed values returned by the phone? Or should I use the difference in position and time between two points to get the values I want?...