python

How do I make the business case for Python?

How would I make a compelling argument for introducing Python into a windows environment? VBscript or Batch scripts will run on any machine and handle most administrative tasks and Java and .Net are available to handle more complex problems. I understand Python brings a lot to the table, but what specifically could it do that we can't do...

which python framework to use?

I'm looking for a framework which is appropriate for beginners (in Python and web development). I already found out about Django and web.py. I think that one of the most important things for me is good documentation. Thanks for the help, Dan ...

Creating self-contained python applications

I'm trying to create a self-contained version of pisa (html to pdf converter, latest version), but I can't succeed due to several errors. I've tried py2exe, bb-freeze and cxfreeze. This has to be in windows, which makes my life a bit harder. I remember that a couple of months ago the author had a zip file containing the install, but now...

Receive socket size limits good?

I am writing a program in Python that will act as a server and accept data from a client, is it a good idea to impose a hard limit as to the amount of data, if so why? More info: So certain chat programs limit the amount of text one can send per send (i.e. per time user presses send) so the question comes down to is there a legit reason...

How do I get python-markdown to additionally "urlify" links when formatting plain text?

Markdown is a great tool for formatting plain text into pretty html, but it doesn't turn plain-text links into URLs automatically. Like this one: http://www.google.com/ How do I get markdown to add tags to URLs when I format a block of text? ...

Why should I learn Python?

I currently program internet applications in php and mysql. I would like to broaden my horizons to new languages. What kind of things can be done with Python? What kind of applications can be written on it other than internet apps? Can you write Windows/Linux programs in Python? ...

Does python support multiprocessor/multicore programming?

What is the difference between multiprocessor programming and multicore programming? preferably show examples in python how to write a small program for multiprogramming & multicore programming ...

Python Forums

Are there any good Python forums where one can get help? I have tried http://www.python-forum.org/ but I never seem to get any responses. I don't really feel that Stack Overflow is the appropriate place for every little question I come across, and typically these questions will require discussion, which is something that SO is not for. ...

How do I execute a program from python? os.system fails due to spaces in path

I have a python script that needs to execute an external program, but for some reason fails. If I have the following script: import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input(); Then it fails with the following error: 'C:\Temp\a' is not recognized as an internal or external command, operable program or batch file. If...

Alert Popups from service in Python

I have been using win32api.MessageBox to do alerts, and this works for apps running from the interactive prompt and normally executed code, however when I built a Python service when a MessageBox is triggered I can hear the 'beep' but the box does not display. Is it possible to display alerts from services? ...

Checking for member existence in Python

I regularly want to check if an object has a member or not. An example is the creation of a singleton in a function. For that purpose, you can use hasattr like this: class Foo(object): @classmethod def singleton(self): if not hasattr(self, 'instance'): self.instance = Foo() return self.instance But ...

Failed to get separate instances of a class under mod_python

I'm trying to run some python code under Apache 2.2 / mod_python 3.2.8. Eventually the code does os.fork() and spawns 2 separate long-run processes. Each of those processes has to create a separate instance of a class in order to avoid any possible collision in the parallel flow. class Foo(object): pass kidprocs = [] for kid in ('...

Any experience with the Deliverance system ?

My new boss went to a speech where Deliverance, a kind of proxy allowing to add skin to any html output on the fly, was presented. He decided to use it right after that, no matter how young it is. More here : http://www.openplans.org/projects/deliverance/introduction In theory, the system sounds great when you want a newbie to tweak y...

What would you recommend for a high traffic ajax intensive website?

For a website like reddit with lots of up/down votes and lots of comments per topic what should I go with? Lighttpd/Php or Lighttpd/CherryPy/Genshi/SQLAlchemy? and for database what would scale better / be fastest MySQL ( 4.1 or 5 ? ) or PostgreSQL? ...

Capture the contents of a regex and delete them, efficiently.

Situation: text: a string R: a regex that matches part of the string. This might be expensive to calculate. I want to both delete the R-matches from the text, and see what they actually contain. Currently, I do this like: import re ab_re = re.compile("[ab]") text="abcdedfe falijbijie bbbb laifsjelifjl" ab_re.findall(text) # ['...

Is it possible to compile Python natively (beyond pyc byte code)?

I wonder if it is possible to create an executable module from a Python script. I need to have the most performance and the flexibility of Python script, without needing to run in the Python environment. I would use this code to load on demand user modules to customize my application. ...

Sometimes can't delete an Oracle database row using Django

I have a unit test which contains the following line of code Site.objects.get(name="UnitTest").delete() and this has worked just fine until now. However, that statement is currently hanging. It'll sit there forever trying to execute the delete. If I just say print Site.objects.get(name="UnitTest") then it works, so I know that i...

Starting a new database driven python web application would you use a javascript widget framework? If so which framework?

I am starting a new web application project. I want to use python as I am using it at my bread-and-butter-job. However I don't want to reinvent the wheel. Some things I have thought about: AJAX would be nice if it’s not too much of a hazzle. It is best if the licensing allows commercialization but is not crucial at this point. It cou...

How can I check the syntax of Python code in Emacs without actually executing it?

Python's IDLE has 'Check Module' (Alt-X) to check the syntax which can be called without needing to run the code. Is there an equivalent way to do this in Emacs instead of running and executing the code? ...

Any good team-chat websites?

Are there any good team-chat websites, preferably in Python, ideally with CherryPy or Trac? This is similar to http://stackoverflow.com/questions/46612/whats-a-good-freeware-collaborative-ie-multiuser-instant-messenger#46660, but a few primary differences: 1) I very much want to host the server. 2) I don't care if Smileys are included...