PyCon UK 2008 is the second PyCon event in the UK, and is being held
on 12th to 14th September at the Birmingham Conservatoire.
The conference starts with a day of tutorials on the Friday. The
timetable for the tutorials day has now been published:
http://www.pyconuk.org/timetable.html
On Jul 29, 3:59 am, John Machin [EMAIL PROTECTED] wrote:
On Jul 29, 8:10 am, John Krukoff [EMAIL PROTECTED] wrote:
On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote:
My programming skills are pretty rusty and I'm just learning Python so
this problem is giving me trouble.
I
castironpi [EMAIL PROTECTED] wrote:
In CPython yes. In IronPython yes: the parts that are compiled into
machine code are the interpreter, *not user's code*.
WRONG! You are WRONG. At compile time, the Python code is compiled to
an intermediate language. At run time, the intermediate
On Jul 29, 2:26 am, John Krukoff [EMAIL PROTECTED] wrote:
On Mon, 2008-07-28 at 16:00 -0700, iu2 wrote:
On Jul 29, 12:10 am, John Krukoff [EMAIL PROTECTED] wrote:
On Mon, 2008-07-28 at 16:24 -0500, Ervan Ensis wrote:
My programming skills are pretty rusty and I'm just learning Python so
To answer the subject line:
param=any expression that can be evaluated when the function is defined
will assign the result of the expression as the default argument object
for the parameter.
tjr
--
http://mail.python.org/mailman/listinfo/python-list
Why not set up PYTHONPATH together with other environment variables in
a shell script (bash, or CMD on Windows) and call that shell script
instead of your Python script directly?
This is probably the easiest and still a very powerful and generic
solution for this kind of problem. We do it that
I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is MyCOM1.AdvMethod.this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those interfaces in python.Thank you
[EMAIL PROTECTED] schrieb:
I have implemented a COM in C++,buy i don't know how to use this COM
in python.
For example: the COM's ProgID is MyCOM1.AdvMethod.this COM have two
interfaces,the default interface's name is IAdvMethod,the second
interface's name is IBasicMethod.
How do i use those
iu2 [EMAIL PROTECTED] wrote:
Is it possible to grant Python another syntactic mark, similar to
triple quotes, that will actually make the enclosed code a compiled
code, or an anonymous function?
Yes, the syntactic mark you are looking for is 'def'.
Your example becomes:
def dotimes(n,
Terry Reedy wrote:
To answer the subject line:
param=any expression that can be evaluated when the function is defined
will assign the result of the expression as the default argument
object for the parameter.
thanks Terry and others,
brings me to one other question:
I guess this function
Bruno Desthuilliers [EMAIL PROTECTED] ha scritto
nel messaggio news:[EMAIL PROTECTED]
Indeed. You explicitely raise, so the lookup stops here. You'd need to
explicitely call on superclass instead to have B.__getattr__ called, ie:
class A(object):
def __getattr__(self, name):
if
On 2008-07-28 22:22, Fabio Oikawa wrote:
Hello.
I am trying to open an .xls (excel) file using xlrd, but an error message
occurs when I open the workbook.
I can open any other .xls file made by myself (either by MS Excel 2003 SP3
in Windows Vista or by OpenOffice 2.0 in Debian) using the
Bruno Desthuilliers [EMAIL PROTECTED] writes:
Nikolaus Rath a écrit :
Michael Torrie [EMAIL PROTECTED] writes:
(snip)
In short, unlike what most of the implicit self advocates are
saying, it's not just a simple change to the python parser to do
this. It would require a change in the
[EMAIL PROTECTED] wrote:
Thanks for everyone's feedback - excellent detail - all my questions
have been answered.
BTW: Roel was correct that I got confused over the AMD and Intel naming
conventions regarding the 64 bit versions of Python for Windows. (I
missed that nuance that the Intel build
On Tue, 29 Jul 2008 09:43:26 +0200, Stef Mientki wrote:
about '.' being the current directory, well I think windows was thrown
at the market about 25 years ago, and since then we don't use '.'
anymore ;-)
No, even Windows uses '.' as the current directory -- at least XP does, I
haven't tried
Hello,
I have a ironpython 1.1.1.0 host in my c# app, and When doing a
engine.ExecuteFile(file);
i often get the error below, when file is on a network share :
(winXp client , windows ??? server)
21-07-2008 12:47:28 : Traceback (most recent call last):
21-07-2008 12:47:28 : File
On Jul 28, 8:15 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Cutting to the crux of the discussion...
On Sun, 27 Jul 2008 23:45:26
On Tue, 29 Jul 2008 03:26:45 +, Peter Teuben wrote:
if I define a simple string code, with the following contents:
import math
def foo(x):
return math.sqrt(x)
and i run it using exec(code) in python, math is not known.
Works for me.
code = import math
... def foo(x):
...
Le Monday 28 July 2008 16:48:09 Enrico, vous avez écrit :
Hi there,
I have the following situation (I tryed to minimize the code to concentrate
on the issue):
class A(object):
def __getattr__(self, name):
print 'A.__getattr__'
if name == 'a': return 1
raise AttributeError('%s not
On Jul 29, 9:34 am, mindmind [EMAIL PROTECTED] wrote:
Hello,
I have a ironpython 1.1.1.0 host in my c# app, and When doing a
engine.ExecuteFile(file);
i often get the error below, when file is on a network share :
(winXp client , windows ??? server)
21-07-2008 12:47:28 : Traceback (most
Am Dienstag, 29. Juli 2008 10:37:45 schrieb Carl Banks:
You keep bringing up this notion of more complex with no benefit,
which I'm simply not interested in talking about that at this time,
and I won't respond to any of your points. I am seeking the answer to
one question: whether if x can
On Jul 29, 5:33 am, Russ P. [EMAIL PROTECTED] wrote:
On Jul 28, 8:44 pm, alex23 [EMAIL PROTECTED] wrote:
On Jul 29, 4:46 am, Russ P. [EMAIL PROTECTED] wrote:
As I said, I could write a pre-processor myself to
implement it in less than a day.
So WHY DON'T YOU WRITE IT ALREADY?
I'm
On Tue, 29 Jul 2008 01:37:45 -0700, Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Cutting to the crux
Steven D'Aprano wrote:
On Tue, 29 Jul 2008 00:23:02 +, Steven D'Aprano wrote:
Dude. Dude. Just... learn some Python before you embarrass yourself
further.
I'm sorry Anders, that was a needlessly harsh thing for me to say. I
apologize for the unpleasant tone.
Still, __nonzero__ is a
On Jul 29, 9:36 am, Duncan Booth [EMAIL PROTECTED] wrote:
iu2 [EMAIL PROTECTED] wrote:
Is it possible to grant Python another syntactic mark, similar to
triple quotes, that will actually make the enclosed code a compiled
code, or an anonymous function?
Yes, the syntactic mark you are
On Jul 28, 4:03 pm, Thomas Heller [EMAIL PROTECTED] wrote:
waldek schrieb:
Hi,
I'm trying to handle data passed to Py Callback which is called from
C dll. Callback passes data to another thread using Queue module and
there the data are printed out.
If data is printed out in a
On Tue, Jul 29, 2008 at 1:47 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Jul 28, 6:05 pm, Guilherme Polo [EMAIL PROTECTED] wrote:
On Mon, Jul 28, 2008 at 9:39 PM, MRAB [EMAIL PROTECTED] wrote:
On Jul 29, 12:41 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
On Jul 28, 4:20 pm, Guilherme
Am Dienstag, 29. Juli 2008 11:15:05 schrieb Heiko Wundram:
I can't dig up a simple example from code I wrote quickly...
Just to get back to that: an example I found where if x (the generic
__nonzero__() test) will work to test for emptiness/non-emptiness of a
container, whereas if len(x) 0
Hi,
I am using numpy and wish to create very large arrays. My system is AMD 64 x
2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a 15 GB swap drive.
The command I have been trying to use is;
g=numpy.ones([1000,1000,1000],numpy.int32)
This returns a memory error.
A smaller
Hi i'm relatively new to Python and my C/C++ knowledge is near to
None. Having said that I feel justified to ask stupid questions :)
Ok now more seriously. I have question refering to char* used as
function parameters to return values. I have read SWIG manual to find
best way to overcome that,
Am Dienstag, 29. Juli 2008 12:51:36 schrieb code_berzerker:
Ok now more seriously. I have question refering to char* used as
function parameters to return values. I have read SWIG manual to find
best way to overcome that, but there are many warnings about memory
leaks and stuff, so I feel
I don't know the answer - I do know that .NET permissions issues and
accessing network resources are a bit 'weird'. You're likely to get an
answer if you ask on the IronPython mailing list.
I had it running through the night, ~100 times, 25 of these gave the
above exception.
Hard to see any
Hi all
I have been using my own home-brewed client/server technique for a
while, using socket and select. It seems to work ok. The server can
handle multiple clients. It does this by creating a new thread for
each connection. Each thread runs its own select loop.
I am making some fairly big
Hi!
Example, with Pywin32:
import win32com.client
moncom = win32com.client.Dispatch('MyCOM1.AdvMethod')
moncom.IAdvMethod(...
See Pywin32 here: http://sourceforge.net/projects/pywin32/
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
M�ta-MCI (MVP) wrote:
Hi!
Example, with Pywin32:
import win32com.client
moncom = win32com.client.Dispatch('MyCOM1.AdvMethod')
moncom.IAdvMethod(...
See Pywin32 here: http://sourceforge.net/projects/pywin32/
That's not working, because the OP has a custom interface, not
On Mon, Jul 28, 2008 at 11:12 AM, Gabriel Genellina
[EMAIL PROTECTED]wrote:
En Sun, 27 Jul 2008 15:26:39 -0300, Themistoklis Bourdenas
[EMAIL PROTECTED] escribió:
On a related note, as the actual instance method of myclass is not foo
but
decorate(foo), why are they called method
Peter Teuben wrote:
if I define a simple string code, with the following contents:
import math
def foo(x):
return math.sqrt(x)
The
import math
statement puts 'math' in the local namespace, and foo looks it up in the
global namespace. This can only work when these namespaces are
On Jul 29, 2:21 pm, castironpi [EMAIL PROTECTED] wrote:
On Jul 28, 5:58 pm, Fuzzyman [EMAIL PROTECTED] wrote:
Well - in IronPython user code gets compiled to in memory assemblies
which can be JIT'ed.
I don't believe so.
Uh, you're questioning someone who is not only co-author of a book on
Ok I think I got it:
PyObject* myFuncXXX(char* p_1, int p_2, char* p_3, int p_4)
{
int res;
char _host[255] = ;
int _port;
res = funcXXX(p_1, p_2, p_3, p_4, _host, _port);
PyObject* res1 = PyInt_FromLong(res);
PyObject* res2 = PyString_FromStringAndSize(_host, strlen(_host));
Robert LaMarca wrote:
Hi,
I am using numpy and wish to create very large arrays. My system is AMD 64 x 2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a 15 GB swap drive.
The command I have been trying to use is;
g=numpy.ones([1000,1000,1000],numpy.int32)
This returns a
Thanks. That worked.
Victor
On 7/16/08, Alexandr N Zamaraev [EMAIL PROTECTED] wrote:
header_sizes = (36, 26, 22, 18, 14, 12)
if x not in header_sizes:
raise Exception()
else:
h36, h26, h22, h18, h14, h12 = tuple(
line if x == size else '' for x in header_sizes)
--
Hi:
I would like to make my windows python interpreter work like my linux one. I
want to be able to cut and paste multiple lines of code. Now I can only
paste one line at a time. I do not want it to indent automatically. How can
I change this?
TIA,
Victor
--
Hi;
I have this code:
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u', '\\b',
'\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is like the
Beast? Who can wage war against him?\par'
for char in chars:
c = '(?=' + char + ')'
test = re.search(c,
Victor Subervi wrote:
Hi:
I would like to make my windows python interpreter work like my linux
one. I want to be able to cut and paste multiple lines of code.
You can already do this: what are you trying which isn't working?
Now I can only paste one line at a time.
I do not want it to
Anders J. Munch [EMAIL PROTECTED] writes:
Steven D'Aprano wrote:
I'm sorry Anders, that was a needlessly harsh thing for me to say.
I apologize for the unpleasant tone.
Still, __nonzero__ is a fundamental part of Python's behaviour.
You should learn about it.
Hm, first you
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u', '\\b',
'\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is like the
Beast? Who can wage war against him?\par'
for char in chars:
c = '(?=' + char + ')'
test = re.search(c, rtf_markup)
If I'm in the python interactive interpreter, I get a beep when I
hit the backspace key.
I must confess, though, that my terminal is complicated, to put
it mildly: I work on a Mac running Leopard; I open a Terminal
session, and through it I ssh to an Ubuntu server; on this server
I connect to a
Title: Defunct when using subprocess.Popen
Hi!
I hope someone can help me out here!
I'm running a GUI in python which is able to launch a separate python process that will run forever. In rare cases I will want to kill the launched process. Every time I do so, I end up with the process as
Title: Defunct when using subprocess.Popen
Hi!
I hope someone can help me out here!
I'm running a GUI in python which is able to launch a separate python process that will run forever. In rare cases I will want to kill the launched process. Every time I do so, I end up with the process
Victor Subervi wrote:
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u', '\\b',
'\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is like
the Beast? Who can wage war against him?\par'
for char in chars:
c = '(?=' + char + ')'
test =
Robert LaMarca [EMAIL PROTECTED] wrote:
Hi,
I am using numpy and wish to create very large arrays. My system is
AMD 64 x 2 Ubuntu 8.04. Ubuntu should be 64 bit. I have 3gb RAM and a
15 GB swap drive.
The command I have been trying to use is;
On 29 Lug, 13:09, Frank Millman [EMAIL PROTECTED] wrote:
Firstly, having got asyncore working, I had a look at asynchat. As far
as I can see I get very little benefit from using it. I have already
set up a 'messaging' protocol between server and client, where all
messages consist of 5 digits
In [EMAIL PROTECTED] kj [EMAIL PROTECTED] writes:
snip
Please ignore my question. I found a general solution that works
not only for the python interactive interpreter but also for all
programs that have a readline-type interaction. This solution has
nothing to do with Python, but if anyone's
Heiko Wundram wrote:
Am Dienstag, 29. Juli 2008 11:15:05 schrieb Heiko Wundram:
I can't dig up a simple example from code I wrote quickly...
Just to get back to that: an example I found where if x (the generic
__nonzero__() test) will work to test for emptiness/non-emptiness of a
container,
hi group i am running into a problem with gtk. i have a treeview that
just displays tabular data (no down arrows or trees etc). it has 5
columns. The tiny problem i am having is that it is just display the
data of the column named `title` in all the colums!
here the pic of the app in action
On Jul 25, 7:50 am, Fredrik Lundh [EMAIL PROTECTED] wrote:
It's a potentially brain-exploding topic,
-that you made very understandable. Thanks for posting that
explanation and example.
--
http://mail.python.org/mailman/listinfo/python-list
2. Will it be possible in Python 3.0 to do the following:
def dotimes(n, callable):
for i in range(n): callable()
def block():
nonlocal i
for j in range(i):
print j,
print
dotimes seems ok and what is wrong with that function block?
Hello,
I have a number of conceptually separate tests that nevertheless need
a common, complicated and expensive setup.
Unfortunately, unittest runs the setUp method once for each defined
test, even if they're part of the same class as in
class TwoTests(unittest.TestCase):
def setUp(self):
On Tue, 29 Jul 2008 07:26:38 -0700 (PDT), [EMAIL PROTECTED] [EMAIL
PROTECTED] wrote:
2. Will it be possible in Python 3.0 to do the following:
def dotimes(n, callable):
for i in range(n): callable()
def block():
nonlocal i
for j in range(i):
print
On Tue, 29 Jul 2008 16:35:55 +0200, Nikolaus Rath [EMAIL PROTECTED] wrote:
Hello,
I have a number of conceptually separate tests that nevertheless need
a common, complicated and expensive setup.
Unfortunately, unittest runs the setUp method once for each defined
test, even if they're part of
Hi.
Please correct my if I'm wrong but it seems to me that the major
continuous integration servers (Hudson, CruiseControl, TeamCity ..)
don't support Python based application.
It seems they mainly support Java, .NET and Ruby.
Can I use one of the previous listed servers for Python project?
Hi,
I'm running a Python script on a Solaris 9 machine, invoking the
Python script from ksh, if that matters. There is an enviornment
variable, $JAVA_HOME, that I would like to include in my script,
replacing /path/to/java/home' with the value of $JAVA_HOME.
java_home='/path/to/java/home'
How
Hussein B wrote:
Hi.
Please correct my if I'm wrong but it seems to me that the major
continuous integration servers (Hudson, CruiseControl, TeamCity ..)
don't support Python based application.
It seems they mainly support Java, .NET and Ruby.
Can I use one of the previous listed servers
On Tue, 29 Jul 2008 07:47:35 -0700 (PDT), Hussein B [EMAIL PROTECTED] wrote:
Hi.
Please correct my if I'm wrong but it seems to me that the major
continuous integration servers (Hudson, CruiseControl, TeamCity ..)
don't support Python based application.
It seems they mainly support Java, .NET
On Tue, Jul 29, 2008 at 10:53 AM, laredotornado
[EMAIL PROTECTED] wrote:
Hi,
I'm running a Python script on a Solaris 9 machine, invoking the
Python script from ksh, if that matters. There is an enviornment
variable, $JAVA_HOME, that I would like to include in my script,
replacing
Hi.
Apache Ant is the de facto building tool for Java (whether JSE, JEE
and JME) application.
With Ant you can do what ever you want: compile, generate docs,
generate code, packing, deploy, connecting to remote servers and every
thing.
Do we have such a tool for Python projects?
Thank you.
--
Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
Cutting to the crux of the discussion...
On Sun, 27 Jul 2008
Hussein B wrote:
Hi.
Apache Ant is the de facto building tool for Java (whether JSE, JEE
and JME) application.
With Ant you can do what ever you want: compile, generate docs,
generate code, packing, deploy, connecting to remote servers and every
thing.
Do we have such a tool for Python
Hi,
So this may have been asked before but i haven't found the answer by
googling so far. My situation is this:
I want this structure for my code:
@overloaded
def sign_auth(secret, salt, auth_normalized):
return __sign_auth(saltedhash_bin(secret, salt), auth_normalized)
Python noob here.
I want to write a script that creates and populates a simple Postgres
database.
The word on the street is to use something like SQLAlchemy for
database access in Python, but my experience in the past with
packages that perform automated SQL generation has been awful, so
I
On Jul 29, 11:08 am, Hussein B [EMAIL PROTECTED] wrote:
Hi.
Apache Ant is the de facto building tool for Java (whether JSE, JEE
and JME) application.
With Ant you can do what ever you want: compile, generate docs,
generate code, packing, deploy, connecting to remote servers and every
thing.
On Jul 29, 11:20 am, kj [EMAIL PROTECTED] wrote:
Python noob here.
I want to write a script that creates and populates a simple Postgres
database.
The word on the street is to use something like SQLAlchemy for
database access in Python, but my experience in the past with
packages that
On Mon, 28 Jul 2008 16:48:28 +0200, Suresh Pillai wrote:
Okay, please consider this my one absolutely stupid post for the year.
I'd like to pretend it never happened but unfortunately the web doesn't
allow that. Having never used sets, I unfort read something that lead
to it, but ...
Okay,
Svenn Are Bjerkem schrieb:
Hi again,
when I get far enough to parse the VHDL (which is not currently the
fact, but I have to look at the work coming up downstream) I will have
to put it into an internal data structure and then write some classes
to handle the MVC between whatever data I have
finally i solved it. This for any googler who comes this way
def show_sync_wind(self,obj, data = None):
t = Template.select(Template.q.synced == '0')
self.synclstore = gtk.ListStore(str,str,str,str,str)
x = 0
cr =
Holden Web is please to announce its third public Introduction to
Python class, near Washington DC, from September 9-11.
Further details are available from
http://holdenweb.com/py/training/
We are also interested in adding to our course repertoire. If you have
ideas for suitable one-day
In article [EMAIL PROTECTED],
Bruno Desthuilliers [EMAIL PROTECTED] wrote:
Enrico a écrit :
Hi there,
I have the following situation (I tryed to minimize the code to concentrate
on the issue):
class A(object):
def __getattr__(self, name):
print 'A.__getattr__'
if name ==
On 2008-07-29, Stef Mientki [EMAIL PROTECTED] wrote:
brings me to one other question:
I guess this function is only evaluated once, is that correct ?
Yes.
about '.' being the current directory, well I think windows
was thrown at the market about 25 years ago, and since then we
don't use
Tim Henderson wrote:
Hi,
So this may have been asked before but i haven't found the answer by
googling so far. My situation is this:
I want this structure for my code:
@overloaded
def sign_auth(secret, salt, auth_normalized):
return __sign_auth(saltedhash_bin(secret, salt),
On 29 Jul, 17:20, kj [EMAIL PROTECTED] wrote:
So what's the
standard Python way to send SQL directly to a Postgres database
and get back results?
Take a look at this page:
http://wiki.python.org/moin/DatabaseInterfaces
I've used psycopg2
Yes i am aware of that but I want the code to be self documenting, so
the intent is clear. I actually have an implementation using that
style which you suggest. I would like cleaner style, like the one i
suggested in my first post.
Cheers
Tim Henderson
--
Hello,
I have written the following small proxy class which I expect to pass all
function calls to the 'original' object:
--- BEGIN ---
class proxy(object):
def __init__( self, subject ):
self.__subject = subject
def __getattr__( self, name ):
return getattr(
On 29 Jul, 17:08, Hussein B [EMAIL PROTECTED] wrote:
Apache Ant is the de facto building tool for Java (whether JSE, JEE
and JME) application.
With Ant you can do what ever you want: compile, generate docs,
generate code, packing, deploy, connecting to remote servers and every
thing.
Do we
Suresh Pillai wrote:
On Mon, 28 Jul 2008 16:48:28 +0200, Suresh Pillai wrote:
Okay, please consider this my one absolutely stupid post for the year.
I'd like to pretend it never happened but unfortunately the web doesn't
allow that. Having never used sets, I unfort read something that lead
Diez B. Roggisch [EMAIL PROTECTED] wrote:
Hussein B wrote:
Please correct my if I'm wrong but it seems to me that the major
continuous integration servers (Hudson, CruiseControl, TeamCity ..)
don't support Python based application.
It seems they mainly support Java, .NET and Ruby.
Can I use
I´ll try that. Back online in a week.
Victor
On 7/29/08, Tim Golden [EMAIL PROTECTED] wrote:
Victor Subervi wrote:
def a():
chars = ['\\i0', '\\u0', '\\qc', '\\b0', '\\ql', '\\i', '\\u', '\\b',
'\\yz']
rtf_markup = 'viewkind4\uc1\pard\nowidctlpar\qc\i\f0\fs36 Who is like the
Beast? Who
In [EMAIL PROTECTED] Tim Henderson [EMAIL PROTECTED] writes:
I believe there are a couple of options but pyscopg, and PyGreSQL seem
to be popular.
Great. Thanks!
kynn
--
NOTE: In my address everything before the first period is backwards;
and the last period, and everything after it, should
Jean-Paul Calderone [EMAIL PROTECTED] writes:
On Tue, 29 Jul 2008 16:35:55 +0200, Nikolaus Rath [EMAIL PROTECTED] wrote:
Hello,
I have a number of conceptually separate tests that nevertheless need
a common, complicated and expensive setup.
Unfortunately, unittest runs the setUp method once for
On Jul 29, 5:27 am, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Tue, 29 Jul 2008 01:37:45 -0700, Carl Banks wrote:
I am looking for one that can't.
If you are writing code that needs to do the right thing with arbitrary
types, then your so-called simple explicit tests simply can't work.
I
I recently discovered Python and see it as a great language to use for
personal projects (and more). I made my living for over a decade as a
coder in C, C++, ADA, Fortran, and Assembly before moving to systems
engineering.
I'm now retired, and would love to code again. I see Python as the
perfect
On Tue, 29 Jul 2008 19:26:09 +0200, Nikolaus Rath [EMAIL PROTECTED] wrote:
Jean-Paul Calderone [EMAIL PROTECTED] writes:
On Tue, 29 Jul 2008 16:35:55 +0200, Nikolaus Rath [EMAIL PROTECTED] wrote:
Hello,
I have a number of conceptually separate tests that nevertheless need
a common,
On Jul 29, 5:15 am, Heiko Wundram [EMAIL PROTECTED] wrote:
I can't dig up a simple example from code I wrote quickly, but because of the
fact that explicit comparisons always hamper polymorphism
I'm not going to take your word for it. Do you have code that
demonstrates how if x improves
Is there a special pythonic idiom for iterating over a list (or
tuple) two elements at a time?
I mean, other than
for i in range(0, len(a), 2):
frobnicate(a[i], a[i+1])
?
I think I once saw something like
for (x, y) in forgotten_expression_using(a):
frobnicate(x, y)
Or maybe I
On Jul 29, 11:12 am, Matthew Fitzgibbons [EMAIL PROTECTED] wrote:
Carl Banks wrote:
On Jul 28, 8:15 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Mon, 28 Jul 2008 13:22:37 -0700, Carl Banks wrote:
On Jul 28, 10:00 am, Steven D'Aprano [EMAIL PROTECTED]
On Jul 29, 1:30 pm, Carl Banks [EMAIL PROTECTED] wrote:
On Jul 29, 5:15 am, Heiko Wundram [EMAIL PROTECTED] wrote:
I can't dig up a simple example from code I wrote quickly, but because of
the
fact that explicit comparisons always hamper polymorphism
I'm not going to take your word for
On Jul 29, 5:14 pm, Wolfgang Grafen [EMAIL PROTECTED]
wrote:
For me it is not very clear what you intend to do. After years of
parsing parts of VHDL from time to time the rapid parsing way for me is
using regular expressions instead of one of the parser frame works
because of following
Hi,
I don't have server listening on port 8084 but I can open socket to it
(and to many other ports, tested for all8000)
import socket
def test(port):
af, socktype, proto, canonname, sa =
socket.getaddrinfo('localhost', port,
socket.AF_INET, socket.SOCK_STREAM)[0]
s =
kj wrote:
Is there a special pythonic idiom for iterating over a list (or
tuple) two elements at a time?
I mean, other than
for i in range(0, len(a), 2):
frobnicate(a[i], a[i+1])
?
I think I once saw something like
for (x, y) in forgotten_expression_using(a):
frobnicate(x, y)
Or
On Jul 29, 5:27 am, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Tue, 29 Jul 2008 01:37:45 -0700, Carl Banks wrote:
I would accept as evidence something that satisfies my criteria, which
your example did not: it could have easily (and more robustly) been
written with a simple explicit test.
Something like this may be fast enough:
from itertools import izip
xpartition = lambda seq, n=2: izip(*(iter(seq),) * n)
xprimes = (x for x in xrange(2, 100) if all(x % i for i in xrange(2, x)))
list(xpartition(xprimes))
[(2, 3), (5, 7), (11, 13), (17, 19), (23, 29), (31, 37), (41, 43),
(47,
1 - 100 of 248 matches
Mail list logo