would go
against what I understand is the essence of os.open (i.e., a direct
road to open(2)).
Hmm, if the above sounds a little harsh, sprinkle :)s in. I've had too
little sleep.
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
If you're right 90% of the time, why quibble about
tm
The first reference contains an example of how to do
a singleton: simply search on the word Singleton.
John Roth
Cheers,
Frans
--
http://mail.python.org/mailman/listinfo/python-list
"Frans Englich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Monday 17 January 2005 20:03, John Roth wrote:
"Frans Englich" <[EMAIL PROTECTED]> wrote in message
In other words, you're trying to create a singleton. In general,
singletons are
irst place I'd look. The
postal service has a major interest in having addresses that they
can deliver without a lot of hassle.
Another place is google. The first two pages using "Address
Matching software" gave two UK references, and several
Australian references.
John Roth
--
Andrew McLean
--
http://mail.python.org/mailman/listinfo/python-list
d to the OP:
(1) Your solution doesn't handle the case where the postal code has
been butchered. e.g. "DT8 BEL" or "OT8 3EL".
(2) I endorse John Roth's comments. Validation against an address data
base that is provided by the postal authority, using either an
out-sourced bure
You can't even get anywhere near 100% accuracy when comparing
"authoritative sources" e.g. postal authority and the body charged with
maintaining a database of which streets are in which electoral district
-- no, not AUS, but close :-)
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
Is it possible to exclude certain files in a wx.FileDialog, so that the user
won't see them and can't select them with the mouse in de File open window?
I was thinking of somehow extending the class FileDialog(Dialog)
in the wx module _windows.py to a subclass, but I'm not sure how to d
On Mon, Jan 17, 2005 at 09:54:46PM -0600, Skip Montanaro wrote:
>
> John> And, even if they were, the note is *still* wrong and misleading:
> John> fcntl is available on Windows, and os.open's flags won't be.
>
> Does this read better?
>
>
On Mon, Jan 17, 2005 at 03:20:01PM +, Antoon Pardon wrote:
> Op 2005-01-17, John Lenton schreef <[EMAIL PROTECTED]>:
> >
> > knowledgeable and experienced users know when to ignore the rules.
>
> Then why seems there to be so few acknowledgement that these rule
cing it with the computed value of the property. Line
9 shows that it worked, line 11 shows that it didn't break the class,
and line 13 (through the absence of an exception) shows that it no
longer is 'special' (as it shouldn't be).
--
John Lenton ([EMAIL PROTECTED]) -
John Machin wrote:
> Ermmm ... only remove "the" when you are sure it is a whole word.
Even
> then it's a dodgy idea. In the first 1000 lines of the nearest
address
> file I had to hand, I found these: Catherine, Matthew, Rotherwood,
> Weatherall, and "The Avenue&
th or without house number), building name and flat
or room number that there's a difficulty.
We always had a list of keywords that could be trusted
to be delimiters. In your examples, "the" should be pretty
reliable in indicating a building name. Of course, that might
have some trou
Bob Smith wrote:
> Is shutil.copyfile(src,dst) the *most* portable way to copy files
with
> Python? I'm dealing with plain text files on Windows, Linux and Mac
OSX.
>
> Thanks!
Portable what? Way of copying??
Do you want your files transferred (a) so that they look like native
text files on the
ctionary, and it isn't sql. The use you have in mind is a
bit more complicated than the simple create-me-a-dictionary-in-a-file,
but is pretty straightforward. The documentation mostly refers you to
the C API, but fortunately it (the C API) is clear and well written.
HTH
--
John Lenton ([EMAI
> "Philippe" == Philippe C Martin <[EMAIL PROTECTED]> writes:
Philippe> I suggest you google 'C++ tutorial' Regards,
Stroustup's "The C++ Programming Language" is the best C++ book I've
read. It is at a fairly high level, and I already had read several
C++ books before reading it, so it
Hmm, sounds interesting, I've always resorted to using CSV (or even
HTML!) when exporting to Excel.
As far as how to open it up, have a look at creating a project on
www.sourceforge.net or just zip it up and bung it on your own website
if you have one. I've got the feeling there are also Python-sp
Guy Robinson wrote:
Hello,
I have a list of class instances. I wish to get the appropriate class
attribute in each class instance depending on a SINGLE keyword in the
calling class.
How do I get the calling method to correctly recognise the keyword as a
keyword and not a class attribute? See ex
On Wed, 19 Jan 2005 22:02:51 -0700, Steven Bethard
<[EMAIL PROTECTED]> wrote:
>
>See Mark's post, if you "need to know the index of something" this is
>the perfect case for enumerate (assuming you have at least Python 2.3):
But the OP (despite what he says) _doesn't_ need to know the index of
th
cquired taste, and they
are one I've never acquired regardless of the environment.
I've used both edit under TSO and vi on a timesharing
arrangement with an AIX system, and both of them suck
compared to the screen editors available.
John Roth
--
http://mail.python.org/mailman/listinfo/python-list
> "jean" == jean rossier <[EMAIL PROTECTED]> writes:
jean> Hello All, I am facing a problem while importing pylab
jean> library(in a .py program file) via web browser however the
jean> same program works when I execute it from the command
jean> prompt.
jean> Error message
Mozilla, Firefox, Thunderbird, and so forth use this awful format
called MORK to store all kinds of things: which messages you've read
in a newsgroup, headers and indexes into the mbox file of messages in
a mail folder, and address books. It's documented to some extent
here:
http://www.mozilla.org
Tim Peters wrote:
> [josh]
> > Why can't timedelta arithmetic be done on time objects?
>
> Obviously, because it's not implemented .
>
> > (e.g. datetime.time(5)-datetime.timedelta(microseconds=3)
> >
> > Nonzero "days" of the timedelta could either be ignored, or
> > trigger an exception.
>
> And
Johnny> command using del or something like that that will iterate
Johnny> the list and unbind each of the variables?
Hi Johnny
I assume you are the one and only Johnny Lin at the U of C, no?
John-Hunters-Computer:~> python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3 2003
> "Yun" == Yun Mao <[EMAIL PROTECTED]> writes:
Yun> 2. Is there a way to do Matlab style slicing? e.g. if I have
Yun> i = array([0, 2]) x = array([1.1, 2.2, 3.3, 4.4]) I wish y =
Yun> x(i) would give me [1.1, 3.3] Now I'm using map, but it gets
Yun> a little annoying when there
Johnny Lin wrote:
> Hi!
>
> Is there a way to automate the unbinding of multiple variables? Say
I
> have a list of the names of all variables in the current scope via
> dir(). Is there a command using del or something like that that will
> iterate the list and unbind each of the variables?
Yes.
> "Xah" == Xah Lee <[EMAIL PROTECTED]> writes:
Xah> at places often a whole paragraph on some so called computer
Xah> science jargons should be deleted. They are there more to
Xah> showcase inane technicality than do help the
Xah> reader. (related, many passages with jargons sh
ython identifier that
starts and ends with two [implicitly, or more] underscores".
In the two alternative patterns, the part in the middle says "zero or
more instances of a character that can appear in the middle of a Python
identifier". The first pattern spells this out as "capital letters,
small letters, digits, and underscore". The second pattern uses the \w
shorthand to give the same effect.
You should be able to follow that from the Python documentation.
Now, read this: http://www.amk.ca/python/howto/regex/
HTH,
John
--
http://mail.python.org/mailman/listinfo/python-list
> "Jan" == Jan Rienyer Gadil <[EMAIL PROTECTED]> writes:
Jan> could anyone please help me! what and how is the best
Jan> implementation of creating a table based on data coming from
Jan> the serial port ? and also how would i be able to create
Jan> graphs (2D) based on these d
On Thu, 20 Jan 2005 23:48:34 -0800, Tim Roberts <[EMAIL PROTECTED]> wrote:
> John Reese <[EMAIL PROTECTED]> wrote:
>>
>>Mozilla, Firefox, Thunderbird, and so forth use this awful format
>>called MORK to store all kinds of things: which messages you've read
Jay donnell wrote:
> I have a short multi-threaded script that checks web images to make
> sure they are still there. I get a segmentation fault everytime I run
> it and I can't figure out why. Writing threaded scripts is new to me
so
> I may be doing something wrong that should be obvious :(
>
on't know what caused the segfault. That
means you don't know how to avoid it in the future. You are still
living in the shadow of the volcano. Will the chicken trick work next
time?
Looking forward to the next episode,
John
--
http://mail.python.org/mailman/listinfo/python-list
Bob Smith wrote:
> Are these the same:
>
> 1. f_size = os.path.getsize(file_name)
>
> 2. fp1 = file(file_name, 'r')
> data = fp1.readlines()
> last_byte = fp1.tell()
>
> I always get the same value when doing 1. or 2. Is there a reason I
> should do both? When reading to the end of a file,
Tim Roberts wrote:
> Bob Smith <[EMAIL PROTECTED]> wrote:
>
> >Are these the same:
> >
> >1. f_size = os.path.getsize(file_name)
> >
> >2. fp1 = file(file_name, 'r')
> >data = fp1.readlines()
> >last_byte = fp1.tell()
> >
> >I always get the same value when doing 1. or 2. Is there a reason
Tim Roberts wrote:
> Bob Smith <[EMAIL PROTECTED]> wrote:
>
> >Are these the same:
> >
> >1. f_size = os.path.getsize(file_name)
> >
> >2. fp1 = file(file_name, 'r')
> >data = fp1.readlines()
> >last_byte = fp1.tell()
> >
> >I always get the same value when doing 1. or 2. Is there a reason
in a public forum,
and *you* should know better than to go around flapping your mouth
like that.
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
Comer se ha de hacer en silencio, como los frailes en sus conventos.
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
the
expense of a little more complexity, one can reduce this to one row and
3 variables (north, northwest, and west) corresponding to d[i-1][j],
d[i-1][j-1], and d[i][j-1] -- but I'd suggest the simple way first.
Hope some of this helps,
John
--
http://mail.python.org/mailman/listinfo/python-list
Peter Hansen wrote:
> snacktime wrote:
> > Is there a module that sets the parity of a string? I have an
> > application that needs to communicate with a host using even parity
> > So what I need is before sending the message, convert it from space
to
> > even parity. And when I get the respons
erally, are you
testing the returned value from each and every C API call? Are you
testing for the correct error value (some return NULL, some -1, ...)?
Are you doing the right thing on error?
A catalogue of the different ways of messing things up using C would
take forever to write. If you ca
simple as: if
input_line[:2] == "\r\f":
BTW, have you checked that there are no other control characters
embedded in the file, e.g. ESC (introducing an escape sequence), SI/SO
(change character set), BEL * 100 (Hey, Fred, the printout's finished),
HT, VT, BS (yeah, probably lots of that, but I mean BackSpace)?
HTH,
John
--
http://mail.python.org/mailman/listinfo/python-list
matplotlib is a 2D graphics package that produces plots from python
scripts, the python shell, or embeds them in your favorite python GUI
-- wx, gtk, tk, fltk currently supported with qt in the works. Unlike
many python plotting alternatives is written in python, so it is
easy to extend. matplotli
Paul Kooistra wrote:
> I need a tool to browse text files with a size of 10-20 Mb. These
> files have a fixed record length of 800 bytes (CR/LF), and containt
> records used to create printed pages by an external company.
>
> Each line (record) contains an 2-character identifier, like 'A0' or
> 'C
Paul Kooistra wrote:
> I need a tool to browse text files with a size of 10-20 Mb. These
> files have a fixed record length of 800 bytes (CR/LF), and containt
> records used to create printed pages by an external company.
>
> Each line (record) contains an 2-character identifier, like 'A0' or
> 'C
On Wed, 26 Jan 2005 01:15:10 +0530, Swaroop C H <[EMAIL PROTECTED]>
wrote:
>On Tue, 25 Jan 2005 12:38:13 -0700, Brent W. Hughes
><[EMAIL PROTECTED]> wrote:
>> I'd like to get a character from stdin, perform some action, get another
>> character, etc. If I just use stdin.read(1), it waits until I
(and chuck an exception if it won't fit). Slightly better than an
approach that uses
something like nbytes = sprintf(buffer, "%04d%-20s%-5s", a0_num,
a0_phone, a0_zip);
HTH,
John
--
http://mail.python.org/mailman/listinfo/python-list
y will get fixed/added.
For what it's worth, I have a medusa-based FTP server running on Linux
(daemon) and Win32 (service), without any problems at all.
John
--
http://mail.python.org/mailman/listinfo/python-list
If you're after a simple FTP server, have a look at medusa.
Regards
John
[EMAIL PROTECTED] wrote:
What's the simplest way to write an FTP Server in Python?
A short research on the newsgroup and on the Cookbook did not
bring out anything relevant (but I hear a little voice in the
back
In matplotlib using the tkagg backend, the tk mainloop is started at
the end of a python script by issuing a call to a "show" function,
which realizes all the created figure windows and the calls
Tkinter.mainloop(). This can cause problems if the mainloop was
started by another module (eg idle).
Jeff Shannon wrote:
> John Machin wrote:
>
> > Jeff Shannon wrote:
> >
> >> [...] If each record is CRLF terminated, then
> >>you can get one record at a time simply by iterating over the file
> >>("for line in open('myfile.dat'
Terry Reedy wrote:
>
> No offense taken. My personal strategy is to read only as much of
trollish
> threads as I find interesting or somehow instructive, almost never
respond,
> and then ignore the rest. I also mostly ignore discussions about
such
> threads.
>
Indeed. Let's just nominate XL to
ual problem, which is probably not OO
programming, but colleagues who are making a design more complex than
need be.
Indeed, the third chant in the mantra of python is "Simple is better
than complex."
John-Hunters-Computer:~> python
Python 2.3 (#1, Sep 13 2003, 00:49:11)
[GCC 3.3
> "beliavsky" == beliavsky <[EMAIL PROTECTED]> writes:
beliavsky> I think the OO way is slightly more obscure. It's
beliavsky> obvious what x = reverse(x) does, but it is not clear
beliavsky> unless you have the source code whether x.reverse()
You don't need to read the src, you
inhahe wrote:
> Hi i'm a newbie at this and probably always will be, so don't be
surprised
> if I don't know what i'm talking about.
>
> but I don't understand why regex look-behinds (and look-aheads) have
to be
> fixed-width patterns.
>
> i'm getting the impression that it's supposed to make sear
> "drife" == drife <[EMAIL PROTECTED]> writes:
drife> Hello, Could someone please provide instructions for
drife> install Numeric with ATLAS and LAPACK?
Locate libcblas.a and add that dir to the setup.py library_dirs_list.
Eg on my system, /usr/local/lib/ATLAS/lib/Linux_P4SSE2_2/libc
Does anyone have any example scripts using the OpenOffince
python-bridge module pyuno to load xls, extract the data, and/or save
to another format such as xsc or csv.
Thanks,
JDH
--
http://mail.python.org/mailman/listinfo/python-list
>>>>> "drife" == drife <[EMAIL PROTECTED]> writes:
drife> Thanks John. Those are the steps I followed, and to no
drife> avail.
Make sure you get a clean build by rm -rf ing the build dir before you
build again. Then capture the output of your
good reason to stay with 2.2, then get the _latest_
version of that (2.2.3). Otherwise, install 2.4.
Regards,
John
--
http://mail.python.org/mailman/listinfo/python-list
> "drife" == drife <[EMAIL PROTECTED]> writes:
drife> Hi David, I performed the above check, and sure enough,
drife> Numeric is --not-- linked to the ATLAS libraries.
drife> I followed each of your steps outlined above, and Numeric
drife> still is not linking to the ATLAS lib
Franco Fiorese wrote:
> Is there any way, that you know, to get better performance under
Linux?
Build Python yourself, using relevant CFLAGS and TARGET for your
processor?
I've always noticed that Windows Python takes a lot longer to startup
than Linux, but never really looked at runtime perform
I have a question about what it takes to trigger GPL restrictions in
python code which conditionally uses a GPL library.
Here is the context of my question. matplotlib, which I develop, is a
plotting module which is distributed under a PSF compatible license,
and hence we avoid using GPLd code s
> "dimitri" == dimitri pater <[EMAIL PROTECTED]> writes:
dimitri> Hello, I am looking for a Python tool to create graphs
dimitri> and charts on a webpage. Chartdirector is too expensive
dimitri> for me. A simple script for creating a barchart should be
dimitri> sufficient as a
> "Frans" == Frans Englich <[EMAIL PROTECTED]> writes:
Frans> Hello,
Frans> Since Python doesn't have static typing, how is the same
Frans> result as traditional function overloads results in
Frans> acheived? With function overloads the "selection of code
Frans> path depen
gt;
> Can someone help me please?
as later on you say you have a constructor to convert longs into your
bigints, you should add a __coerce__ method to your class.
General description of __coerce__:
http://docs.python.org/ref/numeric-types.html#l2h-303
details on coercion rules:
htt
On Mon, Jan 31, 2005 at 04:52:24PM +0100, Olivier Noblanc ATOUSOFT wrote:
> Hello,
>
> In the botom of this post you will see my source code.
>
> The problem is when i launch main.py that doesn't make anything why
> ?
I'm guessing you don't have an __init__.py
Dave Opstad wrote:
> One of the functions in a C extension I'm writing needs to return a
> tuple of integers, where the length of the tuple is only known at
> runtime. I'm currently doing a loop calling PyInt_FromLong to make
the
> integers,
What is the purpose of this first loop?
In what variabl
n find on Google is a blog entry (by Ted
Leung) on Aug 30 saying he wished someone would give the
author some money to finish it and publish it.
John Roth
--
http://mail.python.org/mailman/listinfo/python-list
Dave Opstad wrote:
> In article <[EMAIL PROTECTED]>,
> "John Machin" <[EMAIL PROTECTED]> wrote:
>
> > What is the purpose of this first loop?
>
> Error handling. If I can't successfully create all the PyInts then I
can
> dispose the on
Leeuw van der, Tim TOP-POSTED:
> Hi all,
>
> I can use this version of gtk and PyGtk to run simple programs. There
seems to be no problem with the code-completion in PythonWin.
> I can do: dir(gtk) without problems after importing the gtk module of
PyGtk, when I use idle or console. (Python versio
Fredrik Lundh wrote:
>
> >PyList_SetItem(List,i,Str);
>
> you should check the return value, though. PyList_SetItem may (in
> theory) fail.
>
:-)
Only a bot could say that. We mere mortals have been known to do things
like (a) pass a non-list as the first argument (b) pass an out-of-range
va
e plugins that do this for JUnit; they don't
require any changes to Java in order to function. They
just require JUnit, which is pretty ubuquitous.
Second, is that the IDEs aren't part of Python proper.
Outside of that, it's might be quite a good idea to
do something similar with unittest, doctest or py.test.
John Roth
Peace,
--Carl
--
http://mail.python.org/mailman/listinfo/python-list
Leeuw van der, Tim wrote:
>
>> > Do you have a file called drwtsn32.log anywhere on your computer?
>
> No, unfortunately I cannot find such file anywhere on my computer
>
> What do I do to get such file? Or anything equally useful?
>
On my Windows 2000 box, just crash something :-)
Perhaps t
I am trying to generate a mesh for a finite volume solver (gambit,
fluent) from 3D image data (CT, MRI). To generate the fluent msh
file, you need not only a list of vertices and polygons, much like
what is available in the vtk file format, but also the volume elements
in the mesh that the polygo
Leeuw van der, Tim wrote:
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
on behalf of John Machin
> > Sent: Thu 2/3/2005 12:00 PM
> > To: python-list@python.org
> > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,
Leeuw van der, Tim wrote:
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
on behalf of John Machin
> > Sent: Thu 2/3/2005 12:00 PM
> > To: python-list@python.org
> > Subject: Re: Crashing Python interpreter! (windows XP, python2.3.4,
McBooCzech wrote:
> Hallo all,
>
> I am trying to generate SQL SELECT command which will return pivot
> table. The number of column in the pivot table depends on the data
> stored in the database. It means I do not know in advance how many
> columns the pivot table will have.
>
> For example I will
> "Paul" == Paul Rubin <"http://phr.cx"@NOSPAM.invalid> writes:
Paul> Various possible candidates for such dragging have
Paul> apparently decided that their chances weren't too good.
Or simply that it wasn't worth the cost to go to court, even if they
presumed they would eventually wi
On Fri, 04 Feb 2005 12:01:35 +0100, HÃ¥kan Persson <[EMAIL PROTECTED]>
wrote:
>Hi.
>
>I am trying to "convert" a string into a function pointer.
>Suppose I have the following:
>
>from a import a
>from b import b
>from c import c
>
>funcString = GetFunctionAsString()
>
>and funcString is a string th
wsgroup
or on the regular extremeprogramming
list.
John Roth
PyFIT maintainer.
Extremeprogramming mailing list moderator (1 of 7)
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello all,
I've created a web/email group for topics related to both Extreme
Programming (or othe
> "Fernando" == Fernando Perez <[EMAIL PROTECTED]> writes:
Fernando> I hope you posted this on the VTK list with a CC to
Fernando> Prabhu as well... The hopes of a positive reply there
Fernando> are, I suspect, a fair bit higher. The scipy list would
Fernando> be a good idea,
ith Defensive Programming hint #2:
Get into this habit early:
!if tries == 1:
!blah_blah()
!elif tries == 2:
!yadda_yadda()
!else:
!raise Exception, "Can't happen :-) tries has unexpected value
(%r)" % tries
> print "heads: " + heads
Ugh; did you get that out of the book?
Try:
!print "heads:", heads
> print "tails: " + tails
>
> raw_input("Press enter to quit")
HTH,
John
--
http://mail.python.org/mailman/listinfo/python-list
I'm writing my 2nd large wxPython program, and after the problems I
found doing the first's layout in code, I'd like to look at using a
'WYSIWYG' IDE, like VisualStudio does for MFC.
I've tried a few that I found, wxGlade is probably the best, although
it seems to be not 100% WYSIWYG (like the wid
"charge".
You forgot to add in the base price -- "actual price" according to you
comprises only the taxes and fees. Where is your car yard? We'd each
like to order a nice shiny red Ferrari :-)
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list
> "Evrim" == Evrim Ozcelik <[EMAIL PROTECTED]> writes:
Evrim> We are developing a medical software about PSG
Evrim> (PolySomnoGraphy) analysis. The application takes signal
Evrim> data from an electronic device and we will show this
Evrim> continious signal function on the inte
bute__(attr)
class D(object):
__metaclass__ = C
instances of D have a type that behaves as if it didn't have a
__mro__. This isn't exactly what you asked for, but it might be
enough.
--
John Lenton ([EMAIL PROTECTED]) -- Random fortune:
El tiempo cura los dolores y las querellas porq
ied system-central
DLL-equivalent; my guess is that doing so would have prevented easy
testing of the "stop working" code on a shared machine where they
couldn't change the system date without upsetting other users, and it's
probable they were using a Trojan today()-equivalent gadget to supply
"old" dates for testing.
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list
quot;
Funny that, the class repr()s are different; not in a meaningful way,
but the mere difference indicates the classes are products of different
manufacturers.
(4) Ooooh! How old is the Linux copy of that 3rd party library?
(5) Looks like the bug is in RemGui.py -- it is calling super() with an
invalid argument. No apparent Python portability problems.
>
> I'm confused.
Confession is good for the soul. However true confession is even better
for the soul. Please come up with a better description. :-)
===
I hope these self-help hints are useful with your next "confusion".
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> "Sergey Dorofeev" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>I can use string.unpack if string in struct uses fixed amount of bytes.
>
>
> I presume you mean struct.unpack(format, string). The string len must be
> known when you call, but need not b
Terry Hancock wrote:
> On Saturday 18 June 2005 02:05 am, John Machin wrote:
>
>>Doug Schwarz wrote:
>>
>>>In article <[EMAIL PROTECTED]>,
>>> Leif K-Brooks <[EMAIL PROTECTED]> wrote:
>>>
>>>>How do I make a regular expressi
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> John Roth wrote:
>
>> you need _both_ isinstance and the types module to do a correct
>> check for any string type: isinstance(fubar, types.StringTypes).
>> That's becaus
See Pep 315, which is still open, and targeted at 2.5.
It survived the recent spate of PEP closings and rejections.
http://www.python.org/peps/pep-0315.html
John Roth
"Remi Villatel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
>
> There is
efined for
a class that acts like a dictionary: that is, the items are
not integers, let alone integers that extend in a strict
sequence from 0.
John Roth
>
> George
>
--
http://mail.python.org/mailman/listinfo/python-list
Don't use print, write directly to sys.stdout.
Print is not intended for precise output formatting;
it's intended for quick outputs that are useable
most of the time.
John Roth
"Paul Watson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> #!/usr/b
mg wrote:
> Hello,
>
> I am writting bindings for a FEM application. In one of my function
> 'initModulename', called when the module is imported, I would like to
> get the argc and argv arguments used in the main function of Python.
This is an "interesting" way of writing bindings. Most peopl
Duncan Booth wrote:
> John Machin wrote:
>
>
>>>So, my question is: does the Python API containe fonctions like
>>>'get_argc()' and 'get_argv()' ?
>>>
>>
>>If you can't see them in the documentation, they aren't the
Gadfly
PySQLite ( requires SQLite library )
J
Philippe C. Martin wrote:
>Hi,
>
>I am looking for a stand-alone (not client/server) database solution for
>Python.
>
>1) speed is not an issue
>2) I wish to store less than 5000 records
>3) each record should not be larger than 16K
>
>
>As I start w
Just thought of a couple more:
SnakeSQL
KirbyBase
J
John Abel wrote:
>Gadfly
>PySQLite ( requires SQLite library )
>
>J
>
>Philippe C. Martin wrote:
>
>
>
>>Hi,
>>
>>I am looking for a stand-alone (not client/server) database solution for
>&g
Philippe C. Martin wrote:
>Thank you all for your answers.
>
>A pure Python would have beenmy first choice. yet I now feel I should spend
>some time looking at PySQLite (I like the fact it's pre-compiled for
>Windows).
>
>Thanks.
>
>Philippe
>
>
>
>Philippe C. Martin wrote:
>
>
>
>>Hi,
>>
>>I am
> likely reflects the standard habits of Linux/Unix command naming.
I'd heard it was pathologically eclectic rubbish lister, but then you
can't believe everything you hear :-)
John Ochiltree
--
667 - The Neighbour of the Beast
--
http://mail.python.org/mailman/listinfo/python-list
torch the bad guys, you don't have to write "a
little cleanup method".
To leave a tombstone for the bad guys:
>>> u'abc\u0160def'.encode('macroman', 'replace')
'abc?def'
>>>
To leave no memorial, only a cognitive gap:
>>> u'The Good Soldier \u0160vejk'.encode('macroman', 'ignore')
'The Good Soldier vejk'
Do you *really* need to encode it as MacRoman? Can't the Mac app
understand utf8?
You mentioned cp850 in an earlier post. What would you be feeding
cp850-encoded data that doesn't understand cp1252, and isn't in a museum?
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list
Rune Strand wrote:
> But iif it are many lists in the file and they're organised like this:
>
> ['a','b','c','d','e']
> ['a','b','c','d','e']
> ['A','B','C','D','E'] ['X','F','R','E','Q']
>
> I think this'll do it
>
> data = open('the_file', 'r').read().split(']')
>
> lists = []
> for el in dat
Jeff Epler wrote:
> If you want to work with unicode, then write
> us = u"\N{COPYRIGHT SIGN} some text"
You can avoid almost all the wear and tear on your shift keys:
>>> u"\N{copyright sign}"
u'\xa9'
... you are stuck with \N for rea
1201 - 1300 of 9371 matches
Mail list logo