Paste 1.2
-
I'm happy to release Paste 1.2. This release contains a mix of small
features and bug fixes. This is only a release of core Paste (not Paste
Script or Deploy), which contains the WSGI tools.
What Is Paste?
--
URL: http://pythonpaste.org
Install:
LinuxWorld has published my article about the Relative Static approach
to web application design (BoSStats, FlightFeather and the Relative
Static Web).
http://www.linuxworld.com/news/2007/012907-flightfeather.html
This method tries to capture as much system state as possible in
static HTML
Pyrex 0.9.5.1a is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
This is a glitch-fix nanorelease to correct a problem
with the setup.py file. The list of packages to install
is now calculate dynamically, so that it will work with
or without the testing files.
What is
Steven D'Aprano wrote:
Ste_ph_en???
I knew someone once who referred to the two ways
of spelling Ste{v,ph}en as the dry way and
the wet way...
It's not like I spell my name with four M's and a silent Q like the famous
author Farles Wickens *wink*
Or Mr. Luxury-Yacht, which as we all know
In [EMAIL PROTECTED], Paul McGuire
wrote:
On Jan 31, 11:36 pm, Paddy [EMAIL PROTECTED] wrote:
On Feb 1, 2:42 am, [EMAIL PROTECTED] wrote:
How to divide a number by 7 efficiently without using - or / operator.
We can use the bit operators. I was thinking about bit shift operator
but I
Steven D'Aprano wrote:
Ste_ph_en???
I know the ph-form of the name is marginally more popular, but dammit my
name is right there just two lines above where Paddy started typing, how
hard is it to get it right?
It's not like I spell my name with four M's and a silent Q like the famous
Jean-Paul Calderone wrote:
[---]
Software is hard.
But I absolutely agree with this point, anyway :) Software is _crazy_
hard. I merely dispute the claim that threads are somehow _easier_. :)
Threads aren't easier. Nor are they harder. They are just different.
I used to be heavily into
Hi, I want to pipe output of process A to B, and read output of B from
python. On Unix if I do the following:
child_out, child_in = popen2(program_a | program_b)
line = child_out.readline()
I get IOError: bad file descriptor from Python, and broken pipe
error from program_b. How do I do this
Hello dear community !
I'm a bit ashamed to ask such an easy question, but I didn't find my
answer on previous posts.
I'd like to copy files with FTP protocol in a subdirectory.
So far, my code look like that :
import ftplib
session = ftplib.FTP('222.33.44.55','usr','pwd')
session.cwd('/')
This is maybe not so efficient :) but it implements integer division
by 7 for positive integers without - and /.
def div2(num):
return num 1
def div4(num):
return num 2
def div8(num):
return num 3
def mul2(num):
return num 1
def mul4(num):
return num 2
def mul7(num):
[EMAIL PROTECTED] wrote:
Hello dear community !
I'm a bit ashamed to ask such an easy question, but I didn't find my
answer on previous posts.
I'd like to copy files with FTP protocol in a subdirectory.
So far, my code look like that :
import ftplib
session =
En Thu, 01 Feb 2007 06:17:34 -0300, [EMAIL PROTECTED]
[EMAIL PROTECTED] escribió:
I'd like to copy files with FTP protocol in a subdirectory.
So far, my code look like that :
import ftplib
session = ftplib.FTP('222.33.44.55','usr','pwd')
session.cwd('/')
files = session.nlst()
On Feb 1, 12:51 am, Jia Lu [EMAIL PROTECTED] wrote:
def make_module_from_file(module_name, file_name):
Make a new module object from the code in specified file
from types import ModuleType
module = ModuleType(module_name)
module_file =
Hi guys, I have couple of simple python based active server pages
that make use of httplib2 which uses gzip.py. IIS, however, also has a
gzip.dll located at the iis/inetsrv path.
When using ASP the iis/inetsrv path is placed as the first item in
sys.path. Consequently importing httplib2 will
Ok, i see..
Thanks a lot all of you for the help. I know from my Win/.Net/Sql
Server expertise that odbc put a layer in the mix. That's why, for
example, in .Net we have a native SqlClient data provider that talks
to Sql Server directly.
But one of the reasons that i started learning Python, is
Thanks a lot Diez and Gabriel.
It works perfectly !
Have a nice day
Yvan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile of my code I see, that it spends quiet some
time in functions like _swig_setattr_nondinamic, _swig_setattr,
_swig_getattr.
--
Hi all, I've this code:
regex = re.compile(r(?si)(\x8B\xF0\x85\xF6)(?Pcontents.*)
(\xC6\x44\x24),re.IGNORECASE)
file = open(fileName, rb)
for line in file:
if (match):
print line
file.close()
It search a text inside that hex value.
It works perfecly on a
On 1 Feb 2007 02:21:35 -0800, Bart Ogryczak [EMAIL PROTECTED] wrote:
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile of my code I see, that it spends quiet some
time in
Daniel Nogradi
I don't need the histogram really, only the mean color
value, but as far as I can see the 'mean' attribute only applies to an
image and a mask can not be specified.
You can slice parts of the image, and then use the
ImageStat.Stat(im).mean
On it.
Bye,
bearophile
--
On Thursday 01 February 2007 10:21 am, Bart Ogryczak wrote:
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile of my code I see, that it spends quiet some
time in functions
Play the UK lotto + Euromillions for free. see www.carlnalex.pwp.blueonder.co.uk
--
http://mail.python.org/mailman/listinfo/python-list
Hi all. I have problem with ZSI and WSDL schema.I generate from WSDL
by wsdl2py client method for webservice. I made soap call and
something goes wrong. Doeas anyone know hot to create some server code
by ZSI from WSDL?? I just suspectes that my return data from
webservice is in incorrect envelope
On Feb 1, 10:12 am, [EMAIL PROTECTED] wrote:
Hi, I want to pipe output of process A to B, and read output of B from
python. On Unix if I do the following:
child_out, child_in = popen2(program_a | program_b)
line = child_out.readline()
I get IOError: bad file descriptor from Python, and
On Jan 31, 8:49 pm, Gabriel Genellina [EMAIL PROTECTED] wrote:
Maybe process_record expects some minimum buffer size? The cpp example
uses char record[100], but you are allocating only a few bytes with the
string My Record
No, I've already tried padding record out to the full size. But thank
On Feb 1, 12:12 pm, Phil Thompson [EMAIL PROTECTED]
wrote:
On Thursday 01 February 2007 10:21 am, Bart Ogryczak wrote:
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile
On 1 Feb 2007 03:14:14 -0800, Grzegorz Smith [EMAIL PROTECTED] wrote:
Hi all. I have problem with ZSI and WSDL schema.I generate from WSDL
by wsdl2py client method for webservice. I made soap call and
something goes wrong.
It might help if you were a little more specific.
--
Cheers,
Simon B
Yeah, found that one googling around. But I haven´t fund anything more
up to date. I imagine, that the performance of all of these wrappers
has been improved since then. But the performance of Python/C API
would too?
Anyways, it´s not about exact number, it´s more about taking decision
if
On 1/31/07, Analog Kid [EMAIL PROTECTED] wrote:
Hi all:
Im looking for a python module thatll let me do simple reads/writes from and
to an iPod shuffle similar to iTunes ... I read about the gPod module ...
but Im not sure whether it will work in Windows ...
This any good?
On 1 Feb 2007 02:13:01 -0800, king kikapu [EMAIL PROTECTED] wrote:
But one of the reasons that i started learning Python, is to NOT to be
tied-up again with ANY company or specific product again (i had enough
MS addiction over these years...). So, based on this direction, i am
using pyodbc,
I'm sure this is a simple question to the Tkinter experts - I have a
very basic Tkinter application that consists of 1 master window and
buttons within that window. My problem is that, I need to be able to
scroll (up and down) when I get to the point that the buttons go off
the screen. What's
On 31 Jan 2007 22:02:36 -0800, Michele Simionato [EMAIL PROTECTED] wrote:
On Jan 31, 8:31 pm, Carl J. Van Arsdall [EMAIL PROTECTED]
wrote:
Well, since it will be io based, why not use threads? They are easy to
use and it would do the job just fine. Then leverage some other
technology on top
TOXiC wrote:
Hi all, I've this code:
No you don't.
regex = re.compile(r(?si)(\x8B\xF0\x85\xF6)(?Pcontents.*)
(\xC6\x44\x24),re.IGNORECASE)
file = open(fileName, rb)
for line in file:
if (match):
print line
file.close()
It search a text inside
[EMAIL PROTECTED] wrote:
Hi, I want to pipe output of process A to B, and read output of B from
python. On Unix if I do the following:
child_out, child_in = popen2(program_a | program_b)
line = child_out.readline()
I get IOError: bad file descriptor from Python, and broken pipe
error
Ok here goes a detail:
I call two methods by soap. The response of that methods is described
by xml.
Here is first request: (method name QuickSearch, one parameter called
name)
xsd:element name=QuickSearch
xsd:complexType
xsd:sequence
xsd:element name=name minOccurs=0
On Feb 1, 3:13 am, [EMAIL PROTECTED] wrote:
Its not an homework. I appeared for EA sports interview last month. I
was asked this question and I got it wrong. I have already fidlled
around with the answer but I don't know the correct reasoning behind
it.
In that case, observer that a/b == a *
I sorry, but I'm not very familiar with Python.
Please, help to solve my problem with reading file from nested zip
archive.
There is an ear_file.ear and inside this file there is a war_file.war
and inside this file there is a jar_file.jar.
I have to read content of a file (my_file.txt) from inside
On Feb 1, 1:43 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 31 Jan 2007 22:02:36 -0800, Michele Simionato [EMAIL PROTECTED] wrote:
Another thing I miss is a facility to run an iterator in the Tkinter
mainloop: since Tkinter is not thread-safe,
writing a multiple-download progress bar in
[EMAIL PROTECTED] wrote:
I sorry, but I'm not very familiar with Python.
Please, help to solve my problem with reading file from nested zip
archive.
There is an ear_file.ear and inside this file there is a war_file.war
and inside this file there is a jar_file.jar.
I have to read content of
I am having a problem with the corruption of a list. It occurs only
the first time that I call a function and never happens on subsequent
calls. Any suggestions would be appreciated.
I call the function, passing in a list as the input data. The function
must manipulate and operate on a copy of
Doug Stell:
The standard module copy has deepcopy, it's slow but it may be a
simple solution to your problem. A better solution is to look where
data is changed and fix that.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Doug Stell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I call the function, passing in a list as the input data. The function
must manipulate and operate on a copy of that list's data, without
altering the list in the calling routine.
Then you will want to make a copy:
listB =
Dear community,
I dont really know if this is the right way to do, otherwise my
excuses for that.
I'm a Dutch student, and graduating this year on my graphic design
study. For my graduating study, I want to do some Python work and i'm
lokking for a partner wich can help/ cooperate me in
Peter Otten ha scritto:
TOXiC wrote:
Hi all, I've this code:
No you don't.
!
regex = re.compile(r(?si)(\x8B\xF0\x85\xF6)(?Pcontents.*)
(\xC6\x44\x24),re.IGNORECASE)
file = open(fileName, rb)
for line in file:
if (match):
print line
On Feb 1, 4:21 am, TOXiC [EMAIL PROTECTED] wrote:
Hi all, I've this code:
regex = re.compile(r(?si)(\x8B\xF0\x85\xF6)(?Pcontents.*)
(\xC6\x44\x24),re.IGNORECASE)
file = open(fileName, rb)
for line in file:
if (match):
print line
file.close()
It
Pyrex 0.9.5.1a is now available:
http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
This is a glitch-fix nanorelease to correct a problem
with the setup.py file. The list of packages to install
is now calculate dynamically, so that it will work with
or without the testing files.
What is
Carl J. Van Arsdall wrote:
Steve Holden wrote:
[snip]
Are you using memory with built-in error detection and correction?
You mean in the hardware? I'm not really sure, I'd assume so but is
there any way I can check on this? If the hardware isn't doing that, is
there anything I can
NoName wrote:
Perl:
@char=(A..Z,a..z,0..9);
do{print join(,@char[map{rand @char}(1..8)])}while();
If you generate passwords like that to normal computer
users, you'll end up with a lot of my password doesn't
work tickets. You should skip the symbols that are
easy to mistake for each other.
On Jan 31, 3:37 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 31 Jan 2007 12:24:21 -0800, Carl Banks [EMAIL PROTECTED] wrote:
Michele Simionato wrote:
On Jan 31, 5:23 pm, Frank Potter [EMAIL PROTECTED] wrote:
I want to find a multithreaded downloading lib in python,
can someone
On 1 Feb 2007 06:14:40 -0800, Carl Banks [EMAIL PROTECTED] wrote:
On Jan 31, 3:37 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 31 Jan 2007 12:24:21 -0800, Carl Banks [EMAIL PROTECTED] wrote:
Michele Simionato wrote:
On Jan 31, 5:23 pm, Frank Potter [EMAIL PROTECTED] wrote:
I want to
Doug Stell a écrit :
I am having a problem with the corruption of a list. It occurs only
the first time that I call a function and never happens on subsequent
calls. Any suggestions would be appreciated.
I call the function, passing in a list as the input data. The function
must manipulate
On Feb 1, 12:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Yeah, found that one googling around. But I haven´t fund anything more
up to date. I imagine, that the performance of all of these wrappers
has been improved since then. But the performance of Python/C API
would too?
Anyways,
On Feb 1, 9:20 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 1 Feb 2007 06:14:40 -0800, Carl Banks [EMAIL PROTECTED] wrote:
On Jan 31, 3:37 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 31 Jan 2007 12:24:21 -0800, Carl Banks [EMAIL PROTECTED] wrote:
Michele Simionato wrote:
[I'm having some difficulty contacting 'real' MoinMoin support
channels so I am posting this question here. Hope that's ok.]
I have a pressing need to get a wiki up and running in a fairly short
timeframe. I did some investigations and the Python MoinMoin wiki
seemed to be the best choice for me
On 1 Feb 2007 06:41:56 -0800, Carl Banks [EMAIL PROTECTED] wrote:
On Feb 1, 9:20 am, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 1 Feb 2007 06:14:40 -0800, Carl Banks [EMAIL PROTECTED] wrote:
On Jan 31, 3:37 pm, Jean-Paul Calderone [EMAIL PROTECTED] wrote:
On 31 Jan 2007 12:24:21 -0800,
Bart Ogryczak wrote:
On Feb 1, 12:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Yeah, found that one googling around. But I haven´t fund anything more
up to date. I imagine, that the performance of all of these wrappers
has been improved since then. But the performance of Python/C API
Hello NG, a little longer question,
I'm working on our project DrPython and try fix bugs in Linux,
(on windows, it works very good now with latin-1 encoding).
On Windows, it works good now, using setappdefaultencoding and the right
encoding for open with styled text control with the right
On Feb 1, 12:40 am, Michele Simionato [EMAIL PROTECTED]
wrote:
On Jan 31, 9:24 pm, Carl Banks [EMAIL PROTECTED] wrote:
Well, of all the things you can use threads for, this is probably the
simplest, so I don't see any reason to prefer asynchronous method
unless you're used to it.
Well,
On 2/1/07, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Bart Ogryczak wrote:
On Feb 1, 12:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
Yeah, found that one googling around. But I haven´t fund anything more
up to date. I imagine, that the performance of all of these wrappers
has been
Il Thu, 01 Feb 2007 16:02:52 +0100, Franz Steinhaeusler ha scritto:
The case:
I have a file on a WindowsXP partition which has as contents german
umlauts and the filename itself has umlauts like iÜüäßk.txt
Could you please tell us a) which filesystem is that partition using (winxp
may be
Dan When I edit a page and click 'Save', the next page that displays is
Dan an 'HTTP 500' error. I have to refresh the page to see the changes.
...
Dan I'm currently perusing the source code to see if I can figure it
Dan out, but any pre-help will be gladly accepted.
You
dumbkiwi [EMAIL PROTECTED] writes:
I have written a script that uses the urllib2 module to download web
pages for parsing.
If there is no network interface, urllib2 hangs for a very long time
before it raises an exception. I have set the socket timeout with
socket.setdefaulttimeout(),
So I'm not sure how to write a code that could create a tree placing
data at every node... and then retrieve that information as I go by a
node...
here is what I have
==CODE===
from itertools import izip
class Node:
def __init__(self, left, right):
self.left = left
On Jan 31, 10:52 pm, Overlord [EMAIL PROTECTED] wrote:
Fuck the Germans. Didn't we kick their ass a couple times already?
OL
Thank god, I can just get my world news from c.l.p instead of having
to find another news site.
I salute you [EMAIL PROTECTED]
--
On 1 Feb, 16:02, Franz Steinhaeusler [EMAIL PROTECTED]
wrote:
The case:
I have a file on a WindowsXP partition which has as contents german
umlauts and the filename itself has umlauts like iÜüäßk.txt
If I want to append this file to a list, I get somehow latin-1, cannot
decode 'utf-8'.
You
hi simon:
thanks a lot for that resource ... i downloaded it and tried to use it ...
but when i try to import pypod, i get an error, which is as follows...
ImportError: No module named _gpod
I guess I have to do something more than merely putting the two files (
pypod.py and gpod.py) in my
I have a need to tile a bitmap across an arbitrary quadrilateral, and
apply perspective to it.
The Python Imaging Library (PIL) has an undocumented function that
might work, but I can't figure out how to make it work. You're
supposed to pass it 8 parameters, a b c d e f g h .
What I want is to
I saw this and tried to use it:
--8--- const.py-
class _const:
class ConstError(TypeError): pass
def __setattr__(self,name,value):
if self.__dict__.has_key(name):
raise self.ConstError, Can't rebind const(%s)%name
I am subclassing the array class and have __new__ to initialize and
create my class. In that class I create not only do I create an array
object, but I also create some other data in __new__ I want to have
access to outside of __new__. I tried
self.mydata = mydata
but that didn't work.
Can
It search a text inside that hex value.
It works perfecly on a txt file but if I open a binary file (.exe,.bin
ecc...) with the same value it wont work, why?
Please help!
Because the pattern isn't in the file, perhaps.
This pattern IS in the file (I made it and I double check with
Hi,
I searching for a python module which implements SEMI E-4 / E-5
SECS-II/HSMS communication protocol. Is anyone have informations about
this ?
Regards,
Laurent Laffont [EMAIL PROTECTED] --
http://mail.python.org/mailman/listinfo/python-list
Steven W. Orr [EMAIL PROTECTED] writes:
--8--- const.py-
...
sys.modules[__name__]=_const()
__name__ is 'const' since this file is const.py. So you've
juset set the const module to actually be a const instance.
1. Why do I not have to say
All,
I am hoping someone would be able to help me with a problem. I have an
LDAP server running on a linux box, this LDAP server contains a
telephone list in various groupings, the ldif file of which is -
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
dc:
On Feb 1, 5:52 pm, Steven W. Orr [EMAIL PROTECTED] wrote:
I saw this and tried to use it:
--8--- const.py-
[...]
sys.modules[__name__]=_const()
__name__ == 'const', so you´re actually doing
const = _const()
--
I was wondering the best way to do this? I have installed and used the
python-ldap libraries and these allow me to access and search the
server, but the searches always return a horrible nesting of lists,
tuples and dictionaries, below is an example of returning just one
record -
On Feb 1, 3:21 am, Bart Ogryczak [EMAIL PROTECTED] wrote:
Hi,
I´m looking for some benchmarks comparing SWIG generated modules with
modules made directly with C/Python API. Just how much overhead does
SWIG give? Doing profile of my code I see, that it spends quiet some
time in functions like
John Bottom line: the c-types module was a lot smaller, in Python, and
John completely comprehensible. And while I didn't measure the
John performance, I doubt if it was slower.
One advantage SWIG (or Boost.Python) has over ctypes is that it will work
with C++.
Skip
--
James Stroud kirjoitti:
snip
For instance, I have a copy_files section of a configuration. In order
to know what goes with what you have to resort to gymnastics with the
option names
[copy_files]
files_dir1 = this.file that.file
path_dir1 = /some/path
files_dir2 = the_other.file
Greetings,
I am new to programming and have heard so much about Python. I have a
couple of books on Python and have been to python.org many times.
I am faced with a project at work where I need to develop a searchable
database to include training materials for new hires.This will include
Hi all,
In the late 90s Vladimir Marangozov wrote a module that provided an
interface to System V shared memory on *nix platforms. I found a copy on
the Net, dusted it off, compiled it, plugged a couple of memory leaks,
intergrated others' changes, etc. Vlad hasn't posted on Usenet since the
Hi,
I'm near the ground and need help.
I'm building a multithreaded extension with boost.python.
python extension
-
import extension
extension.init() -PyEval_InitThreads();
setup 3 threads
ok, once more my scheme
python extension
-
import extension
extension.init() -PyEval_InitThreads();
setup 3 threads (pthreads) and do a lot
of things, but no python api
On Feb 2, 5:02 am, [EMAIL PROTECTED] (John J. Lee) wrote:
dumbkiwi [EMAIL PROTECTED] writes:
I have written a script that uses the urllib2 module to download web
pages for parsing.
If there is no network interface, urllib2 hangs for a very long time
before it raises an exception. I have
On 2/1/07, Chris Mellon [EMAIL PROTECTED] wrote:
As I understand it, part of the Boost.Python internals is a C++
wrapper over the Python C api,
That's true.
and there's no separate code generation
phase because it uses template magic to generate the wrappers.
Well, actually it depends on the
On Thursday, Feb 1st 2007 at 09:25 -0800, quoth Bart Ogryczak:
=On Feb 1, 5:52 pm, Steven W. Orr [EMAIL PROTECTED] wrote:
= I saw this and tried to use it:
=
= --8--- const.py-
=[...]
= sys.modules[__name__]=_const()
=
=__name__ == 'const', so you?re
Hi guys
i try to run this code in loop and to pass even the entry is
duplicated
def email_insert_in_db(email):
sql=INSERT INTO emails (email) values ('%s') %(email)
db=_mysql.connect(host = localhost, user = db_user, passwd =
db_pass, db = db_name)
try:
db.query(sql)
except
On 1 Feb 2007 10:17:31 -0800, baur79 [EMAIL PROTECTED] wrote:
Hi guys
i try to run this code in loop and to pass even the entry is
duplicated
def email_insert_in_db(email):
sql=INSERT INTO emails (email) values ('%s') %(email)
db=_mysql.connect(host = localhost, user = db_user, passwd
Steven W. Orr [EMAIL PROTECTED] writes:
to cause a different instantiation a la
foo = _const()
The goal would be to create different instances of consts.
The idea of putting it in sys.modules is so it's visible in all modules.
import const
iii=_const()
You need
iii = const._const
On Thursday, Feb 1st 2007 at 10:36 -0800, quoth Paul Rubin:
=Steven W. Orr [EMAIL PROTECTED] writes:
= to cause a different instantiation a la
= foo = _const()
= The goal would be to create different instances of consts.
=
=The idea of putting it in sys.modules is so it's visible in all modules.
now it gives this error
except IntegrityError, NameError:
NameError: global name 'IntegrityError' is not defined
any idea
i have python 2.3.2 installed
--
http://mail.python.org/mailman/listinfo/python-list
I am trying to overload the __invert__ operator (~) such that
it can take a second argument, other than
self, so that I can express:
x ~ y
by using:
def __invert__(self, other): do something
for example. Is this possible?
Thanks in advance,
--
On 1 Feb 2007 10:51:09 -0800, baur79 [EMAIL PROTECTED] wrote:
now it gives this error
except IntegrityError, NameError:
NameError: global name 'IntegrityError' is not defined
any idea
i have python 2.3.2 installed
IntegrityError will most likely be defined in the namespace of
whatever
Hi,
sorry for posting here, but the forum in the projects page is not
working. Maybe there is a gdesklet developer lurking... :-)
I cant import anything from a script, it gives me a runtime error.
is this a bug or a feature?
without being able to import from python standard library or other
Steven W. Orr [EMAIL PROTECTED] writes:
AttributeError: _const instance has no attribute '_const'
What am I missing here? (Sorry if it should be obvious)
Oh I see. No it's not obvious. module const has gotten overwritten
by the _const instance. I think that module author was too clever
Chris wrote:
I am trying to overload the __invert__ operator (~) such that
it can take a second argument, other than
self, so that I can express:
x ~ y
by using:
def __invert__(self, other): do something
for example. Is this possible?
No, you will get a syntax error before python
Chris Curvey wrote:
Hi all,
I have used the win32com libraries to set up a service called
MyService under Windows. So far, so good. Now I need to run multiple
copies of the service on the same machine. I also have that working.
For monitoring and logging, I'd like each instance of the
On 2007-02-01 05:35:30 -0700, D [EMAIL PROTECTED] said:
I'm sure this is a simple question to the Tkinter experts - I have a
very basic Tkinter application that consists of 1 master window and
buttons within that window. My problem is that, I need to be able to
scroll (up and down) when I
Hi all. I've just terminated a server application using asyncore /
asynchat frameworks.
I wrote a test script that performs a lot of connections to the server
app and I discovered that asyncore (or better, select()) can manage
only a limited number of file descriptors (aka simultaneous
jeremito a écrit :
I am subclassing the array class and have __new__ to initialize and
create my class. In that class I create not only do I create an array
object, but I also create some other data in __new__ I want to have
access to outside of __new__. I tried
self.mydata = mydata
On Feb 1, 2:10 pm, Larry Bates [EMAIL PROTECTED] wrote:
Chris Curvey wrote:
Hi all,
I have used the win32com libraries to set up a service called
MyService under Windows. So far, so good. Now I need to run multiple
copies of the service on the same machine. I also have that working.
1 - 100 of 216 matches
Mail list logo