On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote:
> Hi, I'm having some problems with implementing dynamical module loading.
> First let me
> describe the scenario with an example:
>
> modules/
> fruit/
> __init__.py
> apple.py
> banana.py
>
> apple.py defines a class '
On Mon, 2005-10-03 at 16:41, Carsten Haese wrote:
> On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote:
> > Hi, I'm having some problems with implementing dynamical module loading.
> > First let me
> > describe the scenario with an example:
> >
> > modules/
On Mon, 2005-10-03 at 17:37, Steve Holden wrote:
> Carsten Haese wrote:
> > On Mon, 2005-10-03 at 16:41, Carsten Haese wrote:
> >
> >>On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote:
> >>
> >>>Hi, I'm having some problems with implementing dynamica
On Tue, 2005-10-04 at 08:32, Steve Holden wrote:
> Carsten Haese wrote:
> > On Mon, 2005-10-03 at 17:37, Steve Holden wrote:
> >
> >>Carsten Haese wrote:
> >>
> >>>On Mon, 2005-10-03 at 16:41, Carsten Haese wrote:
> >>>
&
. The "in" operator doesn't
use object identity, it uses object equality, and __cmp__ does serve to
test object equality (if no __eq__ method is present).
Perhaps the following example will clarify the behavior of "in":
>>> A = [1]
>>> B = [1]
>>>
On Tue, 2005-10-11 at 15:14, Java and Swing wrote:
> Anyhow, I need PyBuildValue to work.
Try Py_BuildValue.
HTH,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
won't develop InformixDB-1.5 any
further.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2005-10-27 at 14:00, Gregory Piñero wrote:
> Not quite because if something(3) fails, I still want something(4) to
> run.
def something_ignore_exceptions(x):
try: something(x)
except: pass
something_ignore_exceptions(1)
something_ignore_exceptions(2)
# etc...
HTH,
Carsten
On Mon, 2005-10-31 at 14:12, [EMAIL PROTECTED] wrote:
> I'm trying to write a website updating script, but when I run the
> script, my function to search the DOM tree returns None instead of what
> it should.
>
> I have this program:
>
> import sys
> from xml.dom.minidom import parse
>
>
e from a call to PQconnectdb. The user could pass in any integer and
(probably successfully) attempt to crash the system. You should really
wrap the C struct (or the pointer to the C struct) into a Python object
instead.
By the way, it looks like you're trying to write some sort of database
access module. The 'pq' looks suspiciously like it's for PostgreSQL. If
that's the case, can't you just use an existing module for connecting to
PostgreSQL?
HTH,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
d think about sanitising user input a bit.
The OP is using execute() with a parameter tuple. This is the correct method
for executing a parametrized query, and it is immune to SQL injection as long
as the DB module implements parameter substitution in a sane way.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
d, all copies are identical and therefore indistinguishable.
+1 QOTW!
--
Carsten Haese - Software Engineer | Phone: (419) 794-2531
Unique Systems, Inc. | FAX: (419) 893-2840
1687 Woodlands Drive | Cell: (419) 343-7045
Maumee, OH 43537
quot; instead of "f.close()".
D) Something else. Please elaborate by giving us a code example, a description
of what you expected to happen, and a description of what happened instead.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2005-11-17 at 08:41, py wrote:
> Claudio Grondi wrote:
> > so this should work in your case:
> >
> > import sys
> > sys.path.append("C:\some\other\directory")
> > import bar
>
> ...that will certainly work. Only issue is that each time I start up
> foo.py in the python shell I have to ret
On Fri, 2005-11-18 at 11:04, [EMAIL PROTECTED] wrote:
> Hello,
>
> I need to convert the string "" to a long. To convert this
> string I tried the following:
> >>> 0x
> -1
> >>> 0xL
> 4294967295L
>
> OK, this is what I want, so I tried
>
> s = long("0xL")
> ValueE
Types
Downloads and more info at http://informixdb.sourceforge.net/
Enjoy,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2005-11-22 at 13:37, Christoph Zwerschke wrote:
> Would the default semantics below really be that suprising?
>
> "An ordered dictionary remembers the order in which keys are first seen
> [...] Overwriting an entry replaces
> its value, but does not affect its position in the key order.
On Tue, 2005-11-22 at 14:37, Christoph Zwerschke wrote:
> In Foord/Larosa's odict, the keys are exposed as a public member which
> also seems to be a bad idea ("If you alter the sequence list so that it
> no longer reflects the contents of the dictionary, you have broken your
> OrderedDict").
T
On Tue, 2005-11-22 at 20:44, Tom Anderson wrote:
> On Tue, 22 Nov 2005, Carsten Haese wrote:
>
> > On Tue, 2005-11-22 at 14:37, Christoph Zwerschke wrote:
> >
> >> In Foord/Larosa's odict, the keys are exposed as a public member which
> >> also seems to
On Wed, 2005-11-23 at 08:01, Tin Gherdanarra wrote:
> Hallo,
>
> I'm trying to install pypgsql. However, I get syntax errors
> while compiling the C sources. The following excerpt
> from pgconnection.h looks a little funny to me:
>
> typedef struct {
> PyObject_HEAD /* Here is the syntax err
On Wed, 2005-11-23 at 15:17, Christoph Zwerschke wrote:
> Bengt Richter wrote:
> > I think the concept has converged to a replace-or-append-by-key ordering
> > of key:value items with methods approximately like a dict. We're now
> > into usability aspects such as syntactic sugar vs essential pri
On Wed, 23 Nov 2005 23:39:22 +0100, Christoph Zwerschke wrote
> Carsten Haese schrieb:
>
> > Thus quoth the Zen of Python:
> > "Explicit is better than implicit."
> > "In the face of ambiguity, refuse the temptation to guess."
> >
> >
On 23 Nov 2005 16:23:11 -0800, vagrantbrad wrote
> I'm using python 2.4 running on Fedora Core 4. I have written a python
> program called ipscan.py that checks the external ip address of my
> cable internet connection, and on change, will update the dns records
> at my dns provider, zoneedit. So
On Wed, 2005-11-30 at 14:53, Paul Boddie wrote:
> [...] the Java virtual machine
> is suitably designed/specified to permit just-in-time complication.
+1 Freudian slip of the week :)
-Carsten Haese
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2005-12-02 at 09:12, Adriano Ferreira wrote:
> On 12/2/05, Klaus Alexander Seistrup <[EMAIL PROTECTED]> wrote:
> > #v+
> >
> > $ ls -l /tmp/hello.py
> > -rwxr-xr-x 1 klaus klaus 38 2005-12-02 14:59 /tmp/hello.py
> > $ cat /tmp/hello.py
> > #! python
> > print 'Hello, world!'
> > # eof
> >
On Mon, 05 Dec 2005 18:00:21 -0700, David Bear wrote
> Fredrik Lundh wrote:
> > DON'T MANUALLY CONSTRUCT THE SQL INSERT STATEMENT. Use string
> > formatting to insert the field names, but let the database layer deal with
> > the values.
> >
> > If you want to do things in two steps, do the fields
On Tue, 2005-12-06 at 10:44, Steve Holden wrote:
> Daniel Schüle wrote:
> >>>i=2
> >>>lst=[]
> >>>while i<1000:
> >>>i**=2
> >>>lst.append(i)
> >>>
> >>
> >
> > unless I am missing something obvious, I can not see why the loop should
> > not terminate
>
> In that case, kindly explain how
script the office from within using a macro or from the outside via
"remote control". PyUNO allows both, but Python macros are only possible
with the OpenOffice 2 scripting framework.
Hope this helps,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2005-08-25 at 10:43, Nx wrote:
> Thanks for the many replies
>
> here is an example for what it will be used for , in this case
> fixed at 31 fieldvalues:
>
>
> inputvalues=(s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,
> s26,s2
On Thu, 2005-08-25 at 11:04, I hastily wrote:
> On Thu, 2005-08-25 at 10:43, Nx wrote:
> > Thanks for the many replies
> >
> > here is an example for what it will be used for , in this case
> > fixed at 31 fieldvalues:
> >
> >
> > inputvalues=(s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14
On Fri, 2005-09-02 at 16:46, Laguna wrote:
> Paul,
>
> Thanks for the suggestion on calendar module. Here is my solution and
> it works:
>
> def expiration(year, month):
> weekday = calendar.weekday(year, month, 1)
> table = [19, 18, 17, 16, 15, 21, 20]
> return table[weekday]
>
On Sat, 17 Sep 2005 15:50:29 -0400, Ed Hotchkiss wrote
> Ok. I am trying to read a csv file with three strings separated by commas.
> I am trying to insert them into a MySQL DB online.
> MySQLdb is installed, no problems.
>
> I think that I am having some kind of error with my csv going into
> th
es it
didn't correspond to the most recent operation.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
sts trying to locate Stephen.
If anybody has any pointers for locating Stephen Turner, please let me
know. If Stephen can't be located, I'd be willing to take over the
project, but I'd prefer the torch be given to me rather than me just
taking it.
Thanks,
--
Carsten Haese - Softwar
On Tue, 2005-03-29 at 03:05, Michael Husmann wrote:
> Carsten Haese wrote:
>
> > Hello everybody:
> >
> > I have discovered that the functionality for connecting Python to an
> > Informix database is currently in a frustrating state of neglect. The
> > lin
k
"""
def p_Block(p):
"""
Block : SEMI
| T Block
| S Block
"""
Of course, I don't know whether this rewrite is applicable to your
larger grammar.
Hope this helps,
--
Carsten Haese - Software Engineer |Phone: (4
estions or comments, please let me know.
Best regards,
--
Carsten Haese - Software Engineer |Phone: (419) 861-3331
Unique Systems, Inc. | FAX: (419) 861-3340
1446 Reynolds Rd, Suite 313 |
Maumee, OH 43537| mailto:[EMAIL PROTECTED]
On Mon, 2005-12-12 at 16:26, Pierre Quentel wrote:
> Hi all,
>
> In some program I was testing if a variable was a boolean, with this
> test : if v in [True,False]
>
> My script didn't work in some cases and I eventually found that for v =
> 0 the test returned True
>
> So I changed my test fo
On Wed, 2005-12-14 at 12:00, [EMAIL PROTECTED] wrote:
> essentially I already use PyArg_ParseTupleAndKeywords, but that seems
> to emulate fixed arg list definitions like -
>func (x,y,t=0,u=1)
It's unclear what you are actually trying to accomplish. My guess is
that you want to implement a fu
On Wed, 2005-12-21 at 09:03, P. Schmidt-Volkmar wrote:
> Hi there,
>
> I have a string in which I want to calculate how often the character ';'
> occurs. If the character does not occur 42 times, the ";" should be added so
> the 42 are reached.
>
> My solution is slow and wrong:
> for Posi
On Thu, 2005-12-22 at 07:01, Peter Hansen wrote:
> [EMAIL PROTECTED] wrote:
> > So exactly how high is python in Google's priority list ? Or in other
> > words, if python is in a stand still as it is now, what would be the
> > impact to Google ?
>
> Since when is Python in a standstill?
I believ
On Thu, 2005-12-22 at 08:18, [EMAIL PROTECTED] wrote:
> Cameron Laird wrote:
> > In article <[EMAIL PROTECTED]>,
> > <[EMAIL PROTECTED]> wrote:
> > .
> > .
> > .
> > >Well, this may be the CPython way of open source but I don't know if
>
> 2005/12/23, David Xiao <[EMAIL PROTECTED]>:
> Hi Kuan:
>
> Thanks a lot! One more question here: How to write if I want
> to
> specify locale other than current locale?
>
> For example, running on Korea locale system, and try read a
>
On Thu, 2005-12-29 at 11:43, [EMAIL PROTECTED] wrote:
> The following code:
>
> numbers = [1, 2, 3]
> for value in numbers:
> value *= 2
> print numbers
>
> results in the following output:
> [1, 2, 3]
>
> The intent of the code was to produce this output:
> [2, 4, 6]
>
> What is the reas
On Fri, 2005-12-30 at 09:52, tim wrote:
> Trying to convert midi to text using MidiToText.py.
> I get the following:
>
> midi_port: 0
> Traceback (most recent call last):
> File "MidiToText.py", line 176, in ?
> midiIn.read()
> File "C:\Python24\Lib\site-packages\midi\MidiInFile.py", line
On Tue, 2006-01-10 at 09:42, Efrat Regev wrote:
>Hello,
>
>On FC4, I've generated an .so file from C++ which I want to use from
> python. It works when I copy it into /usr/lib/python2.4/site-packages.
> (I.e., say I have hello.so in that directory, then from the python
> prompt I can 'im
On Tue, 2006-01-17 at 11:22, Paul Rubin wrote:
> Schüle Daniel <[EMAIL PROTECTED]> writes:
> > does anybody know modules which make rational numbers available?
>
> Try gmpy.mpq (google for gmpy).
>
> > and are there considerations to add them to the core, like
> > complex numbers (maybe in Python
On Thu, 2006-01-19 at 00:44, pycraze wrote:
> Hi guys,
>
> I Need to know how do i create a dictionary... eg:
> n = pali_hash
> n={}
> n={1:{ } } -> i need to know how to make a key of a dictionary, to a
> dictionary using Python/C API's
You can either use Py_BuildValue (See
http://docs.py
On Mon, 2006-07-31 at 15:21, Michael Yanowitz wrote:
> Is it possible to have a static variable in Python -
> a local variable in a function that retains its value.
>
> For example, suppose I have:
>
> def set_bit (bit_index, bit_value):
>static bits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
On Tue, 2006-08-01 at 09:02, [EMAIL PROTECTED] wrote:
> I'm using the InformixDB package, which has been a real lifesaver, but
> I'm finding I can't get any data from the Informix LCHARVAR types.
> They're coming in as empty strings.
>
> The cursor._description for the field in question is:
> ('ms
On Tue, 2006-08-01 at 09:27, [EMAIL PROTECTED] wrote:
> Carsten Haese wrote:
> > What version are you using? I thought I fixed lvarchars a long time ago.
>
> 2.2, with Python 2.4 on Windows... I installed via
> InformixDB-2.2.win32-py2.4.exe
Hm, this certainly warrants furthe
On Tue, 2006-08-01 at 11:41, [EMAIL PROTECTED] wrote:
> Carsten Haese wrote:
> > Could you possibly send me a minimal test script that shows the problem?
> > Also, in case it matters, I'd like to know which versions of IDS and
> > CSDK or Informix Connect you're
On Tue, 2006-08-01 at 11:47, [EMAIL PROTECTED] wrote:
> Another thing...
>
> > Output is:
> > description is <('msg_tx', 'lvarchar', 0, 0, None, None, 1)>
>
> The 0's worried me, as I could see where they could be used as parms to
> allocate/trim things as necessary... just a thought.
That is i
On Tue, 2006-08-01 at 14:05, [EMAIL PROTECTED] wrote:
> Carsten Haese wrote:
> > Once again, I'll need
> > the create table statement for the table you're selecting from in order
> > to investigate what's happening.
>
> Here it is:
>
> CREATE TABLE
On Thu, 2006-08-03 at 13:51, Michael Yanowitz wrote:
> Hello:
>
> Just wondering if this is a bug, is this as designed,
> or do I have to import math or something to make it correct:
>
>I was just screwing around.
> and found:
> >>> -1/100
> -1
> Shouldn't it be zero?
> 1/100 returns 0
>
On Tue, 2006-08-22 at 12:34, jojoba wrote:
> Hello again,
>
> Fredrick said:
>
> > Python's object model. an object has a value, a type, and an identity,
> > but no name.
>
> I say:
>
> Thank you Fredrick for the reply!
> However, although python's object model does not currently support what
On Thu, 2006-10-05 at 16:15, John Salerno wrote:
> But I think SQL has other recommended methods. At least with SQLite, it
> is recommended you not use Python's %s formatter but instead the "?"
> formatter.
While I wholeheartedly agree with the sentiment, calling the "?" a
formatter only blurs t
On 14 Oct 2006 20:33:13 -0700, Chris wrote
> >>> from math import *
> >>> sin(0)
> 0.0
> >>> sin(pi)
> 1.2246063538223773e-016
> >>> sin(2*pi)
> -2.4492127076447545e-016
> >>> cos(0)
> 1.0
> >>> cos(pi)
> -1.0
> >>> cos(2*pi)
> 1.0
>
> The cosine function works fine, but I'm getting weird answers
On Mon, 2006-10-16 at 10:51, Steven D'Aprano wrote:
> On Mon, 16 Oct 2006 07:26:05 -0700, abcd wrote:
>
> > class Foo:
> > def __init__(self, name, data=[]):
>
> The binding of the name "data" to the empty list happens at compile time,
> not runtime.
I think this statement needs to be clarif
On Tue, 2006-10-17 at 08:43, kevin evans wrote:
> Hi,
> I'm trying to convert some code from Ruby to Python, specifically..
>
> timestamp = "%08x" % Time.now.to_i
>
> Make a hex version of the current timestamp. Any ideas how best to do
> this in python gratefully received..
import time
timestam
On Tue, 2006-10-17 at 08:49, hg wrote:
> import time
> "%08X"% (int)(time.mktime(time.localtime()))
Have you not had your coffee yet or are you trying to win an obfuscated
python programming competition? ;)
-Carsten
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2006-10-17 at 09:30, abcd wrote:
> x = None
> result = (x is None and "" or str(x))
>
> print result, type(result)
>
> ---
> OUTPUT
> ---
> None
The "condition and result1 or result2" trick only works if result1 is an
expression with a True boolean value. The emp
On Tue, 2006-10-17 at 09:48, Tim Chase wrote:
> [...]
> Either of the following should suffice:
>
> # return a non-empty string
> x is None and "None" or str(x)
This one can be "optimized" to just str(x) since str(None)=="None".
>[...]
> There are more baroque ways of writing the ter
On Fri, 2006-10-20 at 10:57, John Salerno wrote:
> [EMAIL PROTECTED] wrote:
>
> > you should rethink it as
> >
> > [id] [university] [yearStart] [yearEnd] [degreeEarned]
> > 1 U of I 19711975 BS
> > 1 U of I 19751976 MS
> > 1 U of I 1976
On Fri, 2006-10-20 at 10:53, Fredrik Lundh wrote:
> if you want to become a good Python programmer, you really need to get
> over that "I need a oneliner" idea.
+1 QOTW
-Carsten
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2006-10-20 at 15:14, John Salerno wrote:
> I'm a little confused, but I'm sure this is something trivial. I'm
> confused about why this works:
>
> >>> t = (('hello', 'goodbye'),
> ('more', 'less'),
> ('something', 'nothing'),
> ('good', 'bad'))
> >>> t
> (('hello', 'go
On Fri, 2006-10-20 at 15:37, Carsten Haese wrote:
> for x in t:
> y,z = t
> # do something with y and z
Typo here, of course I mean y,z = x.
-Carsten
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2006-10-24 at 11:31, Gabriel Genellina wrote:
> At Tuesday 24/10/2006 04:35, Cameron Walsh wrote:
>
> > > c = set(B)
> > > a.sort(key=c.__contains__, reverse=True)
> > >
> > > Tim Delaney
> >
> >Depressingly simple. I like it.
>
> ...and fast!
...and not guaranteed to be correct:
http:
On Tue, 2006-10-24 at 11:41, Carsten Haese wrote:
> On Tue, 2006-10-24 at 11:31, Gabriel Genellina wrote:
> > At Tuesday 24/10/2006 04:35, Cameron Walsh wrote:
> >
> > > > c = set(B)
> > > > a.sort(key=c.__contains__, reverse=True)
> > > >
>
On Thu, 2006-11-02 at 12:28 -0800, JohnJSal wrote:
> Can someone explain to me why the first version of this method works,
> but the second one doesn't? All I've changed (I think) is how the
> information is nested. The error I'm getting is that the call to
> xrc.XRCCTRL is not working in the secon
On Thu, 2006-11-02 at 13:14 -0800, JohnJSal wrote:
> JohnJSal wrote:
> > JohnJSal wrote:
> > > Peter Otten wrote:
> > >
> > >
> > > > ...the above is not a 1-tuple, but an ordinary string. You forgot the
> > > > trailing comma:
> > > >
> > > > ('notes',)
> > >
> > > Right you are! Now it works! :)
On Wed, 2006-11-08 at 12:37 -0800, John Henry wrote:
> I must be very thick. I keep reading about what decorators are and I
> still don't have a good feel about it. See, for example:
>
> http://alex.dojotoolkit.org/?p=564
>
> and:
>
> http://soiland.no/software/decorator
>
> What exactly do I
On Sat, 2006-11-11 at 23:14 -0800, Doug wrote:
> Fredrik Lundh wrote:
> > Doug wrote:
> >>
> >> Fredrik Lundh wrote:
> >>> Fredrik Lundh wrote:
> >>> > cannot all you clueless trolls who cannot think of a single useful thing
> >>> > to contribute to Python start your own newsgroup?
> >>
> >>> and b
On Sat, 2006-11-11 at 23:18 -0800, Doug wrote:
> Michael Hobbs wrote:
> > I think the colon could be omitted from every type of compound
> > statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything?
> >
> > Thanks,
> > - Mike
>
> It is a very good idea as the colon is technically re
On Mon, 2006-11-13 at 18:34 +0100, Stefan Behnel wrote:
> Honestly, how many important Python modules do still run on 2.2?
InformixDB still compiles on 2.2 except when I accidentally temporarily
break backwards compatibility.
Of course it's a matter of opinion whether it qualifies as an important
On Mon, 2006-11-13 at 10:14 -0800, Dan Lenski wrote:
> lennart wrote:
> > So i ask myself is python the language I'm looking for?
>
> Yep! Python is very much a jack-of-all-trades language.
I'll run the risk of being nitpicky, but the full phrase is "Jack of all
trades, master of none," which do
On Tue, 2006-11-14 at 09:33 -0600, Kevin Kelley wrote:
> import time
> FORMAT='%Y%m%d'
>
> time.strftime(FORMAT,time.gmtime(time.time()+8380800))
> output = '20070219'
While the above works, the following variation using datetime is more
readable:
>>> import datetime
>>> someday = datetime.date.
On Wed, 2006-11-15 at 09:13 -0800, Mateuszk87 wrote:
> Hi.
>
> may someone explain "yield" function, please. how does it actually work
> and when do you use it?
[There is probably a much better explanation of this somewhere on the
net already, but I feel like writing this out myself.]
"yield" is
On Thu, 2006-11-16 at 07:32 -0800, Danny Colligan wrote:
> Carsten mentioned that generators are more memory-efficient to use when
> dealing with large numbers of objects. Is this the main advantage of
> using generators? Also, in what other novel ways are generators used
> that are clearly superi
On Thu, 2006-11-16 at 08:09 -0800, Danny Colligan wrote:
> > The more trivial the example, the harder it is to see the advantage.
>
> I absoultely agree. Thanks for pointing me out to some real-world
> code. However, the function you pointed me to is not a generator
> (there is no yield statemen
On Thu, 2006-11-16 at 08:03 -0800, [EMAIL PROTECTED] wrote:
> @atexit.register
> def goodbye():
> print "Goodbye, terminating..."
>
>
> However, there is one fundamental problem with this: atexit.register()
> returns None. Since the above code corresponds to::
>
>
> def goodbye():
>
On Thu, 2006-08-31 at 17:38, ddtl wrote:
> Hello everybody.
>
> My script uses re.compile() function, and while it rans without errors
> under Linux, when I ran that script under Windows I get the following
> error:
>
> Traceback (most recent call last):
> File "C:\a\projects\re.py", line 4, in
On Fri, 2006-09-15 at 14:41, Steve Holden wrote:
> [EMAIL PROTECTED] wrote:
> [...]
> > Skill:
> >
> >
> > *Java, 2 year UNIX - HP / Solaris, 2 yrs OOA+D, Corba, Perl, XML, UML.
> > *Java dev experience, Swing, JPS, 2 years of OOA+D.
>
> Clearly not spam, since the guy is so in touch wit
On Wed, 2006-09-20 at 16:37, Eric Smith wrote:
> I'm trying to use Python 2.4.3 and pywin32-209 to access a MySQL
> database on Windows Server 2003 Standard Edition, and not having much
> luck. It seems like parts of the MySQLdb module are not getting loaded
> correctly, but no error message is giv
On Thu, 2006-09-21 at 01:12, Dennis Lee Bieber wrote:
> On Wed, 20 Sep 2006 13:21:54 -0400, Steve Holden <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > .execute() is a cursor method, not a connection method. Some DB API
> > modules do implement it as a connection method,
On Fri, 2006-09-22 at 11:25, Saizan wrote:
> Bjoern Schliessmann wrote:
> > Saizan wrote:
> >
> > > Why subclassing bool from int either __invert__ or __neg__ haven't
> > > been overrided to produce a boolean negation?
> >
> > I wonder what -True or -False should evaluate to.
> Well in boolean nota
On 23 Sep 2006 12:24:58 -0700, mistral wrote
> No, something is wrong there. what I need is just compile one python
> file which will generate html page, with parameters:
> "exec" "python" "-O" "$0" "$@"
This is not a python script. It appears to be a Unix shell script that calls a
python script.
On Tue, 2006-09-26 at 07:08, Lawrence D'Oliveiro wrote:
> So yes, there should be two separate functions, one for escaping
> non-wildcard specials, and one for escaping wildcards.
>
> > You only need the first one, since every database interface that
> > follows PEP 249.
>
> You still need the se
.
* EXECUTE PROCEDURE erroneously attempted to open a results cursor for
procedures that don't return results.
* Date columns were read incorrectly on 64 bit platforms due to mixup
of int4 versus long.
Downloads and info at http://informixdb.sourceforge.net
Best regards,
Carsten
On Tue, 2006-10-03 at 18:19, Samuel wrote:
> Thanks, that's what I was looking for.
>
> > >>> m = __import__( "StringIO" )
> > >>> x = getattr( m, "StringIO" )()
> > >>> x
> >
> > >>>
>
> For the records: If the module is already loaded, this also works:
>
> if my_type_is_not_yet_loaded:
>
On Fri, 2006-11-17 at 16:51 -0500, Michael B. Trausch wrote:
> [...]
> Let's say that I want to work with the latitude 33.6907570. In
> Python, that number can not be stored exactly without the aid of
> decimal.Decimal().
>
> >>> 33.6907570
> 33.6907568
You say that like it's Python's fa
On Fri, 2006-11-17 at 16:51 -0500, Michael B. Trausch wrote:
> On Fri, 2006-11-17 at 21:25 +0100, Fredrik Lundh wrote:
> > > Some of the lat/long pairs that I have used seem to come out fine, but
> > > some do not. Because the mathmatics used with them involve complex
> > > equations when deter
On Mon, 2006-11-27 at 19:14 +, OKB (not okblacke) wrote:
> Duncan Booth wrote:
>
> >> And is there a mechanism in Python that will allow me to override
> >> the operators of a class, for all its occurrences, even the ones
> >> implemented on C built-in objects?
> >
> > No.
>
> For wha
o retrieve opaque types in their binary representation
Downloads and info at http://informixdb.sourceforge.net
Best regards,
Carsten Haese
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2006-12-04 at 01:04 -0800, Russ wrote:
> Robert Kern wrote:
>
> > Nothing is going to happen until you do one of these two things. Being more
> > rude
> > (and yes, you are being incredibly rude and insulting) won't move things
> > along.
>
> I re-read the thread, and I don't see anywhe
On Mon, 2006-12-04 at 08:49 -0800, [EMAIL PROTECTED] wrote:
> Carsten Haese wrote:
> > On Mon, 2006-12-04 at 01:04 -0800, Russ wrote:
> > > Robert Kern wrote:
> > >
> > > > Nothing is going to happen until you do one of these two things. Being
> >
On Mon, 2006-12-04 at 14:03 -0800, king kikapu wrote:
> I recap: if i put only functions declarations on a .py file, like
> these:
> def A(): print "a"
> def B(): print "b"
> def C(): print "c"
>
> and run the program, nothing happens, nothing executed.
Nothing *visible* happens. The "def" statem
On Mon, 2006-12-04 at 23:44 +0100, Fredrik Lundh wrote:
> Carsten Haese wrote:
>
> > * The function body gets compiled into byte code (but not executed).
>
> careful: when you get as far as executing the "def" statement, the
> function body has already been c
On Wed, 2006-12-06 at 17:33 +0100, Schüle Daniel wrote:
> def permute3gen(lst):
> lenlst = len(lst)
> def permute(perm, level):
> if level == 1:
> yield perm
> return # not sure return without a value is allowed,
> theoretically it could be replaces w
On Thu, 2006-12-14 at 06:45 -0800, [EMAIL PROTECTED] wrote:
> Can someone please explain why these expressions both produce the same
> result? Surely this means that non-greedy regex does not work?
>
> print re.sub( 'a.*b', '', 'ababc' )
>
> gives: 'c'
>
> Understandable. But
>
> print re.sub(
1 - 100 of 685 matches
Mail list logo