Jasper wrote:
Having used Python for some 15 years, I'm hardly a neophyte -- it's pure
serendipity that this hasn't bitten me before.
Using languages and spending time reflecting over how they're put
together are two very different things.
--
http://mail.python.org/mailman/listinfo/python
Steven D'Aprano wrote:
It doesn't help that the solution to get the expected behavior involves
adding boiler-plate code all over.
Expected by who?
Blub programmers.
--
http://mail.python.org/mailman/listinfo/python-list
Hi:
I need to find the multiples of a decimal number in a floating point
list. For instance, if a have the list [0,0.01,0.02,...1], I want the
multiples of 0.2: [0, 0.2,0.4,0.6,0.8,1].
With integers this problem is easy, just test for (i%n == 0), where i
is the number I am testing, and n is the m
JustWant2Ask JustWant2Ask wrote:
I am trying to write a data filtering routine based on the input
received from a html form as follows:
myFilter=(((var1>=1) and (var1<=5)) or (var2==10)) and not(var3)
Is there any way of auto-completing the variables (var1, var2 and var3
in the example above
On Mon, 18 Aug 2008 18:27:53 +0200, Peter Otten wrote:
> Dan Lenski wrote:
>> How does this play with standard precedence rules?
>
> Simple, all comparisons have the same priority:
>
> http://docs.python.org/ref/comparisons.html
>
> Peter
I see. So, since the comparison operators have lower p
[EMAIL PROTECTED] wrote:
It is this procedure I am trying to replicate in Python. Is it
possible to guide help tell me the right approach here. Of course I
can submit my code to help ( if this is useful ) but the problem I
think clear to see from these summary details.
I'm afraid this is a bit
On Mon, 18 Aug 2008 10:52:45 -0700, Alejandro wrote:
> Hi:
>
> I need to find the multiples of a decimal number in a floating point
> list. For instance, if a have the list [0,0.01,0.02,...1], I want the
> multiples of 0.2: [0, 0.2,0.4,0.6,0.8,1].
>
> With integers this problem is easy, just tes
On Mon, 18 Aug 2008 18:04:53 +, Dan Lenski wrote:
> On Mon, 18 Aug 2008 10:52:45 -0700, Alejandro wrote:
>
>> Hi:
>>
>> I need to find the multiples of a decimal number in a floating point
>> list. For instance, if a have the list [0,0.01,0.02,...1], I want the
>> multiples of 0.2: [0, 0.2,0
Robert Brown wrote:
You may find the above surprising, but Common Lisp users expect the default
argument expression to be evaluated anew when need by a function call:
I find the Lisp approach more reasonable. Also, an argument based on
performance for Python's current behavior seems dubious,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ython.org]
> On Behalf Of len
> Sent: Monday, August 18, 2008 11:55 AM
> To: python-list@python.org
> Subject: Newbie problem inserting into MySQL
>
>
> Hi All
>
> I have started a little pet project to learn py
On Aug 18, 10:56 pm, [EMAIL PROTECTED] wrote:
> running this snippet, is blanking out ^abdc$.. what is the issue ?
> abcd
> efg
> hijk
> lmn
> $
>
> efg
> hijk
> lmn
>
The OP said he wanted to delete the line with abc [sic]. He showed no
interest in "blanking out ^abdc$. [sic]". The given snippet
On Aug 18, 7:01 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > It is this procedure I am trying to replicate in Python. Is it
> > possible to guide help tell me the right approach here. Of course I
> > can submit my code to help ( if this is useful ) but the problem I
>
> -Original Message-
> From: Madari, Edwin
> Sent: Monday, August 18, 2008 3:03 PM
> To: 'len'; python-list@python.org
> Subject: Re: Newbie problem inserting into MySQL
>
> > -Original Message-
> > From:
> [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > yt
[EMAIL PROTECTED] wrote:
another thing - cumulative inserts will result, since
> listofrec is not emptied after each sql execution.
isn't that the point? -- he's building an argument array, and passing it
to executemany after it's reached a given size.
(to the OP, a quick code review doesn'
Anish Chapagain wrote:
but while running setup.py build with distutils it's showing error as
_ex.o: In function 'init_arguments':
_ex.c :89: undefined reference to _TLM_read_model
_ex.c :95: undefined reference to _TLM_set_tag
for all the global function declared within .h file and
Fredrik Lundh:
> or you could use re.finditer, which can be used for a lot more than just
> splitting.
Having implemented some of them (and even invented algorithms like a
new substring search, that I have appreciated) you know that string
methods are simpler ways to efficiently perform specialize
Hi,
I have an interface (let's say eth0) which has more than one IP. Is
there any way I can choose - from a parameter or something - what ip to use?
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 18, 8:43 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Anish Chapagain wrote:
> > but while running setup.py build with distutils it's showing error as
>
> > _ex.o: In function 'init_arguments':
> > _ex.c :89: undefined reference to _TLM_read_model
> > _ex.c :95: undefined refere
On Aug 19, 1:54 am, len <[EMAIL PROTECTED]> wrote:
> | lottryid | int(11) | NO | PRI | NULL|
> auto_increment |
> tupcnt += 1
> rectuple = tupcnt, thekey, a, b, c, d, e, mysum, 0
> listofrec.append(rectuple)
>
len wrote:
> I have started a little pet project to learn python and MySQL. The
> project involves figuring out all the combinations for a 5 number
> lottery and storing the data in a MySQL file.
> import MySQLdb
> cursor.executemany('''insert into
> littlelottery
>
This is similar to my last post, but a little different. Here is what I would
like to do.
Lets say I have a text file. The contents look like this, only there is A
LOT of the same thing.
() A registry mark given by underwriters (as at Lloyd's) to ships in
first-class condition. Inferior grades
En Mon, 18 Aug 2008 09:05:30 -0300, Adrian Smith <[EMAIL PROTECTED]> escribió:
> On Aug 18, 7:16 pm, Amie <[EMAIL PROTECTED]> wrote:
>> Afternoon all.
>>
>> Just want to know how to create html tables using a for loop.
>> I need to display 34 html tables, so I figured a for loop will do.
>> Please
On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote:
> Now, I am talking 1000's of these. I need to do something like this. I will
> have a number, and what I want to do is go through this text file, just like
> the example. The trick is this, those "()'s" are what I need to match, so if
> the n
Adrian Smith wrote:
Just want to know how to create html tables using a for loop.
I need to display 34 html tables, so I figured a for loop will do.
Please show me an example of how to do that.
for i in range(33):
range(33) returns 33 numbers, not 34 (the upper bound is not inclusive).
Hi,
Is it thousands of lines or millions of lines?
If it's just a few thousands and you're not working on an embedded
device with little memory you could use the brute force approach
Just read the whole file in one string vaiable
split everything into an array separated by '()'
Now you can
En Mon, 18 Aug 2008 17:40:13 -0300, Alexnb <[EMAIL PROTECTED]> escribió:
> Lets say I have a text file. The contents look like this, only there is A
> LOT of the same thing.
>
> () A registry mark given by underwriters (as at Lloyd's) to ships in
> first-class condition. Inferior grades are indica
On Mon, 18 Aug 2008 21:43:43 + (UTC), Wojtek Walczak wrote:
> On Mon, 18 Aug 2008 13:40:13 -0700 (PDT), Alexnb wrote:
>> Now, I am talking 1000's of these. I need to do something like this. I will
>> have a number, and what I want to do is go through this text file, just like
>> the example. Th
I have problems encoding some team names.
Python can't work with: ª, é, ç.
I tried to create unicode in this two ways:
self.nombreLocal = unicode(nombreLocal)
self.nombreLocal = unicode(nombreLocal, 'iso-8859-1')
But there is always one character that can't be encoded!! unicode doesn`t
enco
On Aug 19, 6:40 am, Alexnb <[EMAIL PROTECTED]> wrote:
> This is similar to my last post,
Oh, goodie goodie goodie, I love guessing games!
> but a little different. Here is what I would
> like to do.
>
> Lets say I have a text file. The contents look like this, only there is A
> LOT of the same th
Joan Pallarès wrote:
I tried to create unicode in this two ways:
self.nombreLocal = unicode(nombreLocal)
self.nombreLocal = unicode(nombreLocal, 'iso-8859-1')
the "unicode" constructor takes a string of bytes in some known
character encoding, and decodes them into a Unicode string. if you
This report is intended for any computer programming experts who
would like to propose that their favorite programming language is the one
that should be used for the potentially important application that is being
discussed here.
I believe more scientists are happy programming in Pytho
Okay, well the point of this program is to steal from the OS X built-in
dictionary. While most of the files are hidden this one is not.
The "()" You saw actually looks like this: ([I][/I]) only the []'s are <'s
and >'s but the forum doesn't take kindly to html.
What you saw was exactly how it wi
On Aug 19, 8:34 am, Alexnb <[EMAIL PROTECTED]> wrote:
> The number is based on the word(s) they type into my program, and then it
> fetches the number that word is in the list of words and then will search
> the definitions document and go to the nth def. It probably won't work, but
> that is the
On Mon, 18 Aug 2008 13:40:13 -0700, Alexnb wrote:
> Lets say I have a text file. The contents look like this, only there is
> A LOT of the same thing.
>
> () A registry mark given by underwriters (as at Lloyd's) to ships in
> first-class condition. Inferior grades are indicated by A 2 and A 3. ()
On Aug 19, 8:34 am, Alexnb <[EMAIL PROTECTED]> wrote:
>
> The number is based on the word(s) they type into my program, and then it
> fetches the number that word is in the list of words and then will search
> the definitions document and go to the nth def. It probably won't work, but
> that is the
If by "What happened when you did:" you mean dictionary.com and
yourdictionary.com? Nothing, they work but screen scraping isn't medicore at
best. They both work fine (yourdictionary is better for screen scraping)
but. I want maybe an offline soloution. But the whole reason for the program
is that
On Mon, 18 Aug 2008 15:34:12 -0700, Alexnb wrote:
> Okay, well the point of this program is to steal from the OS X built-in
> dictionary.
Ah, not homework, but copyright infringement.
> Also, on a side-note, does anyone know a very simple dictionary site,
> that isn't dictionary.com or yourdicti
On Aug 18, 10:59 pm, "E.D.G." <[EMAIL PROTECTED]> wrote:
>
>If all goes according to plan, within a few weeks I will begin
> circulating .exe copies of a Perl language disaster mitigation related
> computer program that I have been developing during the past decade or so.
A computer progra
On Aug 19, 6:49 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Adrian Smith wrote:
> >> Just want to know how to create html tables using a for loop.
> >> I need to display 34 html tables, so I figured a for loop will do.
> >> Please show me an example of how to do that.
>
> > for i in range(33):
>
Martin v. Löwis wrote:
What about to start to resolve issues step by step ?
The first step surely should be to get the autoconf issue resolved.
I don't think distutils cross-compilation is going to work, instead,
people wishing to cross-compile should edit Modules/Setup.
Regards,
Martin
Ple
I'm proud to release version 1.4.5 of Roundup.
1.4.5.1 has one new feature:
- Add use of username/password stored in ~/.netrc in mailgw (sf patch
#1912105)
It is otherwise mostly a bugfix release:
- 'Make a Copy' failed with more than one person in nosy list (sf #1906147)
- xml-rpc security c
En Mon, 18 Aug 2008 12:24:07 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> escribió:
> Thanks everyone who tried to help me to parse incoming email from an exchange
> server:
>
> Now, I am getting following error; I am not sure where I am doing wrong. I
> appreciate any help how to resolve this error
On Aug 19, 2:37 am, "Stephen Cattaneo" <[EMAIL PROTECTED]>
wrote:
> - What did you run in the cronjob to get back all those variables?
>
> set; echo "-"; echo "import os; print
> os.environ" | python
>
> Cheers,
>
> S
As I should have noted from $BASH_EXECUTION_STRING. I'd be hal
En Mon, 18 Aug 2008 12:24:07 -0300, Ahmed, Shakir <[EMAIL PROTECTED]> escribió:
> Thanks everyone who tried to help me to parse incoming email from an exchange
> server:
>
> Now, I am getting following error; I am not sure where I am doing wrong. I
> appreciate any help how to resolve this error
On Aug 18, 11:17 pm, "Shawn Milochik" <[EMAIL PROTECTED]> wrote:
>
> The easiest solution (in my opinion) is to write a bash script to
> execute your Python script, and use that bash script to add those
> environment variables.
Agreed. Wrap it in a shell script, easier to read and grow than a
on
En Mon, 18 Aug 2008 11:02:20 -0300, gundlach <[EMAIL PROTECTED]> escribió:
> In C or C++, what you want to do is impossible. However, in Python,
> there's a way to specify the name of a local variable at runtime:
>
> locals()['cat'] = []
>
> locals() is a function call that returns a dictionary m
HI,
I am using Solaris and subprocess.Popen to spawn a process on a remote machine.
Thanks,
Srini
- Original Message
From: Diez B. Roggisch <[EMAIL PROTECTED]>
To: python-list@python.org
Sent: Monday, 18 August, 2008 9:23:20 PM
Subject: Re: Getting pid of a remote process
srinivasan sr
len wrote:
I have started a little pet project to learn python and MySQL. The
project involves figuring out all the combinations for a 5 number
lottery and storing the data in a MySQL file.
1. As someone else mentioned, the placeholder for MySQL data
is "%s", not "?".
2. After
Hello All,
I've a configuration.ini file. This particular can be accessed by several
threads of my application. Each thread can read/write configuration
parameters from/to the configuration.ini file. I am using threading (Rlock)
to lock the resource (configuration.ini file) while accessing it from
On Mon, Aug 18, 2008 at 10:58 PM, tarun <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I've a configuration.ini file. This particular can be accessed by several
> threads of my application. Each thread can read/write configuration
> parameters from/to the configuration.ini file. I am using threading (
I think I need something called global interpreter lock which is accessible
to all the threads. But I am not sure how to implement this.
On Tue, Aug 19, 2008 at 11:28 AM, tarun <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I've a configuration.ini file. This particular can be accessed by several
Hi Folks,
I am using cherrypy and python. I am trying to get a user profile
image to resize on the client side before uploading to the server. PHP
has a gd library that does it it seems. Has anyone done this in a
python environment without uploading to the server?
--
http://mail.python.org/mailman
On 19 Aug., 08:32, brahmaforces <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I am using cherrypy and python. I am trying to get a user profile
> image to resize on the client side before uploading to the server. PHP
> has a gd library that does it it seems.
php works on the client side ?? are you su
On 19 Aug 2008, [EMAIL PROTECTED] wrote:
> Hi Folks,
>
> I am using cherrypy and python. I am trying to get a user profile
> image to resize on the client side before uploading to the server. PHP
> has a gd library that does it it seems.
PIL? http://www.pythonware.com/products/pil/.
--
-rob
-
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Rather than explain further, I suggest that you visit python.org and read
some of the tutorial to see what *you* think.
http://docs.python.org/tut/tut.html
My original programs were mostly in Basic. When it became obvio
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
language disaster was to avoid using that language altogether.
It has been okay for getting my application up and running. And now that it
is running people who will be using the application will have to decide if
they
brahmaforces schrieb:
Hi Folks,
I am using cherrypy and python. I am trying to get a user profile
image to resize on the client side before uploading to the server. PHP
has a gd library that does it it seems. Has anyone done this in a
python environment without uploading to the server?
Everyth
101 - 157 of 157 matches
Mail list logo