"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Mon, 15 May 2006 19:41:39 -0500, Lance Hoffmeyer
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
> > I would have something similar to perl above:
> >
> >
> > targets = ['OVERALL RATING',
> >
Hi, I'm interested in using python to start writing a CAD program for
electrical design. I just got done reading Steven Rubin's book, I've
used "real" EDA tools, and I have an MSEE, so I know what I *want* at
the end of this; I just have never taken on a programming task of this
magnitude. I've s
[EMAIL PROTECTED] wrote:
> I am using Python 2.4.3
>
class K(object,list):
>...: pass
>...:
>
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: Error when calling the metaclass bases
> Canno
Hi
This is what I'm looking for.
Thank you.
Roman
gene tani schrieb:
> Roman wrote:
> > Does anybody know an easy way (or tool) to guess the language of a
> > given text string?
> >
>
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355807
> http://aspn.activestate.com/ASPN/Cookboo
Would you believe "steps 3 & 4"?
--
http://mail.python.org/mailman/listinfo/python-list
Le Lundi 15 Mai 2006 21:07, Diez B. Roggisch a écrit :
> > d={}.fromkeys(xrange(5*10**6)) ?
>
> That is a totally different beast. You don't want to insert arbitrary
> keys, you want the internal hash-array to be of the right size.
But you can replace the xrange part by any generator function you
Think about how well the above solutions scale as len(targets)
increases.
1. Make "targets" a set, not a list.
2. Have *ONE* regex which includes a bracketed match for a generic
target e.g. ([A-Z\s]+)
3. Do *ONE* regex search, not 1 per target
4. If successful, check if the bracketed gizmoid is in
Tim Peters wrote:
> [EMAIL PROTECTED]
> > Hi, I've written a top-down recursive decent parser for SPICE circuit
> > descriptions. For debugging purposes, I wanted each production
...
> > Any clues?
>
> It should go much faster to use a function that doesn't crawl the
> entire call stack. For e
I don't like string interpolation within REs, it pops me out of 'RE
mode' as I scan the line.
Maybe creating a dict of matchobjects could be used in the larger
context?:
dict( [(t, re.search(t+regexp_tail, file2) for t in targets] )
(untested).
- Pad.
--
http://mail.python.org/mailman/listi
Den Mon, 15 May 2006 11:32:47 -0700. skrev Paul Rubin:
> Thomas Dybdahl Ahle <[EMAIL PROTECTED]> writes:
>> byte[] array2 = bytes1.CryptDeriveKey("DES", "MD5", 0, array1);
>> > Anybody know how to do this in python?
>
> I'm not aware of a standard that says how CryptDeriveKey is supposed
> to work
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Mon, 15 May 2006 20:14:29 GMT, John Salerno
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
> > Lorenzo Thurman wrote:
> > > Thanks, that was my problem. Can you point me to some documentation
In article <[EMAIL PROTECTED]>,
John Salerno <[EMAIL PROTECTED]> wrote:
> http://sourceforge.net/docman/?group_id=22307
Yes, I did, but I did not find them thorough enough.
--
"My Break-Dancing days are over, but there's always the Funky Chicken"
--The Full Monty
--
http://mail.python.org/mai
Section 2.3 of the Python 2.5. tutorial
"The following sections describe the standard types that are built into
the interpreter. Historically, Python's built-in types have differed
from user-defined types because it was not possible to use the built-in
types as the basis for object-oriented inheri
Question for you: what do you think that "class K(object,list):"
means?? What are you trying to achieve? What do you plan to do with K?
If you want it to be a subclass of list, all you have to do is "class
K(list):".
--
http://mail.python.org/mailman/listinfo/python-list
Guido has proposed a syntax for type annotations in Python-3000.
Example:
def foo(x: t1, y: t2) -> t3:
...body...
http://www.artima.com/weblogs/viewpost.jsp?thread=87182
The types are dynamic and there is significant execution of code prior
to the function body being called. Which tends to
[EMAIL PROTECTED] writes:
> >>>class K(object,list):
>...: pass
>...:
>
> Traceback (most recent call last):
> File "", line 1, in ?
> TypeError: Error when calling the metaclass bases
> Cannot create a consistent metho
I am using Python 2.4.3
>>>class K(object,list):
...: pass
...:
Traceback (most recent call last):
File "", line 1, in ?
TypeError: Error when calling the metaclass bases
Cannot create a consistent method resolution
order
John Machin wrote:
> > PyObject *_argv = PyImport_ImportModule("sys.argv");
>
> What does the name of the function tell you? You can't do that in one
> hit. Start with
> PyObject *_sys = PyImport_ImportModule("sys");
> then you need to get the module's argv attribute.
I just figured this out, doh
> PyObject *_argv = PyImport_ImportModule("sys.argv");
What does the name of the function tell you? You can't do that in one
hit. Start with
PyObject *_sys = PyImport_ImportModule("sys");
then you need to get the module's argv attribute.
However a better design might be have your extension module
Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Roy Smith <[EMAIL PROTECTED]> wrote:
>> In article <[EMAIL PROTECTED]>, Chris Foote <[EMAIL PROTECTED]>
>> wrote:
>>> I have the need to store a large (10M) number of keys in a hash table,
>>> based on a tuple of (long_integer, integer). The standa
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>, Chris Foote <[EMAIL PROTECTED]>
> wrote:
>
>> I have the need to store a large (10M) number of keys in a hash table,
>> based on a tuple of (long_integer, integer). The standard python
>> dictionary works well for small numbers of keys, but star
[EMAIL PROTECTED]
> Hi, I've written a top-down recursive decent parser for SPICE circuit
> descriptions. For debugging purposes, I wanted each production
> rule/function to know what its own name was, so at the beginning of
> each rule/function, I make a call to inspect.stack()[0][3] (I think...)
Ken Tilton <[EMAIL PROTECTED]> wrote:
+---
| Having the reference implementation is the only thing that makes this
| conceivably doable in a summer. What you are missing is something I have
| often also gotten wrong: the core, cool functionality always comes easy
| in the proof-of-c
Hi,
How would one go about getting sys.argv fom within the context of a C
API extention module? I want to pass it along to C library that I'm
calling from my module code.
TIA~
I'm trying to load the sys module using:
PyObject *_argv = PyImport_ImportModule("sys.argv");
but it is coming back N
Hi, I've written a top-down recursive decent parser for SPICE circuit
descriptions. For debugging purposes, I wanted each production
rule/function to know what its own name was, so at the beginning of
each rule/function, I make a call to inspect.stack()[0][3] (I think...)
and that fetches the name
Shirley Li wrote:
> Dear Python experts,
>
> I'm a beginner of Python programming.I have a question about Python
> modules.
>
> With the following:
> =
> import sys, os, string, math
> from Numeric import *
> from Matrix import *
> =
> at the beginning of my Py
Dear Python experts, I'm a beginner of Python programming. I have a question about Python modules. With the following: = import sys, os, string, math from Numeric import * from Matrix import * = at the beginning of my Python script, it complained that "ImportErr
Hey all, in perl I was able to use the same regular expression multiple times
changing one part of it
via a previously defined array and put the results into a new array
IN PERL:
my @targets = ('OVERALL RATING',
'CLOTHING', '
ITEMS',
'ACCESSORIES',
Sounds like PyTables could be useful.
http://www.pytables.org
--
lpc
--
http://mail.python.org/mailman/listinfo/python-list
Harry George wrote:
> The reason is simple: People get confused, and accidentally get the
> wrong tab indents when they move among editors or among settings on
> the same editor.
People certainly do get confused. I'm always amazed that so many
people, even amongst those who manage to make a livin
1. Why is two minutes to insert 5M keys "bad" for you? What would be
"good"? What would be good/bad look-up times? Have you measured the
typical look-up time? How often is the dict creation required to be
done? How often does the data change? Is multi-user access required for
(a) look-up (b) updat
"Lee Caine" <[EMAIL PROTECTED]> writes:
> Im new to python and am in need of a little help
Possibly also new to command-line shells?
> Im attempting to write a program that finds and replaces text in all
> files in a given directory.
> example of running the program with arguments
> >python
Roman wrote:
> Does anybody know an easy way (or tool) to guess the language of a
> given text string?
>
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355807
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/326576
--
http://mail.python.org/mailman/listinfo/python-list
A search to see how many words from the text belong to
english/german/spanish common word dictionaries would be an easy way to
get a crude guess at the language.
--
http://mail.python.org/mailman/listinfo/python-list
And others (including Fredrik Lundh) have found the same bug, it seems.
http://mail.python.org/pipermail/python-list/2005-September/297157.html
--
http://mail.python.org/mailman/listinfo/python-list
Does anybody know an easy way (or tool) to guess the language of a
given text string?
e.g.
Feeding in "This is an example." --> should return "english" or ISO
code
Feeding in "Das ist ein Beispiel." --> should return "german" or ISO
code
Feeding in "Esto es un ejemplo." --> should return "spanis
Ühel kenal päeval, E, 2006-05-15 kell 17:21, kirjutas Tom Lane:
> Hannu Krosing <[EMAIL PROTECTED]> writes:
> >> Sven Suursoho wrote:
> >>> As for testing in actual pl/python build environment, we had objections
> >>> from
> >>> leading postgresql Tom Lane that even if we do test it at build time
Paul Rubin a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>
>>def convert_quote(quote):
>> return make_code(quote).split('|', 1)
>
>
> I thought about suggesting that, but it's semantically different than
> the original since it fails to raise an error if no vertical bar is
> pres
George Sakkis a écrit :
(snip)
> def length(iterable):
> try: return len(iterable)
> except:
except TypeError:
> i = 0
> for x in iterable: i += 1
> return i
>
(snip)
--
http://mail.python.org/mailman/listinfo/python-list
On 5/15/06, Edward Elliott <[EMAIL PROTECTED]> wrote:
> If such tools are lacking, use substitutes in the meantime. Don't allow any
> code to be checked in where a line departs more than one tab indentation
> level from its neighbors. It's not perfect, but it eliminates the worst
> offenses. Go
Hannu Krosing <[EMAIL PROTECTED]> writes:
>> Sven Suursoho wrote:
>>> As for testing in actual pl/python build environment, we had objections
>>> from
>>> leading postgresql Tom Lane that even if we do test it at build time,
>>> a determined DBA may substitute a buggy python.so later and still c
Hello,
I am having trouble getting the ThreadingMixIn to do what I want.
Looking over the docs (and some old code I wrote which successfully
does what I want), I arrived at the following:
import time
import SocketServer
import BaseHTTPServer
class TheServer(SocketServer.ThreadingMixIn,
BaseHTTPS
Lance Hoffmeyer a écrit :
> why isn't re.search recognizing "file"? I can print the contents of "file".
>
>
> import win32com.client
> import re
>
> D=MSWord.Documents.Open('C:/test/Test.doc')
> file=D.Content
> print file
>
> match = re.search('(Table ?)', file)
> if match:
>print "Table
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
> def convert_quote(quote):
>return make_code(quote).split('|', 1)
I thought about suggesting that, but it's semantically different than
the original since it fails to raise an error if no vertical bar is
present. I don't know if that's good or
John Salerno <[EMAIL PROTECTED]> writes:
> def convert_quote(quote):
> coded_quote = make_code(quote)
> author = coded_quote.split('|')[1]
> quote = coded_quote.split('|')[0]
> return quote, author
I think it's a little bit ugly (plus inefficient) to split the quote twice.
You
John Salerno a écrit :
> Alrighty, here is what I've come up with. Any suggestions for tweaks or
> speed-boosting efficiency? Just kidding. :)
Too late ! You asked for it, you get it !-)
> Maybe the weakest part is how the code is determined (just shuffling the
> letters in the alphabet). Perha
On 5/15/06, Cameron Laird <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
> .
> .
> .
> >That's exactly my point. Assuming your test coverage is good, such an
> >
Roy Smith:
> I am befuddled as to why
> people thought creating a dict by keyword would be a useful thing to
> do, but left out (and, indeed, eliminated the chance to add the syntax
> later) the obviously useful ability to hint at the size.
Adding the keyword syntax doesn't require much memory to
Sorry for cross-posting, but this IS a cross-platform issue.
Christian Tismer tismer at stackless.com wrote:
> Sven Suursoho wrote:
>
> >>> Is there any way to rewrite following program to handle returned
> >>> generator without hitting this bug?
>
> The only way I can think of getting aroun
John Salerno a écrit :
> John Salerno wrote:
>
>> John Salerno wrote:
>>
>>> Just a quickie for today
>>
>>
>> Another quick one I'll combine in this thread: How can I create two
>> separate conditions in a for loop?
>>
>> Such as this, which doesn't seem to work beyond string.punctuation:
>>
>>
Paul Rubin a écrit :
> John Salerno <[EMAIL PROTECTED]> writes:
>
>>So my first question is this: should I make a Cryptogram class for
>>this, or are functions fine? If the latter, then back to my original
>>point: can I do something like this:
>>
>>def convert_quote(quote):
>> return make_cod
why isn't re.search recognizing "file"? I can print the contents of "file".
import win32com.client
import re
D=MSWord.Documents.Open('C:/test/Test.doc')
file=D.Content
print file
match = re.search('(Table ?)', file)
if match:
print "Table Number is: ", match.group(1)
Traceback (most recen
John Salerno a écrit :
> Just a quickie for today: Is it common (and also preferred, which are
> two different things!) to create a function that has the sole job of
> calling another function?
(pasted):
> def convert_quote(quote):
> return make_code(quote)
>
> Or does it not make sense
Lorenzo Thurman wrote:
> Thanks, that was my problem. Can you point me to some documentation on
> MySQLdb? I've been googling to get answers and that obviously has not
> been working.
I've been looking into this too lately, and finding thorough docs for it
is hard. Have you seen these yet:
htt
Alrighty, here is what I've come up with. Any suggestions for tweaks or
speed-boosting efficiency? Just kidding. :)
Maybe the weakest part is how the code is determined (just shuffling the
letters in the alphabet). Perhaps there's a better way? Although it
seems effective to me
import str
Scott David Daniels wrote:
> John Salerno wrote:
>>> How can I create two separate conditions in a for loop?
>> ... I tried this:
>>
>> punc_space = string.punctuation + string.whitespace
>> for char in punc_space:
>
> That's probably best. If the sources are not so simple, you could use:
>
>
Try these:http://sourceforge.net/docman/?group_id=22307and for the Python DB API overall:http://www.python.org/dev/peps/pep-0249/
LouOn 5/15/06, Lorenzo Thurman <[EMAIL PROTECTED]> wrote:
Thanks, that was my problem. Can you point me to some documentation onMySQLdb? I've been googling to get answer
Thanks, that was my problem. Can you point me to some documentation on
MySQLdb? I've been googling to get answers and that obviously has not
been working.
In article <[EMAIL PROTECTED]>,
"Wade Leftwich" <[EMAIL PROTECTED]> wrote:
> Works fine for me, and I certainly hope MySQLdb is ready fo
John Salerno wrote:
>> How can I create two separate conditions in a for loop?
>...
> I tried this:
>
> punc_space = string.punctuation + string.whitespace
> for char in punc_space:
That's probably best. If the sources are not so simple, you could use:
import itertools
for char in i
Lasse Rasinen wrote:
> [I trimmed some of the newsgroups away; this mostly concerns Python and Lisp]
>
> Ken Tilton <[EMAIL PROTECTED]> writes:
>
>
>>Lasse Rasinen wrote:
>>
>>>Ken Tilton <[EMAIL PROTECTED]> writes:
>>>
>>>
>if any concepts have survived to the Python version. Since Python
QOTW
"Programming is not just creating strings of instructions for a
computer to execute. It's also 'literary' in that you are trying to
communicate a program structure to other humans reading the code." Paul
Rubin
rpd
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> John Salerno wrote:
>> Just a quickie for today
>
> Another quick one I'll combine in this thread: How can I create two
> separate conditions in a for loop?
>
> Such as this, which doesn't seem to work beyond string.punctuation:
>
> for char in string.punctuation or string
Dan Sommers wrote:
> Perhaps I'm "old school," but I don't bother with classes unless I'm
> going to end up with multiple instances (or I'm pushed into a corner by,
> e.g., a GUI framework).
Thanks to all of you! In fact, I sort of came to this same conclusion. I
started with a class, but realiz
Ronny Mandal schrieb:
> Thanks, but the problem was my undentation, after making one indent,
> it worked as expected. :)
I seriously doubt that. I guess you didn't show us the real code. But
there is no way that an instance variable can be accessed on type-level
in a derived class (or from anywh
John Salerno wrote:
> Just a quickie for today
Another quick one I'll combine in this thread: How can I create two
separate conditions in a for loop?
Such as this, which doesn't seem to work beyond string.punctuation:
for char in string.punctuation or string.whitespace:
--
http://mail.python.o
Maric Michaud schrieb:
> Le Lundi 15 Mai 2006 19:24, Roy Smith a écrit :
>> d = {}
>> d.reserve (10*1000*1000)
>
> d={}.fromkeys(xrange(5*10**6)) ?
That is a totally different beast. You don't want to insert arbitrary
keys, you want the internal hash-array to be of the right size.
Diez
--
http
Ronny Mandal wrote:
> file front_ui.py:
>
> class Front(object):
> _images = [] # Holds image refs to prevent GC
> def __init__(self, root):
> # Widget Initialization
> self._listbox_1 = Tkinter.Listbox(root,
> height = 0,
> width = 0,
> ...
>
John Salerno wrote:
> ...Is it common ...[and preferred] to create a function that has the sole job
> of
> calling another function?
>
> Example: ... cryptogram. Right now I have four functions:
>
> convert_quote -- the main function that starts it all
> make_code -- makes and returns the crypt
Thanks, but the problem was my undentation, after making one indent,
it worked as expected. :)
-Ronny M
--
http://mail.python.org/mailman/listinfo/python-list
Ronny Mandal schrieb:
> Hello.
>
> I am stuck; provided is the code and error-msg:
>
> file front_ui.py:
>
> class Front(object):
> _images = [] # Holds image refs to prevent GC
> def __init__(self, root):
>
>
> # Widget Initialization
> self._listbox_1 = Tkinter.Listbo
On Mon, 15 May 2006 18:26:01 GMT,
John Salerno <[EMAIL PROTECTED]> wrote:
> So my first question is this: should I make a Cryptogram class for
> this, or are functions fine? ...
Perhaps I'm "old school," but I don't bother with classes unless I'm
going to end up with multiple instances (or I'm pu
John Salerno <[EMAIL PROTECTED]> writes:
> So my first question is this: should I make a Cryptogram class for
> this, or are functions fine? If the latter, then back to my original
> point: can I do something like this:
>
> def convert_quote(quote):
> return make_code(quote)
It's fine to do
Hello.
I am stuck; provided is the code and error-msg:
file front_ui.py:
class Front(object):
_images = [] # Holds image refs to prevent GC
def __init__(self, root):
# Widget Initialization
self._listbox_1 = Tkinter.Listbox(root,
height = 0,
widt
[I trimmed some of the newsgroups away; this mostly concerns Python and Lisp]
Ken Tilton <[EMAIL PROTECTED]> writes:
> Lasse Rasinen wrote:
> > Ken Tilton <[EMAIL PROTECTED]> writes:
> >
> >>>if any concepts have survived to the Python version. Since Python's object
> >>>model is sufficiently dif
Thomas Dybdahl Ahle <[EMAIL PROTECTED]> writes:
> byte[] array2 = bytes1.CryptDeriveKey("DES", "MD5", 0, array1);
> > Anybody know how to do this in python?
I'm not aware of a standard that says how CryptDeriveKey is supposed
to work. Or rather, there are multiple possible standard ways to do
it.
Just a quickie for today: Is it common (and also preferred, which are
two different things!) to create a function that has the sole job of
calling another function?
Example: for fun and exercise, I'm creating a program that takes a quote
and converts it into a cryptogram. Right now I have four
Ken Tilton wrote:
>
>
> Ben wrote:
>
>>
>> Nothing you have described sounds that complicated, and you never come
>> up with concrete objections to other peoples code (apart that it took
>> 10 years to write in Lisp, so it must be really hard)
>
>
> Oh, now I have to spend an hour dissecting
"Claudio Grondi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Chris Foote wrote:
> > Hi all.
> >
> > I have the need to store a large (10M) number of keys in a hash table,
> > based on a tuple of (long_integer, integer). The standard python
> > dictionary works well for small numb
Terry Reedy wrote:
> "John Salerno" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Thanks, that looks pretty good. Although I have to say, a do/while
>> structure is the much more obvious way. I wonder why it hasn't been
>> added to the language.
>
> Been suggested many times, b
QOTW: "It seems if you lurk here [on comp.lang.python] long enough you
eventually get all you[r] questions answered without even asking!" - Ted Landis
"We're going to learn from Python. JavaScript is pretty close to Python"
- Brendan Eich
Scott David Daniels shows how to find all occurrenc
Brian Quinlan wrote:
> The problem with tabs is that people use tabs for alignment e.g.
>
> def foo():
>->query = """SELECT *
>-> -> -> FROM sometable
>-> -> -> WHERE condition"""
Sure it's a problem. When programmers do bad things, what is your response?
Slap his nose and
Peter,
I filed a bug report.
Thanks,
rick
--
http://mail.python.org/mailman/listinfo/python-list
Peter Decker wrote:
> Funny, I was going to say that the problem is when the author prefers
> a font with a differntly-sized space. Some of us got rid of editing in
> fixed-width fonts when we left Fortran.
Don't know what all of the hub-bub here is regarding tab/space
indentation. My punched car
Le Lundi 15 Mai 2006 19:24, Roy Smith a écrit :
> d = {}
> d.reserve (10*1000*1000)
d={}.fromkeys(xrange(5*10**6)) ?
--
_
Maric Michaud
_
Aristote - www.aristote.info
3 place des tapis
69004 Lyon
Tel: +33 426 880 097
--
http://mail.python.org/mailman/listinfo/python-li
On 5/15/06, Brian Quinlan <[EMAIL PROTECTED]> wrote:
> The problem with tabs is that people use tabs for alignment e.g.
>
> def foo():
>->query = """SELECT *
>-> -> -> FROM sometable
>-> -> -> WHERE condition"""
>
> Now I change my editor to use 8-space tabs and the code is all
"John Salerno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks, that looks pretty good. Although I have to say, a do/while
> structure is the much more obvious way. I wonder why it hasn't been
> added to the language.
Been suggested many times, been considered, and rejected.
Edward Elliott wrote:
> Tab is not 4 spaces. Tab is 1 level of indentation. The confusion that
> tabs equals some fixed width, or can/should be set to some fixed width, is
> the entire problem hampering their use. It implies that conversion between
> tabs and spaces is straightforward when it is
[EMAIL PROTECTED] wrote:
> I'm making a small program which takes a folder with images and
> generates optimized normal-sized images and thumbnails using Python
> Imaging Lbrary (PIL). The problem is here:
>
> os.mkdir(self.output)
>
> img = Image.open(os.path.join(self.dir,file))
> img =
Aahz <[EMAIL PROTECTED]> wrote:
> Don't forget that adding keys requires resizing the dict, which is a
> moderately expensive operation.
My guess would be that each resize grows the table by a constant
factor, which IIRC, works out to amortized O(n). It's not as good as
creating the dict the righ
Ben wrote:
>
> Nothing you have described sounds that complicated, and you never come
> up with concrete objections to other peoples code (apart that it took
> 10 years to write in Lisp, so it must be really hard)
Oh, now I have to spend an hour dissecting any code you people toss-off
that doe
Vancouver Python Workshop
=
Building on the huge success of the 2004 Vancouver Python Workshop, the
Vancouver Python and Zope User Group is pleased to announce the 2006
Vancouver Python Workshop.
The conference will begin with keynote addresses on August 4st. Further
talks
Harry George wrote:
> This has been discussed repeatedly, and the answer is "If you only
> work alone, never use anyone else's code and no one ever uses your
> codes, then do as you please.
The answer is "Do what works best for your project". Smart people can agree
on and use whatever conventio
In article <[EMAIL PROTECTED]>,
"Thierry Lam" <[EMAIL PROTECTED]> wrote:
> Is there an easy way to determine the yesterday's date(year-month-day)
> from the python datetime library if I know today's date?
from datetime import datetime, timedelta
today = datetime.today()
yesterday = today - time
In article <[EMAIL PROTECTED]>,
Roy Smith <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>, Chris Foote <[EMAIL PROTECTED]>
>wrote:
>>
>> I have the need to store a large (10M) number of keys in a hash table,
>> based on a tuple of (long_integer, integer). The standard python
>> dicti
On 5/15/06, Chris Klaiber <[EMAIL PROTECTED]> wrote:
> The problem comes when the author prefers a smaller tab width than what my
> editor is set to. Sure, I could change it for that file, but what if I'm
> reading a whole directory? Sure, I could change the default setting in my
> editor, but wha
Bell, Kevin escribió:
>Does anyone know if/how to go about using python on a windows mobile 5.0
>PDA?
>
>Kevin
>
>
>
>
Hi Bell,
Yes, there's PythonCE (Python 2.4.3 port) for Windows CE / ARM, and
seems to run with mobile 5. Please search in the pythonce mail list and
you'll got the answers a
Nic wrote:
> The only problem is that from:
> 12
> 22
> 21
> In spite of writing
> 12 12 22
> it writes
> 12 21 22
> Do you know how is it possible to delete also this last trouble?
I thought that the two 12 were a typo, but it seems you want to reorder the
nodes inside an edge, too. Here's a fix
Hey all,
I am trying to convert some old perl scripts I have to python.
Here is a snippit of the regex I used in perl. I am trying to
figure out the equivalent code in python. Can someone help?
my $file =$Word->ActiveDocument->Content->Text;
$file =~ /TABLE\s+1.*?JCP.*?MEAN.*?(?:(\d{1,3}\.\
Try something like this...
HTH. A.
from datetime import *
d1 = datetime( year=2006, month=5, day=15)
d2 = datetime.now()
for d in [d1,d2]:
yest = d - timedelta(days =1 )
print "%s -> %s" % (d, yest)
--
http://mail.python.org/mailman/listinfo/python-list
Many thanks.
Both the cases are OK.
The only problem is that from:
12
22
21
In spite of writing
12 12 22
it writes
12 21 22
Do you know how is it possible to delete also this last trouble?
Thanks a bunch,
Nic
"Peter Otten" <[EMAIL PROTECTED]> ha scritto nel messaggio
news:[EMAIL PROTECTED]
> Nic
1 - 100 of 187 matches
Mail list logo