Tim Golden wrote:
Astan Chee wrote:
Hi,
I'm trying to modify the copytree function in shutil so that any file
being copied does not take more than 5 minutes (if it does, skip to the
next one).
One suggestion is to use the CopyFileEx API
exposed in the win32file module from pywin32.
rocky wrote:
> Someone recently reported a problem in pydb where a function defined
> in his program was conflicting with a module name that pydb uses. I
> think I understand what's wrong, but I don't have any elegant
> solutions to the problem. Suggestions would be appreciated.
>
> In a nutshell
Steven D'Aprano wrote:
On Sun, 05 Jul 2009 10:12:54 +0200, Hendrik van Rooyen wrote:
Python is not C.
John Nagle is an old hand at Python. He's perfectly aware of this, and
I'm sure he's not trying to program C in Python.
I'm not entirely sure *what* he is doing, and hopefully he'll speak
Steven D'Aprano wrote:
On Sun, 05 Jul 2009 01:58:13 -0700, Paul Rubin wrote:
Steven D'Aprano writes:
Okay, we get it. Parsing HTML 5 is a bitch. What's your point? I don't
see how a case statement would help you here: you're not dispatching on
a value, but running through a series of tests un
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Joshua Kugler wrote:
> BTW, APSW is written by the same author as pysqlite.
Not even remotely true :-) pysqlite was written by various people, with
the maintainer of the last several years being Gerhard Häring. I am the
(sole) author of APSW and hav
On Mon, Jul 6, 2009 at 10:13 PM, Steven
D'Aprano wrote:
> On Tue, 07 Jul 2009 04:51:51 +, Lie Ryan wrote:
>
>> Chris Rebert wrote:
>>> On Mon, Jul 6, 2009 at 1:29 AM, Lawrence
>>> D'Oliveiro wrote:
In message , Tim
Golden wrote:
> The difficulty here is knowing where to put s
kio wrote:
> Hi,
>
> I'm studying the CPython source code. I don’t quite understand why
> they’re using PyObject_VAR_HEAD to define struct like PyListObject.
To
> define such kind of struct, could I use _PyObject_HEAD_EXTRA as a
> header and add "items" pointer and "allocated" count explicity? I
On Jul 6, 7:21 pm, m...@pixar.com wrote:
> I'm looking for something like Tcl's [clock scan] command which parses
> human-readable time strings such as:
>
> % clock scan "5 minutes ago"
> 1246925569
> % clock scan "tomorrow 12:00"
> 1246993200
> % clock scan "today + 1 fortnight
Nobody kirjoitti:
On Mon, 06 Jul 2009 20:41:03 +0300, jack catcher (nick) wrote:
Does the webcam just deliver frames, or are you getting frames out of
a decoder layer? If it's the latter, you want to distribute the encoded
video, which should be much lower bandwidth. Exactly how you do that
d
On Tue, 07 Jul 2009 05:13:28 +, Lie Ryan wrote:
> When people are fighting over things like `sense`, although sense may
> not be strictly wrong dictionary-wise, it smells of something burning...
That would be my patience.
I can't believe the direction this discussion has taken. Anybody sensi
>> Yes, there are plenty of languages other than Java and C, but the
>> influence of C is admittedly huge in Python. Why do you think loops
>> are called "for", conditionals "if" or "while", functions return via
>> "return", loops terminate via "break" and keep going via "continue"
>> and why is co
On Jul 7, 12:16�am, casevh wrote:
> I discovered a serious bug with comparisons and have posted alpha2
> which fixes that bug and adds Unicode support for Python 2.x
>
> casevh
Damn! I was just congatulating myself for pulling off
a hat trick (there had been no point in downloading
3.x without gm
I discovered a serious bug with comparisons and have posted alpha2
which fixes that bug and adds Unicode support for Python 2.x
casevh
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
> In article <006e795f$0$9711$c3e8...@news.astraweb.com>,
> Steven D'Aprano wrote:
>> On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
>>> kj wrote:
sense = cmp(func(hi), func(lo))
assert sense != 0, "func is not strictly monotonic in [lo, hi]"
>>> As
On Tue, 07 Jul 2009 04:51:51 +, Lie Ryan wrote:
> Chris Rebert wrote:
>> On Mon, Jul 6, 2009 at 1:29 AM, Lawrence
>> D'Oliveiro wrote:
>>> In message , Tim
>>> Golden wrote:
>>>
The difficulty here is knowing where to put such a warning. You
obviously can't put it against the "++" op
On Mon, 06 Jul 2009 15:02:26 -0700, Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>> > What is required in a python program to make sure it catches a
>> > control-
>> > c on the command-line? Do some i/o? The OS here is
On Mon, 06 Jul 2009 21:02:19 -0700, Aahz wrote:
> In article <006e795f$0$9711$c3e8...@news.astraweb.com>, Steven D'Aprano
> wrote:
>>On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
>>> kj wrote:
sense = cmp(func(hi), func(lo))
assert sense != 0, "func is n
Chris Rebert wrote:
> On Mon, Jul 6, 2009 at 1:29 AM, Lawrence
> D'Oliveiro wrote:
>> In message , Tim Golden
>> wrote:
>>
>>> The difficulty here is knowing where to put such a warning.
>>> You obviously can't put it against the "++" operator as such
>>> because... there isn't one.
>> This bug is
timmyt wrote:
i'm interested in getting opinions on a small wsgi framework i
assembled from webob, sqlalchemy, genshi, and various code fragments i
found on the inter-tubes
here is the interesting glue - any comments / suggestions would be
much appreciated
Fun! Since you're already using WebOb
Astan Chee wrote:
Hi,
I'm trying to modify the copytree function in shutil so that any file
being copied does not take more than 5 minutes (if it does, skip to the
next one).
One suggestion is to use the CopyFileEx API
exposed in the win32file module from pywin32. That
allows for a callback
In article <006e795f$0$9711$c3e8...@news.astraweb.com>,
Steven D'Aprano wrote:
>On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
>> kj wrote:
>>>
>>> sense = cmp(func(hi), func(lo))
>>> assert sense != 0, "func is not strictly monotonic in [lo, hi]"
>>
>> As already said b
En Mon, 06 Jul 2009 13:29:21 -0300, Philip Semanchuk
escribió:
On Jul 6, 2009, at 12:10 PM, Diez B. Roggisch wrote:
Philip Semanchuk wrote:
I can't figure out how to map a C variable of size_t via Python's
ctypes module.
from ctypes import c_size_t
D'oh! [slaps forehead]
That will teach
En Mon, 06 Jul 2009 19:49:41 -0300, MRAB
escribió:
Chris Rebert wrote:
from collections import defaultdict
counts = defaultdict(lambda: 0)
Better is:
counts = defaultdict(int)
For speed? This is even faster:
zerogen = itertools.repeat(0).next
counts = defaultdict(zerogen)
--
Gabriel Ge
kj wrote:
"There is real value in having a small language."
Guido van Rossum, 2007.07.03
http://mail.python.org/pipermail/python-3000/2007-July/008663.html
So there.
small != minimal
BTW, that's just one example. I've seen similar sentimen
On Jul 6, 8:43 pm, Carl Banks wrote:
> On Jul 6, 5:21 pm, m...@pixar.com wrote:
>
> > I'm looking for something like Tcl's [clock scan] command which parses
> > human-readable time strings such as:
>
> > % clock scan "5 minutes ago"
> > 1246925569
> > % clock scan "tomorrow 12:00"
> >
palewire wrote:
In my application, I'd like to have a function that compares two values,
either of which may be null, and then classify the result depending on
whether one is higher or lower than the other.
I find myself writing something clunky like this, and I'm curious whether
anyone might kn
Someone recently reported a problem in pydb where a function defined
in his program was conflicting with a module name that pydb uses. I
think I understand what's wrong, but I don't have any elegant
solutions to the problem. Suggestions would be appreciated.
In a nutshell, here's the problem:
In
Hi,
I'm trying to modify the copytree function in shutil so that any file
being copied does not take more than 5 minutes (if it does, skip to the
next one). This is what I have so far:
import shutil
import signal, os
def handler(signum, frame):
print 'Signal handler called with signal', si
I wonder how many people have been tripped up by the fact that
++n
and
--n
fail silently for numeric-valued n.
>>>
>>> What do you mean, "fail silently"? They do exactly what you should
>>> expect:
>> ++5 # positive of a positive number is p
En Mon, 06 Jul 2009 19:56:40 -0300, matt0177 escribió:
When I try to run the command as outlined in
the book "simple_markup2.py < test_input.txt > test_output.html i get the
following error every time.
IOError: [Errno 9] Bad file descriptor
That's a Windows problem. When you execute the scri
On Tue, 07 Jul 2009 02:25:13 +0100, palewire wrote:
In my application, I'd like to have a function that compares two values,
either of which may be null, and then classify the result depending on
whether one is higher or lower than the other.
I find myself writing something clunky like this, a
On Tue, 07 Jul 2009 02:09:41 +0100, Chris Withers
wrote:
> I wonder how close setuptools is to being forked because of Phil Eby's
> unwillingness to apply patches and/or clean up the horrible setuptools
> code?
setuptools... as far as I can see isn't actually installed until you
install easyinst
In message , Terry
Reedy wrote:
> ... it is C, not Python, that is out of step with standard usage in math
> and most languages ...
And it is C that introduced "==" for equality, versus "=" for assignment,
which Python slavishly followed instead of keeping "=" with its mathematical
meaning and
nacim_br...@agilent.com wrote:
Dear Python gurus,
If I'd like to set dielectric constant for the certain material, is it possible
to do such in Python environment? If yes, how to do or what syntax can be used?
Also, I'd like to get a simulation result, like voltage, is it possible to get this
In my application, I'd like to have a function that compares two values,
either of which may be null, and then classify the result depending on
whether one is higher or lower than the other.
I find myself writing something clunky like this, and I'm curious whether
anyone might know a more elegan
On Mon, 06 Jul 2009 17:00:39 -0600, nacim_bravo wrote:
> Dear Python gurus,
>
> If I'd like to set dielectric constant for the certain material, is it
> possible to do such in Python environment? If yes, how to do or what
> syntax can be used?
certain_material.dielectric_constant = 1.234
> Als
On Mon, 06 Jul 2009 16:43:43 +0100, Tim Rowe wrote:
> 2009/7/4 kj :
>
>> Precisely. As I've stated elsewhere, this is an internal helper
>> function, to be called only a few times under very well-specified
>> conditions. The assert statements checks that these conditions are as
>> intended. I.
MRAB wrote:
Nile wrote:
[snip]
I initialized the dictionary earlier in the program like this -
hashtable = {}
I changed the "dict" to hashtable but I still get the same result
I will try to learn about the defaultdict but I'm just trying to keep
it as simple as I can for now
Revised code
f
Floris Bruynooghe wrote:
It is, see
http://mail.python.org/pipermail/distutils-sig/2009-July/012374.html
It's seen no changes in 9 months.
It's setuptools... I'm sure you can find many flamefests on distutils-
sig about this.
Yeah, distutils-sig is the right place to discuss.
I wonder ho
On Mon, 06 Jul 2009 05:47:18 -0700, Scott David Daniels wrote:
> Steven D'Aprano wrote:
>> ... That's the Wrong Way to do it --
>> you're using a screwdriver to hammer a nail
>
> Don't knock tool abuse (though I agree with you here). Sometimes tool
> abuse can produce good results. For examp
On Mon, 06 Jul 2009 14:32:10 +0200, Jean-Michel Pichavant wrote:
> kj wrote:
>> I've rewritten it like this:
>>
>> sense = cmp(func(hi), func(lo))
>> assert sense != 0, "func is not strictly monotonic in [lo, hi]"
>>
>> Thanks for your feedback!
>>
>> kj
>>
>>
> As already said befo
On Tue, 07 Jul 2009 00:29:36 +0100, Nile wrote:
Revised code
for x in range(len(file_list)):
d = open(file_list[x] , "r")
data = d.readlines()
k = 0
k = above_or_below(data)
print "here is the value that was returned ",k
hashtable[k] = hashtable.
On Jul 6, 5:21 pm, m...@pixar.com wrote:
> I'm looking for something like Tcl's [clock scan] command which parses
> human-readable time strings such as:
>
> % clock scan "5 minutes ago"
> 1246925569
> % clock scan "tomorrow 12:00"
> 1246993200
> % clock scan "today + 1 fortnight
I'm looking for something like Tcl's [clock scan] command which parses
human-readable time strings such as:
% clock scan "5 minutes ago"
1246925569
% clock scan "tomorrow 12:00"
1246993200
% clock scan "today + 1 fortnight"
1248135628
Does any such package exist for Python
En Mon, 06 Jul 2009 18:15:44 -0300, Scott David Daniels
escribió:
brasse wrote:
I have been thinking about how write exception safe constructors in
Python. By exception safe I mean a constructor that does not leak
resources when an exception is raised within it.
...
> As you can see this i
Nile wrote:
[snip]
I initialized the dictionary earlier in the program like this -
hashtable = {}
I changed the "dict" to hashtable but I still get the same result
I will try to learn about the defaultdict but I'm just trying to keep
it as simple as I can for now
Revised code
for x in range
On Jul 6, 5:22 pm, Chris Rebert wrote:
> On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
> > I am trying to write a simple little program to do some elementary
> > stock market analysis. I read lines, send each line to a function and
> > then the function returns a date which serves as a key to a
> >
On Mon, 06 Jul 2009 17:54:35 +0100, Dave Angel wrote:
Rhodri James wrote:
Indeed, arguably it's a bug for C compilers to fail to find the valid
parsing of "++5" as "+(+5)". All I can say is that I've never even
accidentally typed that in twenty years of C programming.
But the C language spec
On Tue, 07 Jul 2009 00:00:39 +0100, wrote:
Dear Python gurus,
If I'd like to set dielectric constant for the certain material, is it
possible to do such in Python environment? If yes, how to do or what
syntax can be used?
Also, I'd like to get a simulation result, like voltage, is it pos
On Mon, 06 Jul 2009 21:40:49 +0100, kj wrote:
In <4a4e2227$0$7801$426a7...@news.free.fr> Bruno Desthuilliers
writes:
kj a écrit :
(snipo
To have a special-case
re.match() method in addition to a general re.search() method is
antithetical to language minimalism,
FWIW, Python has no pret
Dear Python gurus,
If I'd like to set dielectric constant for the certain material, is it possible
to do such in Python environment? If yes, how to do or what syntax can be used?
Also, I'd like to get a simulation result, like voltage, is it possible to get
this value in Python environment?
P
> Philip Semanchuk (PS) wrote:
>PS> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>> What is required in a python program to make sure it catches a control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>PS> You can use a try/except to catch a KeyboardInterrupt excepti
On Mon, 06 Jul 2009 18:41:03 +0100, jack catcher (nick)
wrote:
Rhodri James kirjoitti:
Does the webcam just deliver frames, or are you getting frames out of
a decoder layer? If it's the latter, you want to distribute the encoded
video, which should be much lower bandwidth. Exactly how you
> Dave Angel (DA) wrote:
>DA> MRAB wrote:
>>> Dave Angel
>>> wrote:
>>> [snip]
It would probably save some time to not bother storing the zeroes in the
list at all. And it should help if you were to step through a list of
primes, rather than trying every possible int. Or at l
Hi,
I'm working with both python and matlab at the moment and I was wondering if
there is an efficient way to take a 2-D array (of 1s and 0s) in python and
write it to a text file such that matlab will be able to create a sparse
matrix from it later.
Thanks!
--
http://mail.python.org/mailman/lis
http://www.nabble.com/file/p24364269/simple_markup2.py simple_markup2.py
http://www.nabble.com/file/p24364269/util2.py util2.py
The two above files are from chapter 20 of the Apress book "Beginning Python
>From Novice to Professional". When I try to run the command as outlined in
the book "simp
> Scott David Daniels (SDD) wrote:
>SDD> # No need for global declarations, we alter, not replace
Yes, I know, but I find it neater to do the global declarations, if only
for documentation. And they don't affect the run time, only the compile
time.
--
Piet van Oostrum
URL: http://pie
On Jul 6, 5:30 pm, "Pablo Torres N." wrote:
> On Mon, Jul 6, 2009 at 17:02, Nile wrote:
> > Code
>
> > for x in range(len(file_list)):
> > d = open(file_list[x] , "r")
> > data = d.readlines()
> > k = above_or_below(data) # This
> > function seems to work
2009/7/6 Joshua Kugler :
> Paul Moore wrote:
>> The SQLite documentation mentions a flag, SQLITE_OPEN_READONLY, to
>> open a database read only. I can't find any equivalent documented in
>> the Python standard library documentation for the sqlite3 module (or,
>> for that matter, on the pysqlite lib
Chris Rebert wrote:
On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
I am trying to write a simple little program to do some elementary
stock market analysis. I read lines, send each line to a function and
then the function returns a date which serves as a key to a
dictionary. Each time a date is re
Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>>> What is required in a python program to make sure it catches a control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>> You can use a try/except to catc
On Mon, Jul 6, 2009 at 17:02, Nile wrote:
> Code
>
> for x in range(len(file_list)):
> d = open(file_list[x] , "r")
> data = d.readlines()
> k = above_or_below(data) # This
> function seems to work correctly
> print "here is the value that was returned
On Mon, Jul 6, 2009 at 3:02 PM, Nile wrote:
> I am trying to write a simple little program to do some elementary
> stock market analysis. I read lines, send each line to a function and
> then the function returns a date which serves as a key to a
> dictionary. Each time a date is returned I want t
On Jul 6, 2009, at 6:02 PM, Michael Mossey wrote:
On Jul 6, 2:47 pm, Philip Semanchuk wrote:
On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
What is required in a python program to make sure it catches a
control-
c on the command-line? Do some i/o? The OS here is Linux.
You can use a tr
I am trying to write a simple little program to do some elementary
stock market analysis. I read lines, send each line to a function and
then the function returns a date which serves as a key to a
dictionary. Each time a date is returned I want to increment the value
associated with that date. The
On Jul 6, 2:47 pm, Philip Semanchuk wrote:
> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>
> > What is required in a python program to make sure it catches a
> > control-
> > c on the command-line? Do some i/o? The OS here is Linux.
>
> You can use a try/except to catch a KeyboardInterrupt
On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
What is required in a python program to make sure it catches a
control-
c on the command-line? Do some i/o? The OS here is Linux.
You can use a try/except to catch a KeyboardInterrupt exception, or
you can trap it using the signal module:
On Mon, Jul 6, 2009 at 2:37 PM, Michael Mossey wrote:
> What is required in a python program to make sure it catches a control-
> c on the command-line? Do some i/o? The OS here is Linux.
try:
#code that reads input
except KeyboardInterrupt:
#Ctrl-C was pressed
Cheers,
Chris
--
http://bl
HI,
Im trying to parse a bands myspace page and get the total number of
plays for their songs. e.g. http://www.myspace.com/mybloodyvalentine
The problem is that I cannot use urllib2 as the "Total plays" string
does not appear in the page source.
Any idea of ways around this?
Thanks,
O
--
http:
What is required in a python program to make sure it catches a control-
c on the command-line? Do some i/o? The OS here is Linux.
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
kj schrieb:
In <4a4e2227$0$7801$426a7...@news.free.fr> Bruno Desthuilliers
writes:
kj a �crit :
(snipo
To have a special-case
re.match() method in addition to a general re.search() method is
antithetical to language minimalism,
FWIW, Python has no pretention to minimalism.
Assuming that
brasse wrote:
I have been thinking about how write exception safe constructors in
Python. By exception safe I mean a constructor that does not leak
resources when an exception is raised within it.
...
> As you can see this is less than straight forward. Is there some kind
> of best practice tha
> On Tue, Jul 7, 2009 at 1:28 AM, Antoine Pitrou wrote:
>>
>> mayank gupta gmail.com> writes:
>> >
>> > After a little analysis, I found out that in general it uses about
>> > 1.4 kb of memory for each node!!
>>
>> How did you measure memory use? Python objects are not very compact, but
>> 1.4KB
I worked out a small code which initializes about 1,000,000 nodes with some
attributes, and saw the memory usage on my linux machine (using 'top'
command). Then just later I averaged out the memory usage per node. I know
this is not the most accurate way but just for estimated value.
The kind of N
Paul Moore wrote:
> The SQLite documentation mentions a flag, SQLITE_OPEN_READONLY, to
> open a database read only. I can't find any equivalent documented in
> the Python standard library documentation for the sqlite3 module (or,
> for that matter, on the pysqlite library's website).
>
> Is it pos
In <4a4e2227$0$7801$426a7...@news.free.fr> Bruno Desthuilliers
writes:
>kj a écrit :
>(snipo
>> To have a special-case
>> re.match() method in addition to a general re.search() method is
>> antithetical to language minimalism,
>FWIW, Python has no pretention to minimalism.
Assuming that you me
Hello!
I have been thinking about how write exception safe constructors in
Python. By exception safe I mean a constructor that does not leak
resources when an exception is raised within it. The following is an
example of one possible way to do it:
class Foo(object):
def __init__(self, name, f
Many thanks to all who replied! And, yes, I will *definitely* use raw
strings from now on. :)
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list
pescadero10 wrote:
I am new to python and have been trying to figure out how to remotely
add new pages to my confluence
wiki space. I'm running my python script from a linux rhel4 machine
and using confluence version 2.10. As a test I tried to read from
stdin and write a page but it fails- that
mayank gupta gmail.com> writes:
>
> After a little analysis, I found out that in general it uses about
> 1.4 kb of memory for each node!!
How did you measure memory use? Python objects are not very compact, but 1.4KB
per object seems a bit too much (I would expect more about 150-200 bytes/object
Mark Dickinson wrote:
On Jul 6, 3:32 am, Lawrence D'Oliveiro wrote:
I wonder how many people have been tripped up by the fact that
++n
and
--n
fail silently for numeric-valued n.
Rather few, it seems.
Recent python-ideas discussion on this subject:
http://mail.python.org/piperm
Mark Dickinson a écrit :
On Jul 5, 1:09 pm, Pedram wrote:
Thanks for reply,
Sorry I can't explain too clear! I'm not English ;)
That's shocking. Everyone should be English. :-)
Mark, tu sors !
--
http://mail.python.org/mailman/listinfo/python-list
Python a écrit :
(snip whole OP)
as far as I know try has no 'else'
Then you may want to RTFM.
--
http://mail.python.org/mailman/listinfo/python-list
David House a écrit :
Hi all,
I'm looking for some structure advice. I'm writing something that
currently looks like the following:
try:
except KeyError:
else:
This is working fine. However, I now want to add a call to a function
in the `else' part that may raise an exception, s
On Mon, 06 Jul 2009 20:41:03 +0300, jack catcher (nick) wrote:
>> Does the webcam just deliver frames, or are you getting frames out of
>> a decoder layer? If it's the latter, you want to distribute the encoded
>> video, which should be much lower bandwidth. Exactly how you do that
>> depends a
I have been having issues trying to wrap libusb-1.0 with ctypes. Actually,
there's not much of an issue if I keep everything synchronous, but I need
this to be asynchronous and that is where my problem arises.
Please refer to the following link on Stackoverflow for a full overview of
the issue.
h
On Mon, Jul 6, 2009 at 07:12, Hendrik van Rooyen wrote:
> "Terry Reedy" wrote:
>
>> Gabriel Genellina wrote:
>> >
>> > In this case, a note in the documentation warning about the potential
>> > confusion would be fine.
>>
>> How would that help someone who does not read the doc?
>
> It obviously w
I remember in college taking an intro programming class (C++) where
the professor started us off writing a program to factor polynomials;
he probably also incorporated binary search into an assignment. But
people don't generally use Python to implement binary search or factor
polynomials so maybe y
MRAB wrote:
Dave
Angel wrote:
MRAB wrote:
Dave
Angel wrote:
[snip]
It would probably save some time to not bother storing the zeroes
in the list at all. And it should help if you were to step through
a list of primes, rather than trying every possible int. Or at
least constrain yourself t
Risposta al messaggio di MRAB :
gialloporpora wrote:
Hi all,
I would like to extract string from a PO file. To do this I have created
a little python function to parse po file and extract string:
import re
regex=re.compile("msgid (.*)\\nmsgstr (.*)\\n\\n")
m=r.findall(s)
where s is a po file
Rhodri James kirjoitti:
On Mon, 06 Jul 2009 07:10:38 +0100, jack catcher (nick)
wrote:
Tim Roberts kirjoitti:
"jack catcher (nick)" wrote:
I'm thinking of using Python for capturing and showing live webcam
stream simultaneously between two computers via local area network.
Operating syste
Hello,
I am new to python and have been trying to figure out how to remotely
add new pages to my confluence
wiki space. I'm running my python script from a linux rhel4 machine
and using confluence version 2.10. As a test I tried to read from
stdin and write a page but it fails- that is, the script
Dave Angel wrote:
MRAB wrote:
Dave
Angel wrote:
[snip]
It would probably save some time to not bother storing the zeroes in
the list at all. And it should help if you were to step through a
list of primes, rather than trying every possible int. Or at least
constrain yourself to odd numbers
On Mon, Jul 6, 2009 at 6:12 AM, mayank gupta wrote:
> Thanks for the other possibilites. I would consider option (2) and (3) to
> improve my code.
>
> But out of curiosity, I would still like to know why does an object of a
> Python-class consume "so" much of memory (1.4 kb), and this memory usage
Scott David Daniels wrote:
Piet van
Oostrum wrote:
Dave Angel (DA) wrote:
DA> It would probably save some time to not bother storing the
zeroes in the
DA> list at all. And it should help if you were to step through a
list of
DA> primes, rather than trying every possible int. Or at least
On 6 jul 2009, at 17:46, David House wrote:
Hi all,
I'm looking for some structure advice. I'm writing something that
currently looks like the following:
try:
except KeyError:
else:
This is working fine. However, I now want to add a call to a function
in the `else' part that may
Rhodri James wrote:
On Mon,
06 Jul 2009 10:58:21 +0100, Steven D'Aprano
wrote:
On Mon, 06 Jul 2009 02:19:51 -0300, Gabriel Genellina wrote:
En Mon, 06 Jul 2009 00:28:43 -0300, Steven D'Aprano
escribió:
On Mon, 06 Jul 2009 14:32:46 +1200, Lawrence D'Oliveiro wrote:
I wonder how many peo
MRAB wrote:
Dave
Angel wrote:
[snip]
It would probably save some time to not bother storing the zeroes in
the list at all. And it should help if you were to step through a
list of primes, rather than trying every possible int. Or at least
constrain yourself to odd numbers (after the initial
Piet van Oostrum wrote:
Dave Angel (DA) wrote:
DA> It would probably save some time to not bother storing the zeroes in the
DA> list at all. And it should help if you were to step through a list of
DA> primes, rather than trying every possible int. Or at least constrain
DA> yourself to odd
Risposta al messaggio di Hallvard B Furuseth :
I don't know the syntax of a po file, but this works for the
snippet you posted:
arg_re = r'"[^\\\"]*(?:\\.[^\\\"]*)*"'
arg_re = '%s(?:\s+%s)*' % (arg_re, arg_re)
find_re = re.compile(
r'^msgid\s+(' + arg_re + ')\s*\nmsgstr\s+(' + arg_re + '
1 - 100 of 157 matches
Mail list logo