reservastranc...@gmail.com Pousadas em Trancoso, reservas, agencia virtual, turismo Bahia - 75469

2011-10-12 Thread pousadas trancoso reservas bahia
reservastranc...@gmail.com reservastrancoso @ gmail.com (reservastranc...@gmail.com) Pousadas em Trancoso, agencia virtual em Tancoso - Bahia. Faça ja sua reserva nas pousadas mais badaladas da cidade. Contato reservastrancoso @ gmail.com reservastranc...@gmail.com (reservastranc...@gmail.com

Re: shipping python

2011-10-12 Thread Kristen J. Webb
On 10/12/11 3:26 PM, Chris Angelico wrote: On Thu, Oct 13, 2011 at 8:10 AM, Kristen J. Webb wrote: My main motivation to use .pyc is to keep end users from changing scripts, breaking things, and then calling us. Tamper proofing may be an alternative approach if anyone has suggestions. I w

Re: shipping python

2011-10-12 Thread Kristen J. Webb
On 10/12/11 6:02 PM, Andrea Crotti wrote: Why do you want to use the system python and system libraries? It is a standard, just like glibc on linux, I'd like my code should work on the OS with minimal intrusion. If you want to avoid too much troubles and compatibility hell maybe give PyInst

Re: MySQLdb on Mac Lion

2011-10-12 Thread Ned Deily
In article <20111013005244.gk6...@johnsons-web.com>, Tim Johnson wrote: > I'm most experienced with MySQLdb on ubuntu, which is installed via > apt-get or synaptic. > > I am setting up a mac mini with osX 10.7 (Lion). Macports makes > py27-mysql 1.2.2 available, but are there any .dmg packages >

MySQLdb on Mac Lion

2011-10-12 Thread Tim Johnson
I'm most experienced with MySQLdb on ubuntu, which is installed via apt-get or synaptic. I am setting up a mac mini with osX 10.7 (Lion). Macports makes py27-mysql 1.2.2 available, but are there any .dmg packages available? thanks -- Tim tim at tee jay forty nine dot com or akwebsoft dot com ht

Re: shipping python

2011-10-12 Thread Roy Smith
In article , Andrea Crotti wrote: > And also the world is a funny place, but does it really happen that > a customer changes the code in your python scripts, and the *complain* > if it doens't work anymore?? You sound like somebody who has never had to support paying customers :-) -- http://ma

Re: shipping python

2011-10-12 Thread Andrea Crotti
On 10/12/2011 10:10 PM, Kristen J. Webb wrote: I tried experimenting with .pyc files only to end up at: RuntimeError: Bad magic number in .pyc file can't run 2.5 pyc files on 2.6 :( My main motivation to use .pyc is to keep end users from changing scripts, breaking things, and then calling u

Re: How add class name to format of the logging module?

2011-10-12 Thread Vinay Sajip
On Oct 12, 9:42 pm, Peng Yu wrote: > Hi, > > The following attributes does not include the class name. Is there a > way to add class name to the format string? Thanks! Not in the general case without a reasonable run-time cost. Since you can find the exact line number a logging call was made from

Re: shipping python

2011-10-12 Thread Chris Angelico
On Thu, Oct 13, 2011 at 8:10 AM, Kristen J. Webb wrote: > My main motivation to use .pyc is to keep end users from changing scripts, > breaking things, and then calling us.  Tamper proofing may be an > alternative approach if anyone has suggestions. > I wouldn't bother; if you're worried about th

Re: shipping python

2011-10-12 Thread Kristen J. Webb
I tried experimenting with .pyc files only to end up at: RuntimeError: Bad magic number in .pyc file can't run 2.5 pyc files on 2.6 :( My main motivation to use .pyc is to keep end users from changing scripts, breaking things, and then calling us. Tamper proofing may be an alternative approach

Re: [NUMPY] "ValueError: total size of new array must be unchanged" just on Windows

2011-10-12 Thread Paolo Zaffino
I wrote a function thaht works on a 3D matrix. As first thing I have an array and I want reshape it into a 3D matrix (for further manipulations). For this reason I wrote in a row: matrix=matrix.reshape(a, b, c).T It work fine on GNU/Linux and Mac OS but not on Windows. In Windows I get this error

How add class name to format of the logging module?

2011-10-12 Thread Peng Yu
Hi, The following attributes does not include the class name. Is there a way to add class name to the format string? Thanks! http://docs.python.org/library/logging.html#logrecord-attributes -- Regards, Peng -- http://mail.python.org/mailman/listinfo/python-list

Re: Embedding a "frame" into a movie using python

2011-10-12 Thread Chris Angelico
On Thu, Oct 13, 2011 at 5:27 AM, J <1jason.whatf...@gmail.com> wrote: > My objective is to have the user put together some images html and embed the > image as a frame into a video file (any embeddable format e.g. swf). So there > are three steps: > SWF isn't the easiest format to work with; it'

Re: [Python-ideas] Implement comparison operators for range objects

2011-10-12 Thread Ian Kelly
On Wed, Oct 12, 2011 at 11:51 AM, MRAB wrote: >> Aside: >> >> I'm astonished to see that range objects have a count method! What's the >> purpose of that? Any value's count will either be 0 or 1, and a more >> appropriate test would be `value in range`: >> >>  >>> 17 in range(2, 30, 3) # like r.co

Embedding a "frame" into a movie using python

2011-10-12 Thread J
Hi there, I'm currently experimenting with python by putting together a little webapp running on appengine. My objective is to have the user put together some images html and embed the image as a frame into a video file (any embeddable format e.g. swf). So there are three steps: (1) Convert

RE: Code Review: a framework for writing IRC applications or bots

2011-10-12 Thread Prasad, Ramit
> It was important to me that I include a number of features: such as automatic > on-the-fly reloading, If you are referring to reloading python modules (and not configuration files), I can tell you that this is a difficult feature to implement, much less do it correctly. I have experienced tro

Re: [Python-ideas] Implement comparison operators for range objects

2011-10-12 Thread MRAB
On 12/10/2011 18:33, Steven D'Aprano wrote: Sven Marnach wrote: There are circumstances, for example in unit testing, when it might be useful to check if two range objects describe the same range. Currently, this can't be done using the '==' operator: >>> range(5) == range(5) False [...] All

Code Review: a framework for writing IRC applications or bots

2011-10-12 Thread Max Countryman
Hi all, I'm still very much a learner when it comes to Python but I've been working on a little framework the past few weeks to help me in the learning process and I would like it if the more experienced members of the community could give me some advice on the design considerations and general

Re: file processing question

2011-10-12 Thread Yaşar Arabacı
And also, I higly recommend against using lists named list. That means overwriting builtin list object. 2011/10/12 Andreas Perstinger > On 2011-10-12 13:15, selahattin ay wrote: > >> >> hi all, I wrote these codes but the program must write the prints to a >> text file... >> code = [100, 200, 3

Re: file processing question

2011-10-12 Thread Andreas Perstinger
On 2011-10-12 13:15, selahattin ay wrote: hi all, I wrote these codes but the program must write the prints to a text file... code = [100, 200, 300, 400, 500] list= [] a = 0 while a< 9: a+=1 list.append(a) last_list = [[int(str(i) + str(k)) for i in code] for k in list] list2= []

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-12 Thread Tim Chase
On 10/11/11 22:13, alex23 wrote: They look good, but I'm looking for something which can "compile" down to normal SQL code. Then you're not looking hard enough. SQLAlchemy does this. I'm not sure it can entirely be chalked up to not looking hard enough. Because so many keywords of what's de

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Christian Wutte
On Oct 12, 11:45 am, Thomas Heller wrote: > > It is trivial to call ShellExecute with ctypes. > Yes, but it would be easier to use os.startfile() instead of ctypes.windll.shell32.ShellExecute(), not? Further one must for sure check the MSDN page for ShellExecute for the five parameters. Then on e

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Christian Wutte
On Oct 12, 11:27 am, Thomas Rachel wrote: > Am 12.10.2011 10:22 schrieb Christian Wutte: > > > Hello all, > > as stated in the docs [1] os.startfile relies on Win32 ShellExecute(). > > So maybe someone can explain it to me, why there is no support for > > program arguments. > > Because it is inten

Re: 1/2 evaluates to 0

2011-10-12 Thread Steven D'Aprano
Nobody wrote: > On Wed, 12 Oct 2011 13:28:35 +0200, Laurent wrote: > >> from __future__ import division >> 1/2 >>> 0.5 >>> >> >> Wohaw. This means that this behavior is going to be default in a >> foreseeable future ? > > It's the default in 3.x. I can't imagine it ever being the defa

Re: why msvcrt.printf show the first char only?

2011-10-12 Thread Nobody
On Wed, 12 Oct 2011 04:18:25 -0700, install...@189.cn wrote: > from ctypes import * > msvcrt = cdll.msvcrt > message_string = "Hello world!\n" > print(msvcrt.printf("Testing: %s", message_string)) > > when running in eclipse, the result is: > 1 > T > > when running in IDLE, then result is: > 1 >

Re: 1/2 evaluates to 0

2011-10-12 Thread Noah Hall
On Wed, Oct 12, 2011 at 12:28 PM, Laurent wrote: > >> Include from __future__ import division on the top of your file >> >  from __future__ import division >  1/2 >> >> 0.5 >> > > Wohaw. This means that this behavior is going to be default in a foreseeable > future ? Never in Python 2.x,

Re: 1/2 evaluates to 0

2011-10-12 Thread Nobody
On Wed, 12 Oct 2011 13:28:35 +0200, Laurent wrote: > from __future__ import division > 1/2 >> 0.5 >> > > Wohaw. This means that this behavior is going to be default in a > foreseeable future ? It's the default in 3.x. I can't imagine it ever being the default in 2.x. -- http://mail.

Re: 1/2 evaluates to 0

2011-10-12 Thread Laurent
Include from __future__ import division on the top of your file from __future__ import division 1/2 0.5 Wohaw. This means that this behavior is going to be default in a foreseeable future ? Thanks Laurent -- http://mail.python.org/mailman/listinfo/python-list

why msvcrt.printf show the first char only?

2011-10-12 Thread install...@189.cn
from ctypes import * msvcrt = cdll.msvcrt message_string = "Hello world!\n" print(msvcrt.printf("Testing: %s", message_string)) when running in eclipse, the result is: 1 T when running in IDLE, then result is: 1 why is that? -- http://mail.python.org/mailman/listinfo/python-list

file processing question

2011-10-12 Thread selahattin ay
hi all, I wrote these codes but the program must write the prints to a text file... code = [100, 200, 300, 400, 500] list= [] a = 0 while a < 9: a+=1 list.append(a) last_list = [[int(str(i) + str(k)) for i in code] for k in list] list2= [] b = 0 while b < 9: b+=1 list2.appen

Re: Python library for generating SQL queries [selects, alters, inserts and commits]

2011-10-12 Thread Alec Taylor
That's why I said "over the next few days", because learning it for that last assignment would've been too much effort :P On Wed, Oct 12, 2011 at 3:45 PM, wu wei wrote: > Just don't use it for the first time in a demo and then blame me when it > fails ;) > > On Wed, Oct 12, 2011 at 2:05 PM, Alec

Re: 1/2 evaluates to 0

2011-10-12 Thread Peter Otten
Laurent Claessens wrote: > This is well known : > > >>> 1/2 > 0 > > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non > integer division operator ? > Up to now I workarounded writing float(1)/2. Is there an other way ?

Re: 1/2 evaluates to 0

2011-10-12 Thread Paul Rudin
Laurent Claessens writes: > Hi all > > > This is well known : > 1/2 > 0 > > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non > integer division operator ? > Up to now I workarounded writing float(1)/2. Is there an o

Re: 1/2 evaluates to 0

2011-10-12 Thread Aage Andersen
"Laurent Claessens" skrev i en meddelelse news:j73p9s$baa$1...@news.univ-fcomte.fr... > Hi all > > > This is well known : > > >>> 1/2 > 0 > > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer > division operator

Re: 1/2 evaluates to 0

2011-10-12 Thread Chris Angelico
On Wed, Oct 12, 2011 at 9:14 PM, Laurent Claessens wrote: > Hi all > > This is well known : > 1/2 > 0 Only in Python 2. > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer > division operator ? 1.0/2 is flo

Re: 1/2 evaluates to 0

2011-10-12 Thread Noah Hall
On Wed, Oct 12, 2011 at 11:14 AM, Laurent Claessens wrote: > This is well known : > 1/2 > 0 > > This is because the division is an "integer division". > > My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer Include from __future__ import division on the top of your fil

Re: 1/2 evaluates to 0

2011-10-12 Thread Jean-Michel Pichavant
Laurent Claessens wrote: Hi all This is well known : >>> 1/2 0 This is because the division is an "integer division". My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer division operator ? Up to now I workarounded writing float(1)/2. Is there an other way ? My Zen

1/2 evaluates to 0

2011-10-12 Thread Laurent Claessens
Hi all This is well known : >>> 1/2 0 This is because the division is an "integer division". My question is : how can I evaluate 1/2 to 0.5 ? Is there some non integer division operator ? Up to now I workarounded writing float(1)/2. Is there an other way ? My Zen of python says : There sho

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Thomas Heller
Am 12.10.2011 10:22, schrieb Christian Wutte: Hello all, as stated in the docs [1] os.startfile relies on Win32 ShellExecute(). So maybe someone can explain it to me, why there is no support for program arguments. That's quite a pity since os.startfile is the easiest way for an elevated run (with

Re: Seven Python Developers Needed $125K

2011-10-12 Thread Ben Finney
"WR" writes: > Top Global Consulting Firm in NYC needs 7 Python Developers Please do not use this discussion forum for recruitment. Instead, use the Python Job board for that purpose. -- \ “If the desire to kill and the opportunity to kill came always | `\ together, who would es

Re: os.startfile: Why is there no arguments option?

2011-10-12 Thread Thomas Rachel
Am 12.10.2011 10:22 schrieb Christian Wutte: Hello all, as stated in the docs [1] os.startfile relies on Win32 ShellExecute(). So maybe someone can explain it to me, why there is no support for program arguments. Because it is intended to start an arbitrary file of any type (.txt, .doc, ...)

os.startfile: Why is there no arguments option?

2011-10-12 Thread Christian Wutte
Hello all, as stated in the docs [1] os.startfile relies on Win32 ShellExecute(). So maybe someone can explain it to me, why there is no support for program arguments. That's quite a pity since os.startfile is the easiest way for an elevated run (with 'runas' as option) and without arguments of lim

Seven Python Developers Needed $125K

2011-10-12 Thread WR
Top Global Consulting Firm in NYC needs 7 Python Developers Up to $125K depending on experience Solid knowledge of fundamental Python concepts. At least three years Python experience required. For more info email jos...@washresearch.com Joseph Ryan Washington Research Associates Inc (202) 4