Hi,
I am writing Python script now. The project will grow bigger in future. I need
to import some packages for several functions, such as numpy. Where is the best
plalce to put the import numpy command? Is it fine to put on the first line in
the file? Is it better to put it into each function
I was just setting up some logging in a make script and decided to
give the built-in logging module a go, but I just found out that the
base StreamHandler always puts a newline at the end of each log.
There is a comment in the code that says "The record is then written
to the stream with a trailin
On Oct 2, 4:20 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote:
>
> > How is this expressed in Python?
>
> > If x is in y more than three times:
> > print x
>
> > y is a Python list.
>
> Simple and readable:
> if len([a for a in y if x == a]) > 3
Does anyone know how the variables label and scale are recognized
without a global statement or parameter, in the function resize() in
this code:
#!/usr/bin/env python
from Tkinter import *
def resize(ev=None):
label.config(font='Helvetica -%d bold' % \
scale.get())
top = Tk(
On Oct 2, 4:58 pm, Pablo Ziliani <[EMAIL PROTECTED]> wrote:
> Paul Hankin wrote:
> > On Oct 2, 10:06 pm, brad <[EMAIL PROTECTED]> wrote:
>
> >> How is this expressed in Python?
>
> >> If x is in y more than three times:
> >> print x
>
> >> y is a Python list.
>
> > Simple and readable:
> > if
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Robert
> Kern wrote:
>
>> Not all of the modules in a package are imported by importing the
>> top-level package.
>
> You can't import packages, only modules.
>
>> os.path is a particularly weird case because it is just an alias to the
On Oct 2, 5:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> But it is still wrong to say "0.6 is definitely not the same as 3/5".
Out of context, I'd certainly agree. But from the context, I assumed
it was clear that the 0.6 was a Python float. I probably should have
made this clearer.
On Tue, 2007-10-02 at 15:20 -0700, TheFlyingDutchman wrote:
> Does anyone know how the variables label and scale are recognized
> without a global statement or parameter, in the function resize() in
> this code:
> [...]
The answer to your question is "Yes."
--
Carsten Haese
http://informixdb.sou
On 2 Okt, 22:35, bramble <[EMAIL PROTECTED]> wrote:
>
> Ahh... Ok. Thanks, that explains it. At first, it hadn't ocurred to me
> that anyone would want to provide a GUI toolkit binding along with a
> popular general purpose programming language implementation. Moreover,
> it *really* wouldn't occur
Paul Hankin wrote:
> On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote:
>> Hi!
>> I'm a new user of python, and have problem.
>> I have a plain ascii file:
>> 11..1
>> 12..1
>> 11..1
>> I want to create a new file which contains only lines with '1' on 15th
On Oct 2, 5:43 pm, [EMAIL PROTECTED] wrote:
> On Oct 2, 5:27 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > But it is still wrong to say "0.6 is definitely not the same as 3/5".
>
> Out of context, I'd certainly agree. But from the context, I assumed
> it was clear that the 0.6 was a Pyt
TheFlyingDutchman wrote:
> Does anyone know how the variables label and scale are recognized
> without a global statement or parameter, in the function resize() in
> this code:
[snip]
> def resize(ev=None):
> label.config(font='Helvetica -%d bold' % \
> scale.get())
You're just cal
[EMAIL PROTECTED] wrote:
> On Oct 2, 1:12 am, Robert Kern <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> How does gmpy make the conversion from float to rational?
>> gmpy has a configurable transformation between floats and the internal
>> representation. I believe the default goes thr
On Oct 2, 2007, at 5:20 PM, TheFlyingDutchman wrote:
> Does anyone know how the variables label and scale are recognized
> without a global statement or parameter, in the function resize() in
> this code:
>
>
>
> #!/usr/bin/env python
>
> from Tkinter import *
>
> def resize(ev=None):
> lab
TheFlyingDutchman wrote:
> Does anyone know how the variables label and scale are recognized
> without a global statement or parameter, in the function resize() in
> this code:
>
>
>
> #!/usr/bin/env python
>
> from Tkinter import *
>
> def resize(ev=None):
> label.config(font='Helvetica
On Oct 2, 11:07 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote:
>
> PyGtk has poor cross platform support, a very large footprint (the
> largest of all these libraries) as well as a complicated runtime
> environment.
What's complicated about it?
--
http://mail.python.org/mailman/listinfo/python-li
Hello
I'm new to both Django and Python. I'm mainly developing on PHP.
I tend to move to Django. But I want to confirm as below:
I heard that Django is mainly used for something like content management,
CMS or something
like that and Rails is mainly for web applications.
So my question: is it
James Stroud wrote:
> Bruno Desthuilliers wrote:
>> First point is that Python has no "variable interpolation".
>
> If you squint, it kind of does*:
>
> >>> print '%(language)s has %(#)03d quote types.' % \
> {'language': "Python", "#": 2}
> Python has 002 quote types.
>
>
Abandoned wrote:
> Also if i need a list id what can i do ?
>
> aia.execute("SELECT id, w from list")
> links=aia.fetchall()
>
> I want to..
>
> idlist=[1, 2, 3] ( I don't want to use FOR and APPEND because the
> query have 2 million result and i want to speed)
>
It may not be practical for you
more information for making money with your blog
www.space666.com
goodwebsite for making money
www.space666.com
--
http://mail.python.org/mailman/listinfo/python-list
On 2007-10-02, Chris Mellon <[EMAIL PROTECTED]> wrote:
> PyGtk has poor cross platform support, a very large footprint (the
> largest of all these libraries)
It's larger than wxWidgets on top of Gtk?
> as well as a complicated runtime environment. It's probably
> the closest to suitable for stan
In message <[EMAIL PROTECTED]>, Kamen TOMOV wrote:
> On Sun, Sep 30 2007, Klaus Schilling wrote:
>
>> private property is unethical
>
> How I craved to read that!
>
> Viva la revolution!
Ewige Blumenkraft!
French-Canadian bean soup!
--
http://mail.python.org/mailman/listinfo/python-list
I'm looking for a module that acts on the input of the keyboard. Something
similar to pygame's key events, but something just easier to use not based
on pygame stuff. If that makes any since.
--
http://mail.python.org/mailman/listinfo/python-list
En Tue, 02 Oct 2007 01:59:35 -0300, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> escribi�:
> How does gmpy make the conversion from float to rational?
Well, you know, these days valuable software usually comes with something
people call "documentation". Incomprehensible documents in strange formats
On Wed, 3 Oct 2007 11:17, panguohua wrote in comp.lang.python
> more information for making money with your blog
Wow! Truth in advertising!
--
Nigel Rowe
A pox upon the spammers that make me write my address like..
rho (snail) fisheggs (stop) name
--
http://mai
En Tue, 02 Oct 2007 04:20:47 -0300, Tim Golden <[EMAIL PROTECTED]>
escribi�:
> Peters, Matthew J. ET3 wrote:
>> I'm looking for a way to read the lastwritetime property of
>> a windows registry key. ... I found the function in perl
>
> So what does the Perl source say? It presumably
En Tue, 02 Oct 2007 10:11:24 -0300, <[EMAIL PROTECTED]> escribi�:
> Holden indicates that VS2003 is the current compiler used for the
> official Python distribution. Do you know how to use that program to
> compile an exe?
Open the program, press F1 and read the documentation provided by its
ve
En Tue, 02 Oct 2007 12:12:09 -0300, rc <[EMAIL PROTECTED]> escribi�:
>> Try objCOMAdminCatalogObject.SetValue("ID", AppID).
> When I try that I get exception:
> AttributeError: Add.SetValue
I think you would get more help asking in [EMAIL PROTECTED]
--
Gabriel Genellina
--
http://mail.python.
On Oct 2, 10:12?pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 02 Oct 2007 01:59:35 -0300, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> escribi :
>
> > How does gmpy make the conversion from float to rational?
>
> Well, you know, these days valuable software usually comes with something
Gabriel Genellina wrote:
> En Sun, 30 Sep 2007 16:16:30 -0300, <[EMAIL PROTECTED]> escribi�:
>
>>> From my POV, if I want sequence from here to there, it should include
>> both here and there.
>>
>> I do understand the consequences of making high bound exclusive, which
>> is more elegant code: xra
En Tue, 02 Oct 2007 19:01:27 -0300, wang frank <[EMAIL PROTECTED]>
escribi�:
> I am writing Python script now. The project will grow bigger in future.
> I need to import some packages for several functions, such as numpy.
> Where is the best plalce to put the import numpy command? Is it fine
Ok this is dead.. move along people.. nothing to see here..
--
http://mail.python.org/mailman/listinfo/python-list
Thank you all for your replies.
I am still a newbie with SSL issues but I found out that:
a certificate that is signed by OpenSSL's own CA( certification
authority), that is not recognized in the program's list of root CAs,
causes an exception to be raised.
(That is a different behaviour from the
En Wed, 03 Oct 2007 00:02:03 -0300, Lamonte Harris <[EMAIL PROTECTED]>
escribi�:
> I'm looking for a module that acts on the input of the keyboard.
> Something
> similar to pygame's key events, but something just easier to use not
> based
> on pygame stuff. If that makes any since.
This w
> So, that leaves me wondering, why is Tkinter still getting so much
> focus in the Python standard library?
>
> Maybe a better question is, how has Tk managed to keep beating up the
> newer, more modern, more featureful, better documented toolkits
> encroaching on his territory? What's Tk's secre
> a certificate that is signed by OpenSSL's own CA( certification
> authority), that is not recognized in the program's list of root CAs,
> causes an exception to be raised.
What is "the program"? What programming language is it written in?
What library does it use to maintain a list of root CAs,
brad a écrit :
> How is this expressed in Python?
>
> If x is in y more than three times:
> print x
>
> y is a Python list.
if y.count(x) > 3:
print x
--
http://mail.python.org/mailman/listinfo/python-list
Colin J. Williams a écrit :
> TheFlyingDutchman wrote:
>> Does anyone know how the variables label and scale are recognized
>> without a global statement or parameter, in the function resize() in
>> this code:
>>
>>
>>
>> #!/usr/bin/env python
>>
>> from Tkinter import *
>>
>> def resize(ev=None):
101 - 138 of 138 matches
Mail list logo