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 notation -True ==
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, but
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 given
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 with the
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 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
i am asking
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
but
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:
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 further investigation. I don't
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 using.
Here's a sample script:
sql
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 indeed a
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 DEV_LOG(
LOG_ID SERIAL,
LEVEL VARCHAR (10),
POI_NM
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, 0, 0,
On Sat, 13 May 2006 14:09:19 -0400, The Shaffer s wrote
I have an informix database on a unix machine which I want to
access. I downloaded InformixDb-2.2 and managed to get it built and
installed and it works fine with python.
My problem is I want to access the same database from a PC
-zeroes were fetched incorrectly.
Downloads and info at http://informixdb.sourceforge.net.
Best regards,
Carsten Haese
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 2006-02-24 at 09:10, per9000 wrote:
Thanks,
I added an environment variable PYTHONPATH and added the holy folder
with my script in. Works just perfectly.
But still: is there a way around this? (It is a lot easier to add
../../ in my code than make everyone else add this variable).
On Fri, 2006-02-17 at 10:28, Lou G wrote:
I'm trying to show a number of Checkbuttons (each with associated text
based on a list of names) inside a y-scrollable Text widget like so:
[ ] Bob
[ ] Carol
[ ] Ted
[ ] Alice
etc.
etc.
There may be quite a few (as many as 100 or so). I'm
On Wed, 2006-02-15 at 11:40, [EMAIL PROTECTED] wrote:
Ok, so here is my situation:
Let's assume I have a function that makes good use of the kwargs
parameter. It requires that there is a certain format for the kwargs
keywords. (I am using Django, btw). The format is like such:
On Wed, 2006-02-15 at 14:07, Todd Whiteman wrote:
Another hack:
drive = os.popen(echo %SYSTEMDRIVE%).readline().strip()
rtilley wrote:
Is there a proper way to get this variable from Windows? I know it's in
the registry, but I'd rather not go there. I could not find a CSIDL
shell
On Wed, 2006-02-15 at 15:02, [EMAIL PROTECTED] wrote:
Hi all ,
I have a linux application that needs to run on a python interpreter
Why does it need to run on a python interpreter?
.So what is the best way to have the same functionalities provided by
C to be implemented in python .
1)
On Tue, 2006-02-14 at 13:50, Dieter Vanderelst wrote:
Dear all,
Could anybody tell me whether there are ways to use an existing DLL file
in Python without having access to the source code?
That sounds like a job for ctypes:
http://starship.python.net/crew/theller/ctypes/
HTH,
Carsten.
On Mon, 2006-02-13 at 13:18, MooMaster wrote:
Lol, that was a copy paste error into the post on my part...but the
problem has been fixed. Turns out that there was a string.replace call
somewhere else in the code that replaced all single quotes with empty
strings, which thus caused the singe
On Mon, 2006-02-13 at 13:50, Carsten Haese wrote:
By using parametrized queries, you don't have to worry about any of the
supplied values requiring special treatment due to any quotation marks
or apostrophes that might they might contain.
Add grammar corrections to taste.
-Carsten
--
http
On Mon, 2006-02-13 at 14:13, Avi Kak wrote:
Hello:
Suppose I write a function that I want to be called
with ONLY keyword argumnts, how do I raise an
exception should the function get called with
what look like position-specfic arguments?
Any help would be appreciated.
On Mon, 2006-02-13 at 16:03, John Salerno wrote:
Peter Decker wrote:
'L' is a pointer to a list. You are now adding that pointer to the
very list it points to.
I understand that, but I guess I just don't see how this creates
anything other than a list that refers to [1, 2], and then
On Fri, 2006-02-10 at 08:51, py wrote:
I have two lists which I want to use to create a dictionary. List x
would be the keys, and list y is the values.
x = [1,2,3,4,5]
y = ['a','b','c','d','e']
Any suggestions? looking for an efficent simple way to do this...maybe
i am just having a
On Thu, 2006-02-09 at 00:50, Dennis Lee Bieber wrote:
On Wed, 8 Feb 2006 10:49:27 -0800, Scott Frankel [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
mail.ispname.net
Not sure why you feel you need to hide it -- I'm presuming it is the
same ISP in your
On Wed, 2006-02-08 at 12:34, Scott Frankel wrote:
I'm looking for a way to send a simple, plain text email message
using Python. My initial attempts are failing with the following error:
socket.error: (61, 'Connection refused')
Does this imply that I do not have the machine's smtp
On Wed, 2006-02-08 at 13:49, Scott Frankel wrote:
Seems I'm still having issues with syntax.
From what I can tell from my mail client, my outgoing mail server
name is either
mail.ispname.net
This is it.
or
mail.ispname.net:myUsername@myDomain.com
Not this.
The
On Mon, 2006-02-06 at 13:54, [EMAIL PROTECTED] wrote:
I have a module that defines a variable with a constant value and now I
need to make that value dynamic, without affecting module clients. In
other words, I need to call a function witout using parenthesis.
Example:
On Mon, 2006-02-06 at 14:19, [EMAIL PROTECTED] wrote:
I'm not going to waste my time with more
examples coz probably you won't understand them either.
Fine, I won't waste my time trying to help you.
-Carsten.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2006-02-06 at 14:38, [EMAIL PROTECTED] wrote:
Your post didn't provide any help at all, it was a useless sarcastic
post and I'm a very sensible person.
Your original question didn't provide enough detail to offer an answer,
which is why I asked the question what the dynamic return value
On Fri, 2006-02-03 at 13:24, Sean Berry wrote:
I have four tables that all have the same column names (50 in each.)
I have created an admin program to edit, delete and add records to the
tables and would like to use the table name as a variable in each query so
the code can be used for
On Fri, 2006-01-27 at 05:47, Fredrik Lundh wrote:
(just curious, but from where do people get the idea that arbitrary data
just have to be inserted into the the SQL statement text all the time? is
this some PHP misfeature?)
Yes, the need to roll queries by inserting parameters directly into
On Thu, 2006-01-26 at 09:24, Johhny wrote:
Hello,
I am currently trying to write some scripts to get information from the
xmlrpc for redhat network. One of the issues I am having is trying to
strip off the special characters in the hash that is returned. Here is
an example of the
On Thu, 2006-01-26 at 09:49, Johhny wrote:
Hello,
Thankyou for your response,
If I check that the errara_package value is with a print I get the
following.
===SNIP===
Updated libc-client packages that fix a buffer overflow issue are now
available.
This update has been rated as having
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
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 3)
I
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 'import
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 24, in read
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 reason for the
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
UTF-8
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 believe bonono
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
that is Open
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 Position in
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
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 for the
On Tue, 2005-12-06 at 10:44, Steve Holden wrote:
Daniel Schüle wrote:
i=2
lst=[]
while i1000:
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 the condition i1000 can become
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 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
$ /tmp/hello.py
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 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 be a bad idea (If you alter the sequence list so
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 error, and
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
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.
With those in mind, since an odict behaves mostly like a dictionary
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 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).
That
Types
Downloads and more info at http://informixdb.sourceforge.net/
Enjoy,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
) 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
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| Email: [EMAIL
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
. 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
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
#
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 Haese
won't develop InformixDB-1.5 any
further.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
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
, 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]
A==B
True
A is B
False
A in [spam, 42, B]
True
HTH,
Carsten Haese.
--
http://mail.python.org/mailman
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 dynamical module loading.
First let me
describe the scenario
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:
On Mon, 2005-10-03 at 15:52, Jacob Kroon wrote:
Hi, I'm having some problems
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 'Apple',
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/
fruit/
__init__.py
apple.py
it
didn't correspond to the most recent operation.
Best regards,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
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
the
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 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,
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:
are only possible
with the OpenOffice 2 scripting framework.
Hope this helps,
Carsten Haese.
--
http://mail.python.org/mailman/listinfo/python-list
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]
--
http
Block
Of course, I don't know whether this rewrite is applicable to your
larger grammar.
Hope this helps,
--
Carsten Haese - Software Engineer |Phone: (419) 861-3331
Unique Systems, Inc. | FAX: (419) 861-3340
1446 Reynolds Rd, Suite 313
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
link to Kinfxdb is dead, and informixdb doesn't build
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 - Software Engineer |Phone: (419) 861
601 - 682 of 682 matches
Mail list logo