Re: How to prevent tests from running against production?

2013-03-03 Thread Steven D'Aprano
On Sun, 03 Mar 2013 16:56:16 -0500, Roy Smith wrote: > Our deploy/configuration system includes credentials for connecting to a > database. We have one production database, and a variety of clones of > that in our test and development environments. > > We've got a large body of tests, written wi

Re: How to prevent tests from running against production?

2013-03-03 Thread Ross Ridge
Roy Smith wrote: >Our deploy/configuration system includes credentials for connecting to a >database. We have one production database, and a variety of clones of >that in our test and development environments. Having your tests use credentials that don't work in the production environment wou

Re: Twisted or Tornado?

2013-03-03 Thread Michael Torrie
On 03/03/2013 04:35 PM, Jake Angulo wrote: > All, > > Thanks for your reply - I thought I would share the outcome of my choice: > > I have chosen to use twisted. The API is very decent to learn, though the > clincher is theres huge community / docs, and many projects used on > production. > >

Re: Do you feel bad because of the Python docs?

2013-03-03 Thread Jake Angulo
The OP speaks for himself alone. Python - for such a very young language, and with the documentation and community blogs available at this point - I cannot ask for more. And who needs docs when the python syntax is as good as writing plain english sentence? On Fri, Mar 1, 2013 at 9:06 PM, Jean-

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Ian Kelly
On Sun, Mar 3, 2013 at 3:09 PM, Alex Gardner wrote: > if (0,0) <= paddle_pos <= (300,300): This doesn't do what you think it does. Tuples are compared lexicographically, not element-wise. So (250, 350) < (300, 300), but (350, 250) > (300, 300). > paddle_pos = pygame.mouse.get_pos(

Re: Twisted or Tornado?

2013-03-03 Thread Jake Angulo
All, Thanks for your reply - I thought I would share the outcome of my choice: I have chosen to use twisted. The API is very decent to learn, though the clincher is theres huge community / docs, and many projects used on production. I was able to make a working project prototype in hours! Than

Re: Speeding up Python's exit

2013-03-03 Thread Ross Ridge
Antoine Pitrou wrote: >Now please read my message again. The OS buffers are *not* flushed according >to POSIX. POSIX says open *streams* might not be flushed. POSIX streams are C FILE * streams and generally aren't regarded as being part of the OS. When you call os._exit() in a Python program

Re: Dealing with exceptions

2013-03-03 Thread Nobody
On Sat, 02 Mar 2013 18:52:19 +0100, Kwpolska wrote: > Also, you can do `except:` for a catch-all, but it is discouraged unless > you have REALLY good reasons to do this. And, most of the time, you > don’t. Most of the time you probably want to catch either Exception (which excludes GeneratorExit

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: > I am in the process of making a pong game in python using the pygame library. > My current problem is that when I move the mouse, it turns off as soon as > the mouse stops moving. The way I am doing this is by making the default

Re: Pygame mouse cursor load/unload

2013-03-03 Thread Alex Gardner
On Saturday, March 2, 2013 7:56:31 PM UTC-6, Alex Gardner wrote: > I am in the process of making a pong game in python using the pygame library. > My current problem is that when I move the mouse, it turns off as soon as > the mouse stops moving. The way I am doing this is by making the default

How to prevent tests from running against production?

2013-03-03 Thread Roy Smith
Our deploy/configuration system includes credentials for connecting to a database. We have one production database, and a variety of clones of that in our test and development environments. We've got a large body of tests, written with a combination of unittest and nose. Many of our tests do

Re: Is it correct this way to inherit from a list?

2013-03-03 Thread Jason Swails
On Sun, Mar 3, 2013 at 9:21 AM, Colin J. Williams wrote: > On 02/03/2013 9:30 PM, gialloporpora wrote: > >> Risposta al messaggio di Rick Johnson : >> >> What are you trying to achieve exactly? >>> >> >> >> I would like to implement a class (vector) to works with vectors, for >> example using sc

Re: Python in web development

2013-03-03 Thread Roy Smith
In article , Sarbjit singh wrote: > Hello All, > > I have been using Python as a scripting language for my office tasks. Now I > have been thinking of using (and learning as well) for web development. For > my tasks, I need to perform some tasks and report on the web. Now I have no > experie

Re: Question about Tashaphyne package in python

2013-03-03 Thread MRAB
On 2013-03-03 03:06, yomnasala...@gmail.com wrote: I have a Python code that take an Arabic word and get the root and also remove diacritics, but i I have a problem with the output. For example : when the input is "العربيه" the output is:"عرب" which is right answer but when the input is "كاتب"

Re: i need help

2013-03-03 Thread Kwpolska
On Sun, Mar 3, 2013 at 7:46 AM, Michael Torrie wrote: > On 02/21/2013 03:18 AM, leonardo wrote: >> thanks, problem solved > > Apparently not. The shift key on your keyboard still seems to be > non-functional. ;) > -- > http://mail.python.org/mailman/listinfo/python-list It is! How else could he

استفتاء هل ستشارك فى الانتخابات البرلمانيه القادمه مجلس النواب

2013-03-03 Thread 23alagmy
استفتاء هل ستشارك فى الانتخابات البرلمانيه القادمه مجلس النواب https://www.facebook.com/permalink.php?story_fbid=542812542426361&id=299719160065550 facebook https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fnatigtas7ab.blogspot.com%2F2013%2F03%2Fblog-post_7369.html%23.UTOIFr8OJp8.faceboo

Re: Python in web development

2013-03-03 Thread Michael Herman
If Python is your personal choice, then it's the *best* for you. If you are literally just going to be processing an HTML form, then CGI is your best bet. However, if you think this functionally will grow, then it's worth learning a web framework. I would go with a micro framework. bottle.py is a

IV ECCOMAS Thematic Conference VipIMAGE 2013: CALL FOR CONTRIBUTIONS

2013-03-03 Thread tava...@fe.up.pt
Dear Colleague, We are pleased to invite you to the International Conference VipIMAGE 2013 - IV ECCOMAS THEMATIC CONFERENCE ON COMPUTATIONAL VISION AND MEDICAL IMAGE PROCESSING (www.fe.up.pt/~vipimage) to be held October 14-16, 2013, in Melia Madeira Mare Hotel, Madeira Island, Funchal, Portuga

Re: How to install development package on linux?

2013-03-03 Thread Michael Torrie
On 03/02/2013 11:39 PM, Sarbjit singh wrote: > Yes, I configured the makefile for mod_wsgi as without any error : > ./configure --prefix=/opt/lampp/ --with-apxs=/opt/lampp/bin/apxs > --with-python=/opt/lampp/python/bin/python2.7 > --with-mutex-dir=/opt/lampp/var/run/wsgi This is not quite right

Re: Python in web development

2013-03-03 Thread Michael Torrie
On 03/03/2013 07:18 AM, Sarbjit singh wrote: > 1. Can I use Python (I want to use personally :)) over PHP/Perl? Yes of course. > 2. If Yes, I want to know the modules that I should learn for > achieving my requirement. I searched internet and found Python > provides CGI, Django etc. > > I don't

Re: Python in web development

2013-03-03 Thread becky_lewis
1) Python is absolutely fine for web development. It's just as good, if not better than PHP or Perl for this sort of work (that's my opinion anyway). 2) I've used Django quite extensively and it can certainly handle your requirements. You might want to have a look at Flask (http://flask.pocoo.or

Re: Is it correct this way to inherit from a list?

2013-03-03 Thread Colin J. Williams
On 02/03/2013 9:30 PM, gialloporpora wrote: Risposta al messaggio di Rick Johnson : What are you trying to achieve exactly? I would like to implement a class (vector) to works with vectors, for example using scalar multiplication: a*v = [a*v1, a*vn] and a dual class for dual vector (the only

Python in web development

2013-03-03 Thread Sarbjit singh
Hello All, I have been using Python as a scripting language for my office tasks. Now I have been thinking of using (and learning as well) for web development. For my tasks, I need to perform some tasks and report on the web. Now I have no experience of web development with Python. So, I want to

Re: [Python-ideas] string.format() default variable assignment

2013-03-03 Thread Steven D'Aprano
On Sat, 02 Mar 2013 23:00:13 -0500, Devin Jeanpierre wrote: > On Sat, Mar 2, 2013 at 10:21 PM, Steven D'Aprano > wrote: >> How the flying fuck does my choice of where and how *I* read this forum >> inconvenience YOU? >> >> Talk about an overactive sense of entitlement. The world does not >> revol

Re: [Python-ideas] string.format() default variable assignment

2013-03-03 Thread Steven D'Aprano
On Sun, 03 Mar 2013 03:21:37 +, Steven D'Aprano wrote: > On Sat, 02 Mar 2013 21:11:04 -0500, David Robinow wrote: >> Do you consider it rude that you choose to use a newsreader, thus >> inconveniencing those of us who use the mailing list, as God intended. > > How the flying fuck does my ch