On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote:
[...]
> That is also regrettably common in Python code. It still suffers from
> being unnecessarily ambiguous, since there are *also* plenty of loops
> using 'i', 'j', etc. where the loop counter *is* used.
>
> Differentiating these use cases b
En Sat, 10 May 2008 22:12:37 -0300, globalrev <[EMAIL PROTECTED]> escribió:
> http://reddit.com/r/programming/info/18td4/comments
>
> claims people take a lot of time to write a simple program like this:
>
>
> "Write a program that prints the numbers from 1 to 100. But for
> multiples of three pri
On May 12, 1:34 am, Larry Hale <[EMAIL PROTECTED]> wrote:
> The file source (previously linked from http://hupp.org/adam/hg/python-magic/)
> has the man pages...
Err... I meant "http://downloads.sourceforge.net/gnuwin32/file-4.21-
bin.zip?modtime=1180175868&big_mirror=1"! :)
--
http://mail.pyt
On May 12, 1:34 am, Larry Hale <[EMAIL PROTECTED]> wrote:
> The file source (previously linked from http://hupp.org/adam/hg/python-magic/)
> has the man pages...
Err... I meant "http://downloads.sourceforge.net/gnuwin32/file-4.21-
bin.zip?modtime=1180175868&big_mirror=1"! :)
--
http://mail.pyt
John Salerno schreef:
Ben Finney wrote:
John Salerno <[EMAIL PROTECTED]> writes:
num = 33
for x in xrange(10):
print num += 1
Which is better done by 'num += 10'.
Can you come up with an example that isn't trivially replaced with
clearer code? That might make it clearer what your conce
hi to all!
can i load a module passing to it, automatically and as default, all
the caller's global variables to act as module's global variables?
thanks
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Incidentally, now that everyone knows English, writer would like to
critique his behavior. I have leaned to the group for approval, at
times by disparaging the efforts of others, but other times not. I
have expressed negative emotion. Is anyone in earshot getting work
bc90021 <[EMAIL PROTECTED]> wrote:
> On Sun, 11 May 2008 19:55:31 +, Duncan Booth wrote:
>
>> 7stud <[EMAIL PROTECTED]> wrote:
>>
>>
>>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â tempfileName =
>>> "\"proctemp\\" Â Â Â Â Â Â Â Â Â Â Â Â Â Â +
>>> self.matrix[c][0] + "_other.tx
On May 11, 11:27 pm, "Frank Niessink" <[EMAIL PROTECTED]> wrote:
> Hi Jimmy,
>
> 2008/5/11 Jimmy <[EMAIL PROTECTED]>:
>
> > hi, all
>
> > I'm having a problem with creating custom events in wxpython.
>
> > I have a class A handling some data processing work and another class
> > B of GUI matter. I
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> The sloppy use of "single quote" for the "apostrophe" is unfortunate
>
True, but that problem is outside of the Python community's control. Given
that people do often refer to single quote when they mean apostrophe the
error message should be w
Ivan Illarionov <[EMAIL PROTECTED]> writes:
> On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote:
> [...]
> > That is also regrettably common in Python code. It still suffers
> > from being unnecessarily ambiguous, since there are *also* plenty
> > of loops using 'i', 'j', etc. where the loop co
Paddy <[EMAIL PROTECTED]> writes:
> I've used Fortran and C and so would tend to use either i,j,k as the
> unused loop variable above, or, for clarity, call it something
> descriptive like loop_count, if the loop body would be clearer.
The problem with all of these names is that they also have lo
Stefan Behnel wrote:
http://www.polystyle.com/features/python-beautifier.jsp
I've never used it, but the example is quite clear.
I tend to believe that running these tools on some average Python code would
not even change whitespace. ;)
I bet it's idempotent against _your_ code, but not in
On 12 Mag, 09:00, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Sat, 10 May 2008 22:12:37 -0300, globalrev <[EMAIL PROTECTED]> escribió:
>
>
>
>
>
> >http://reddit.com/r/programming/info/18td4/comments
>
> > claims people take a lot of time to write a simple program like this:
>
> > "Write a
On May 12, 5:17 pm, pistacchio <[EMAIL PROTECTED]> wrote:
> hi to all!
> can i load a module passing to it, automatically and as default, all
> the caller's global variables to act as module's global variables?
> thanks
module = __import__('module', globals=globals())
I think that's what you're l
On 12 Mag, 10:01, alex23 <[EMAIL PROTECTED]> wrote:
> On May 12, 5:17 pm, pistacchio <[EMAIL PROTECTED]> wrote:
>
> > hi to all!
> > can i load a module passing to it, automatically and as default, all
> > the caller's global variables to act as module's global variables?
> > thanks
>
> module = __
On 12 Mag, 10:10, pistacchio <[EMAIL PROTECTED]> wrote:
> On 12 Mag, 10:01, alex23 <[EMAIL PROTECTED]> wrote:
>
> > On May 12, 5:17 pm, pistacchio <[EMAIL PROTECTED]> wrote:
>
> > > hi to all!
> > > can i load a module passing to it, automatically and as default, all
> > > the caller's global varia
On May 11, 4:36 am, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-05-11, John Machin <[EMAIL PROTECTED]> wrote:
>
>
>
> >> "Write a program that prints the numbers from 1 to 100. But for
> >> multiples of three print "Fizz" instead of the number and for the
> >> multiples of five print "Buzz".
On May 11, 10:16 am, skunkwerk <[EMAIL PROTECTED]> wrote:
> On May 10, 1:31 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Fri, 9 May 2008 08:40:38 -0700 (PDT),skunkwerk<[EMAIL PROTECTED]>
> > declaimed the following in comp.lang.python:
>
> > Coming in late...
>
> > > On May
pistacchio wrote:
On 12 Mag, 10:01, alex23 <[EMAIL PROTECTED]> wrote:
On May 12, 5:17 pm, pistacchio <[EMAIL PROTECTED]> wrote:
hi to all!
can i load a module passing to it, automatically and as default, all
the caller's global variables to act as module's global variables?
Are you positivel
Hi people,
I'm currently working on python embedding with C++. My goal is that
the C++ part handle files writing/reading so that the Python part only
works with buffers.
I succeeded in buffer exchanges. The problem is that some of the files
I read/write are python files so that, before embedding,
On May 12, 9:30 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
[...]
> # FizzBuzzer in action:
>
> >>> fizzbuzz = FizzBuzzer((3, 'Fizz'), (5, 'Buzz'))
> >>> for val in fizzbuzz[1:21]:
>
> ... print val
> ...
> 1 21 1
Ignore this, it's debugging output
> 1
> 2
> Fizz
> 4
> Buzz
> Fizz
On May 12, 7:31 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> Yves Dorfsman <[EMAIL PROTECTED]> writes:
> > Is there anyway to tell python I don't care about a value ?
>
> > Say I want today's year and day, I'd like to do something like:
>
> > import time
> > y, None, d, None, None, None, None
On 12 Mag, 10:47, Marco Mariani <[EMAIL PROTECTED]> wrote:
> pistacchio wrote:
> > On 12 Mag, 10:01, alex23 <[EMAIL PROTECTED]> wrote:
> >> On May 12, 5:17 pm, pistacchio <[EMAIL PROTECTED]> wrote:
>
> >>> hi to all!
> >>> can i load a module passing to it, automatically and as default, all
> >>> t
Hi Jimmy,
2008/5/12 Jimmy <[EMAIL PROTECTED]>:
> On May 11, 11:27 pm, "Frank Niessink" <[EMAIL PROTECTED]> wrote:
> > 2008/5/11 Jimmy <[EMAIL PROTECTED]>:
> > > I have a class A handling some data processing work and another class
> > > B of GUI matter. I need GUI to display information when da
En Fri, 09 May 2008 20:45:09 -0300, Casey <[EMAIL PROTECTED]> escribió:
> I'm running python 2.5.2 on WinXP. I've always used a GUI for
> interactive development, but I wanted to try out ipython which better
> supports matplotlib in this mode. Unfortunately, whenever I try to
> use help() I get
Gabriel Genellina wrote:
2008/5/8 M.-A. Lemburg <[EMAIL PROTECTED]>:
SOAP would be a good choice if you want to send to data to other
servers as well, e.g. Java-based ones.
XML-RPC and JSON are better for simple data structures.
If you have control over both client and server and don't
need t
On May 12, 4:28 am, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
>there's got to be a better way than:
>
> d = time.local()
> y = d[0]
> d = d[1]
Uses Python 2.6! ;)
Python 2.6a3 (r26a3:62861, May 12 2008, 11:41:56)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or
En Mon, 12 May 2008 03:52:59 -0300, Banibrata Dutta <[EMAIL PROTECTED]>
escribió:
> Found that SnakeSQL does implement DB2.0 API. However are there such
> implementations for MySQL ?
MySQLdb
--
Gabriel Genellina
--
http://mail.python.org/mailman/listinfo/python-list
>> On Mon, 12 May 2008 16:24:23 +1000, Ben Finney wrote: [...]
>> > That is also regrettably common in Python code. It still suffers from
>> > being unnecessarily ambiguous, since there are *also* plenty of loops
>> > using 'i', 'j', etc. where the loop counter *is* used.
>> >
>> > Differentiating
On May 11, 3:12 am, globalrev <[EMAIL PROTECTED]> wrote:
> http://reddit.com/r/programming/info/18td4/comments
>
> claims people take a lot of time to write a simple program like this:
>
> "Write a program that prints the numbers from 1 to 100. But for
> multiples of three print "Fizz" instead of t
hi
i'm working on some simulation project . i'm going to simulate traffic
of a city.
this simulation has cars , passengers , non-movable objects and
Traffic signals .
i've made cars as intelligent agent . it has thinking method ,
changing states agents ...
the main problem is i have problem to mov
En Mon, 12 May 2008 06:45:40 -0300, Michele Simionato <[EMAIL PROTECTED]>
escribió:
> On May 12, 4:28 am, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
>> there's got to be a better way than:
>>
>> d = time.local()
>> y = d[0]
>> d = d[1]
>
> Uses Python 2.6! ;)
>
> Python 2.6a3 (r26a3:62861, May 12 20
En Mon, 12 May 2008 05:49:22 -0300, Gruik <[EMAIL PROTECTED]> escribió:
> I'm currently working on python embedding with C++. My goal is that
> the C++ part handle files writing/reading so that the Python part only
> works with buffers.
>
> I succeeded in buffer exchanges. The problem is that some
thanks for the tips, pam limits and http://codepad.org/ are both
interesting tracks.
Ivo
2008/5/12 Matt Nordhoff <[EMAIL PROTECTED]>:
>
> ivo talvet wrote:
> > Hello,
> >
> > Is it possible to have a python which not handle the execution of
> > "while", "for", and other loop statements ? I wo
On May 12, 12:31 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Mon, 12 May 2008 05:49:22 -0300, Gruik <[EMAIL PROTECTED]> escribió:
>
> > I'm currently working on python embedding with C++. My goal is that
> > the C++ part handle files writing/reading so that the Python part only
> > work
Gruik wrote:
But before that 1 question: what if I'm in Python ?
Following your solution, I did that in Python :
def load_buffer(buffer) :
compiled_buffer = compile(buffer, "module_name", "exec")
exec(compiled_buffer)
It works great except that I can't have a module object
Ivan Illarionov <[EMAIL PROTECTED]> wrote:
>>> is there a better way than my solution? is mine ok?
>>
>> ['%s%s' % (not i%3 and 'Fizz' or '', not i%5 and 'Buzz' or '')
>> or str(i) for i in xrange(1, 101)]
>>
>> -- Ivan
>
> or, more correctly, if you actually need to "print":
>
> sys.stdout.w
Duncan Booth wrote:
Ivan Illarionov <[EMAIL PROTECTED]> wrote:
is there a better way than my solution? is mine ok?
['%s%s' % (not i%3 and 'Fizz' or '', not i%5 and 'Buzz' or '')
or str(i) for i in xrange(1, 101)]
-- Ivan
or, more correctly, if you actually need to "print":
sys.stdout.write
Michael Torrie wrote:
> In this case I'd try making a folder in the Python25 folder called
> "share" and put the contents of the gnuwin32 share/file stuff in there.
> Should look something like this:
>
> c:/python25/share/file/magic.mime.mgc
> c:/python25/share/file/magic
> c:/python25/share/file
Larry Hale wrote:
> Alternately, if one wishes to leave/place the magic files elsewhere,
> do like:
>
> >>> test = magic.Magic( magic_file = 'C:\\Program Files\\GnuWin32\
> \share\\file\\magic' ) # <-- spec where/what the file is
>
> NOTE: Even if the "magic_file" location *is* specified, "mi
On May 12, 1:30 pm, John Machin <[EMAIL PROTECTED]> wrote:
> Duncan Booth wrote:
[...]
> > I think the variant I came up with is a bit clearer:
>
> > for i in range(1,101):
> > print '%s%s' % ('' if i%3 else 'Fizz', '' if i%5 else 'Buzz') or i
>
> More than a bit clearer, IMO. How about
> p
I am using Snack to process the audio signal of a rc transmitter.
Look at
http://www.speech.kth.se/snack/
Another audio processing: PortAudio and the Python module PyAudio. Look
at http://people.csail.mit.edu/hubert/pyaudio/
Robert
Julien wrote:
Hi,
I would like to pull out the waveform of an
Yves Dorfsman <[EMAIL PROTECTED]> writes:
> D'Arcy J.M. Cain wrote:
>> On Mon, 12 May 2008 02:28:13 GMT
>> Yves Dorfsman <[EMAIL PROTECTED]> wrote:
>>> particular case, there's got to be a better way than:
>>>
>>> d = time.local()
>>> y = d[0]
>>> d = d[1]
>>
>> Like this?
>>
>> y, d = time.lo
On May 12, 1:48 pm, Irmen de Jong <[EMAIL PROTECTED]> wrote:
> Gruik wrote:
> > But before that 1 question: what if I'm in Python ?
> > Following your solution, I did that in Python :
>
> > def load_buffer(buffer) :
> > compiled_buffer = compile(buffer, "module_name", "exec")
> >
On May 11, 3:19 am, Francesco Bochicchio <[EMAIL PROTECTED]> wrote:
> But there is not such a thing, in Python. What you have is that A
> has the same attributes/methods of B plus its own.
> What you could do is adding in class A a method like this:
>
> class A(B):
> ...
> def set_b_at
Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On May 12, 1:30 pm, John Machin <[EMAIL PROTECTED]> wrote:
>> Duncan Booth wrote:
> [...]
>> > I think the variant I came up with is a bit clearer:
>>
>> > for i in range(1,101):
>> > print '%s%s' % ('' if i%3 else 'Fizz', '' if i%5 else
>> > 'Buzz'
notbob wrote:
frustrated and give up on learning programming, not really caring much for
coding, anyway. But, dammit, I'm gonna stick with it this time. I'll learn
python if it kills me!
No, it won't kill you but make you stronger ;)
--
http://mail.python.org/mailman/listinfo/python-list
Many city travel surveys collect source destination trip-start data;
you might be able to find one of these studies.
I think each car in your simulation should have a destination. Then
the simulation needs a route-finder, and cars can progress along their
routes as traffic permits -- or even chan
Hi there,
Since execfile() is removed in Python 3.0
I have question about using exec.
I know about
exec(open('filename').read())
but from documentation the 1st arg of exec can be 'file object'.
However
exec(open('filename'))
does not work.
Does anybody have idea how to construct 'file object
On May 12, 5:37 am, Iman <[EMAIL PROTECTED]> wrote:
> is there any sample source code in python or links, docs to help me ?
> thanks for your attention .
I've used SimPy in the past to implement a factory simulation. The
SimPy web site claims that it has been used for traffic simulation,
but doe
On May 12, 2:09 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> Then it seems equally dubious that 0.**y, y>0, should be well-defined.
> It seems to me that lim as x goes to 0. exp(y*log(x)) is equally well
> defined whether y is 0 or not, even though there is a discontinuity in the
> limit.
Well,
1.I have both 2.5 and 2.6 but both
appear, under Recent Projects, as
pcbuild. It would be helpful if the
Python Version could be indicated.
2.With 2.6, Python compiles and executes
OK but various packages are not
compiled, eg sqlite3.
3.Pythonw compiles OK but not sqlite3.
4.Mike Fletcher
On 2008-05-12, Ben Finney <[EMAIL PROTECTED]> wrote:
>> Maybe my brain works differently, but I find both "dummy" and
>> "unused" are extremely confusing names for loop counters. The loop
>> begins to look like it doesn't iterate at all if its counter is
>> dummy or unused.
>>
>> If it *counts* i
walterbyrd schrieb:
Can somebody help me understand the difference? Not just where Python
is concerned, but in general?
As I understand it, an application server is supposed to be a great
help in developing apps, because most of the business logic is already
there. It seems to me that, usually w
> 1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as
> pcbuild. It would be helpful if the Python Version could be indicated.
Hover over the link, and it will display the full path, which you can
then infer to reason about the specific copy of Python you are using.
In any case,
On Mon, May 12, 2008 at 1:45 AM, Banibrata Dutta
<[EMAIL PROTECTED]> wrote:
> > > Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is
> it correct to conclude that there is no RDBMS agnostic, single/uniform DB
> access API for Python ?
> > > Something in the lines of JDBC for Ja
Hello,
I'm trying to figure out if the following is a bug or if I'm using the
remove_option in the wrong way.
#!/usr/bin/env python
import optparse
parser = optparse.OptionParser()
parser.add_option("--test", help="This is a test option")
parser.remove_option('--test')
print parser.parse_args()
On 2008-05-12, Ben Finney <[EMAIL PROTECTED]> wrote:
I too, agree that requiring a name be bound to the values
coming out of the iterator seems "wrong".
> With "do something N times", there must be *something* to keep track
> of which iteration we're up to (or, equivalently, how many iterations
>
On 2008-05-12, Ben Finney <[EMAIL PROTECTED]> wrote:
> Paddy <[EMAIL PROTECTED]> writes:
>
>> I've used Fortran and C and so would tend to use either i,j,k as the
>> unused loop variable above, or, for clarity, call it something
>> descriptive like loop_count, if the loop body would be clearer.
>
>
[EMAIL PROTECTED] schrieb:
Hello,
I'm trying to figure out if the following is a bug or if I'm using the
remove_option in the wrong way.
#!/usr/bin/env python
import optparse
parser = optparse.OptionParser()
parser.add_option("--test", help="This is a test option")
parser.remove_option('--test'
Discount Coach Sandals, Dior Sandals, Prada Sandals, Chanel Sandals,
Versace Sandals, Crocs Sandals, LV Sandals, ( G U C C I ) Sandals,
Women's Sandals Men's Slippers From
China
Brand Sunglasses Wholesale:
Discount, Prada Sunglasses
Discount, D&G Sunglasses
Discount, Fendi Sunglasses
Discoun
Martin v. Löwis wrote:
1.I have both 2.5 and 2.6 but both appear, under Recent Projects, as
pcbuild. It would be helpful if the Python Version could be indicated.
Hover over the link, and it will display the full path, which you can
then infer to reason about the specific copy of Python you ar
Newbie question:
I'm trying to turn a large XML file (~7G compressed) into a YAML file,
and my program seems to be buffering the input.
IOtest.py is just
import sys
for line in sys.stdin.readlines():
print line
but when I run
$ gzcat bigXMLfile.gz | IOtest.py
but it hangs then dies.
2008/5/9 Sumon Sadhu <[EMAIL PROTECTED]>:
> Hey Dotan,
>
> My apologies if this post caused offense. Your assertion is right, maybe i
> should have emailed everyone individually like i've done with the first 45
> sites, but it was never my intention to spam.
Sumon, I think that you do not understa
Mensanator wrote:
> Ok, I agree with 101, but I wouldn't necessarily
> say the others were unfortunate. You might be
> surprised at how often such fixations discover
> bugs, something that I have a gift for.
The discovering, the making, or both? ;)
Tim Delaney
--
http://mail.python.org/mailman/l
On 12 May, 15:21, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> On May 12, 2:09 am, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
> > Then it seems equally dubious that 0.**y, y>0, should be well-defined.
> > It seems to me that lim as x goes to 0. exp(y*log(x)) is equally well
> > defined whether y is
On May 12, 3:46 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-05-12, Ben Finney <[EMAIL PROTECTED]> wrote:
>
> > Paddy <[EMAIL PROTECTED]> writes:
>
> >> I've used Fortran and C and so would tend to use either i,j,k as the
> >> unused loop variable above, or, for clarity, call it something
On Mon, 12 May 2008 08:05:39 -0700 (PDT), cshirky <[EMAIL PROTECTED]> wrote:
Newbie question:
I'm trying to turn a large XML file (~7G compressed) into a YAML file,
and my program seems to be buffering the input.
IOtest.py is just
import sys
for line in sys.stdin.readlines():
print line
cshirky schrieb:
Newbie question:
I'm trying to turn a large XML file (~7G compressed) into a YAML file,
and my program seems to be buffering the input.
IOtest.py is just
import sys
for line in sys.stdin.readlines():
print line
but when I run
$ gzcat bigXMLfile.gz | IOtest.py
but it
Hello,
I am beginner but so I need help. I have small script for receive data
from port 3883, but it print only once.
import socket
HOST = 'localhost'
PORT = 3883
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
data = s.recv(2048)
s.close()
print 'receive data from s
On May 12, 1:59 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> On May 12, 1:30 pm, John Machin <[EMAIL PROTECTED]> wrote:
>
> > Duncan Booth wrote:
> [...]
> > > I think the variant I came up with is a bit clearer:
>
> > > for i in range(1,101):
> > >print '%s%s' % ('' if i%3 else 'Fizz', ''
In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> I am stunned that this simple misunderstanding of mine ended in a
> mathematical clash of a sort. :) You guys really blew me away wih
> your mathematical knowledge. And also the 0**0 is a thing I've never
> thought about trying, until n
Hi All,
Pydev and Pydev Extensions 1.3.17 have been released
Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com
Release Highlights in Pydev Extensions:
--
In article <[EMAIL PROTECTED]>,
"Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Mark Dickinson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> On May 11, 9:36 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> |> Do you have in mind any situations in which it is advantageous to have
>
On Mon, 12 May 2008 08:34:07 -0700 (PDT), [EMAIL PROTECTED] wrote:
Hello,
I am beginner but so I need help. I have small script for receive data
from port 3883, but it print only once.
import socket
HOST = 'localhost'
PORT = 3883
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((
I have been experimenting with metaclasses lately. It seems possible to
define a metaclass by either subclassing type and then either redefining
__init__ or __new__.
Here's the signature for __init__:
def __init__(cls, name, bases, d):
and here's __new__:
def __new__(meta, classname,
Hi,
This must be very basic, but how'd you pass the same *args several
levels deep?
def func2(*args)
print args # ((1, 2, 3),)
# i want this to output (1, 2, 3) as func1!
# there must be some better way than args[0]?
def func1(*args):
print args # (1, 2, 3)
func2(args)
f
On 12 Kvě, 17:54, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Mon, 12 May 2008 08:34:07 -0700 (PDT), [EMAIL PROTECTED] wrote:
> >Hello,
> >I am beginner but so I need help. I have small script for receive data
> >from port 3883, but it print only once.
>
> >import socket
>
> >HOST = 'localh
On Mon, May 12, 2008 at 12:19 PM, Guillermo
<[EMAIL PROTECTED]> wrote:
> def func1(*args):
> print args # (1, 2, 3)
> func2(args)
change this line to:
func2(*args)
--
Jerry
--
http://mail.python.org/mailman/listinfo/python-list
On May 12, 9:19 am, Guillermo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This must be very basic, but how'd you pass the same *args several
> levels deep?
>
> def func2(*args)
>
> print args # ((1, 2, 3),)
> # i want this to output (1, 2, 3) as func1!
> # there must be some better way than ar
Colin J. Williams schrieb:
>> See PCbuild/readme.txt.
>
> I presume that this is PCbuild8.txt
No, it's PCbuild/readme.txt in Python 2.6 and 3.0
By the way you can call Tools\buildbot\external.bat from the root
directory of the 2.6 and 3.0. It checks out and build the dependencies.
The script req
On May 12, 11:15 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> But exp(y*log(x)) -> 1 as (x, y) -> (0, 0) along any analytic curve
> which is not the x=0 axis (I think at least - it seems easy to prove
> that given f and g analytic over R, f(x)*ln g(x) -> 0 as x -> 0 if
> f(0)=g(0)=0 and g(x)>
On May 12, 8:31 am, Duncan Booth <[EMAIL PROTECTED]> wrote:
> Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>
> > The sloppy use of "single quote" for the "apostrophe" is unfortunate
> >
>
> True, but that problem is outside of the Python community's control. Given
> that people do often refer
Lou Pecora <[EMAIL PROTECTED]> writes:
> In article <[EMAIL PROTECTED]>,
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
>> "Mark Dickinson" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> On May 11, 9:36 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>> |> Do you have in mind any s
On 12 mai, 18:10, Matthew Wilson <[EMAIL PROTECTED]> wrote:
> I have been experimenting with metaclasses lately. It seems possible to
> define a metaclass by either subclassing type and then either redefining
> __init__ or __new__.
>
> Here's the signature for __init__:
>
> def __init__(cls, n
QOTW: "With Python, you can program with a smile on your face." - Gary
Herron
"Looking back over the years, after I learned Python I realized that I
never really had enjoyed programming before." - Aahz
http://groups.google.com/group/comp.lang.python/browse_thread/thread/b4aa1d1578c26950/
Julien wrote:
> Hi,
>
> I would like to pull out the waveform of an audio file and save it
> into an image file, for example in GIF format. Is that achievable, and
> if so, how?
Take a look at http://code.enthought.com/projects/chaco/ One of their
examples does exactly this. Last example on thi
On Mon, 12 May 2008 09:19:48 -0700 (PDT), [EMAIL PROTECTED] wrote:
[snip]
>Where is the mistake? I dont know.
You cannot reconnect a socket. You need to create a new one for each
connection. It's also almost certainly the case that the way you are
receiving data is incorrect. There is no g
> >> Again a noob question.
> >> Based on this URL http://wiki.python.org/moin/DatabaseInterfaces , is it
> >> correct to conclude that there is no RDBMS agnostic, single/uniform DB
> >> access API for Python ?
> >> Something in the lines of JDBC for Java, DBD for Perl etc. ?
> >> How is the RDB
Hi
I am looking for a way to programmically get a list of all python
existing statements that I cannot access by __builtins__ or locals()
(like ["assert","break","class",...])
Thanks,
Ohad
--
http://mail.python.org/mailman/listinfo/python-list
Just something that crosses my mind every time I delve into "Learning
Python" each night. Does anyone see any value in learning Python when you
don't need to for school, work, or any other reason? I mean, sure, there's
value in learning anything at any time, but for something like a programming
Paul Hankin <[EMAIL PROTECTED]> writes:
> On May 12, 1:59 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>> On May 12, 1:30 pm, John Machin <[EMAIL PROTECTED]> wrote:
>>
>> > Duncan Booth wrote:
>> [...]
>> > > I think the variant I came up with is a bit clearer:
>>
>> > > for i in range(1,101):
>> See PCbuild/readme.txt.
>
> I presume that this is PCbuild8.txt
As Christian says: PCbuild/readme.txt are the correct instructions
(and had been since Python 2.0 or so).
> Now, I would like to remove Python 2.5 from VS 2008 but see no obvious
> way of getting rid of it.
You might be able to
> Hopefully this question even makes sense!
I completely agree that you don't need to spend time on
learning a language if you don't plan on using it; I'll
leave alone the entire discussion of doing things for fun
only (you don't *need* to eat ice cream, either - right?)
OTOH: do you plan to do
Hi, I just tried to install Python 3.0a5 an another Windows PC. I did
what I have done yesterday at home:
1. Downloaded the daily snapshot
http://svn.python.org/snapshots/msi/python-3.0.14011.msi
2. Installed to C:\Python30
3. Added C:\Python30 to the Path environment for all users.
when I run p
Thank you all for the pointers and precise information.
Python community support surely rocks!!
On 5/12/08, Daniel Fetchinson <[EMAIL PROTECTED]> wrote:
>
> > >> Again a noob question.
> > >> Based on this URL http://wiki.python.org/moin/DatabaseInterfaces ,
> is it
> > >> correct to conclude t
On 12 mai, 09:00, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Sat, 10 May 2008 22:12:37 -0300, globalrev <[EMAIL PROTECTED]> escribió:
>
>
>
> >http://reddit.com/r/programming/info/18td4/comments
>
> > claims people take a lot of time to write a simple program like this:
>
> > "Write a prog
On 2008-05-12, Martin v. L?wis <[EMAIL PROTECTED]> wrote:
> OTOH: do you plan to do any programming at all, in your
> life? If yes: consider using Python for every programming
> task you'll encounter - unless there are outside constraints
> demanding a different language. Python is flexible enough
On 2008-05-12, Paul Hankin <[EMAIL PROTECTED]> wrote:
> for i in xrange(1, 101):
> print 'Fizz'*(i%3<1)+'Buzz'*(i%5<1) or i
Doh! It never occured to me that 'string' * 0 == ''.
--
Grant Edwards grante Yow! An air of FRENCH FRIES
1 - 100 of 197 matches
Mail list logo