Thank you for the explanation, Ryan!
Uli
--
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
--
http://mail.python.org/mailman/listinfo/python-list
I'm trying to load a module GDAL into a Python script.
The loader/binder that is then called, seems to be generated by SWIG, a project
with which I'm unfortunately not familiar.
The part of the SWIG generated code that fails on me is as follow:
-- start code snip 1 -
# This file
gry writes:
...
> rest = ['%d' % randint(1, mx) for i in range(wd - 1)]
> for i in range(i,i+rows): ...
One thing that immediately comes to mind is use xrange instead of range.
Also, instead of
first = ['%d' % i]
rest = ['%d' % randint(1, mx) for i in range(wd - 1)]
re
Steven D'Aprano wrote:
while True:
... print "Looping"
... True = 0
Just remember that if you use that inside a function, you'll
have to initialise True to True before... er, wait a moment,
that won't work... ah, I know:
def f(true = True):
True = true
while True:
..
On Tuesday 14 December 2010, 10:19:04 Gregory Ewing wrote:
> Steven D'Aprano wrote:
> while True:
> >
> > ... print "Looping"
> > ... True = 0
>
> Just remember that if you use that inside a function, you'll
> have to initialise True to True before... er, wait a moment,
> that won't wor
Many people have. :-)
In the context of WSGI you're basically talking about routing
middleware, which solves the problem: "given a request, which
application should be called to construct a response?"
In my case, it turned out as simple as a list of (regex, resource)
tuples, where regex is a regu
To aid your googling, the problem is also commonly called 'Dispatching'
instead of 'Routing'.
Joost
On 14 December 2010 12:19, Joost Molenaar wrote:
> Many people have. :-)
>
> In the context of WSGI you're basically talking about routing
> middleware, which solves the problem: "given a request
Dear authors,
=
International Workshop: DATICS-ISPA'11
CALL FOR PAPERS
http://datics.nesea-conference.org/datics-ispa2011
Busan, Korea, 26-28 May, 2011.
=
Aims
Am 14.12.2010 11:33, schrieb Hans-Peter Jansen:
> On Tuesday 14 December 2010, 10:19:04 Gregory Ewing wrote:
>> Steven D'Aprano wrote:
>> while True:
>>>
>>> ... print "Looping"
>>> ... True = 0
>>
>> Just remember that if you use that inside a function, you'll
>> have to initialise True to Tru
gry wrote:
> [python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram]
> I have a little data generator that I'd like to go faster... any
> suggestions?
> maxint is usually 9223372036854775808(max 64bit int), but could
> occasionally be 99.
> width is usually 500 or 1600, rows ~ 5000.
>
Peter Otten wrote:
> gry wrote:
>
>> [python-2.4.3, rh CentOS release 5.5 linux, 24 xeon cpu's, 24GB ram]
>> I have a little data generator that I'd like to go faster... any
>> suggestions?
>> maxint is usually 9223372036854775808(max 64bit int), but could
>> occasionally be 99.
>> width is usual
On Dec 13, 2010, at 12:30 PM, Godson Gera wrote:
>
>
> On Mon, Dec 13, 2010 at 10:46 PM, Brian Blais wrote:
>> Hello,
>>
>> I was wondering if there is any standard or suggested way of installing
>> packages *without* going to the commandline. I often have students who,
>> from there experi
On Tue, Dec 14, 2010 at 6:59 PM, Brian Blais wrote:
> On Dec 13, 2010, at 12:30 PM, Godson Gera wrote:
>
> >
> >
> > On Mon, Dec 13, 2010 at 10:46 PM, Brian Blais wrote:
> >> Hello,
> >>
> >> I was wondering if there is any standard or suggested way of installing
> packages *without* going to t
Unfortunately you use command('cp...') to copy the file instead of
Pythons portable library methods. This choice
effectively makes your program work on Unix only (not Windows).
See http://modcopy.sourceforge.net for a more portable version.
Regards,
bal...@gmail.com
--
http://mail.python.org/mai
On Tue, 14 Dec 2010 07:35:45 -0800 (PST)
baloan wrote:
> Unfortunately you use command('cp...') to copy the file instead of
> Pythons portable library methods. This choice
> effectively makes your program work on Unix only (not Windows).
>
> See http://modcopy.sourceforge.net for a more portable
WHAT IS IT:
The Sybase module provides a Python interface to the Sybase relational
database system. It supports all of the Python Database API, version
2.0 with extensions.
** This version is a pre-release not intended for production use **
The module is available here:
http://downloads.sourcef
On Tue, 14 Dec 2010 10:57:40 -0500, D'Arcy J.M. Cain wrote:
> I guess I missed the beginning of this thread but can someone tell me
> why one needs to download a whole other program in order to do this?
>
> open(out_fn, 'w').write(open(in_fn).read())
Or what about shutil? Isn't that the higher
On Tue, 14 Dec 2010 16:25:54 + (UTC)
Harishankar wrote:
> On Tue, 14 Dec 2010 10:57:40 -0500, D'Arcy J.M. Cain wrote:
> > open(out_fn, 'w').write(open(in_fn).read())
> Or what about shutil? Isn't that the higher level file operation module?
At least that's in the standard library but even t
Gregory Ewing writes:
> Steven D'Aprano wrote:
>
>while True:
>>
>> ... print "Looping"
>> ... True = 0
>
> Just remember that if you use that inside a function, you'll
> have to initialise True to True before... er, wait a moment,
> that won't work... ah, I know:
>
> def f(true = T
On 14/12/2010 08:43, Hvidberg, Martin wrote:
I'm trying to load a module GDAL into a Python script.
The loader/binderthat is then called, seems to be generated by SWIG, a
project with which I'm unfortunately not familiar.
The part of the SWIG generated code that fails on me is as follow:
[sni
On Dec 13, 4:33 pm, "Rhodri James"
wrote:
> On Fri, 10 Dec 2010 17:11:55 -, Akand Islam wrote:
> > In my system (Ubuntu 10.04) there are sage-4.6, python 2.6.5, tk8.5-
> > dev installed. When I give command from terminal "sage -f
> > python-2.6.5.p8" to get sage's python it shows following me
Am 14.12.2010 17:52, schrieb Arnaud Delobelle:
> You also need to initialise False to False for it to be really
> robust. So something like this will do.
>
> True = not 0
> False = not True
> while True:
> ...
> True = False
Tres Seavers once told me a joke like this:
On Dec 11, 12:59 pm, MrJean1 wrote:
> In general, for shared libraries, you need to define those first as
> prototype using ctypes.CFUNCTYPE() and then instantiate each prototype
> once supplying the necessary parameter flags using
> prototype(func_spec, tuple_of_param_flags). See sections 15.16
Is there a way to map Linux locale codes to Windows locale codes?
Windows has locale codes like 'Spanish_Mexico'. We would like to
use the more ISO compliant 'es_MX' locale format under Windows.
Is there a resource or API that might help us with this mapping?
Babel is not an option for us since
Hi
To build a binary packet (for SMPP protocol), we have to concatenate
different types of data: integers, floats, strings.
We are using struct.pack to generate the binary representation of each
integer and float of the packet, and then they are concatenated with the +
operand.
However, for strin
On 12/14/2010 10:27 AM Akand Islam said...
On Dec 13, 4:33 pm, "Rhodri James"
wrote:
On Fri, 10 Dec 2010 17:11:55 -, Akand Islam wrote:
In my system (Ubuntu 10.04) there are sage-4.6, python 2.6.5, tk8.5-
dev installed. When I give command from terminal "sage -f
python-2.6.5.p8" to get sag
On 14/12/2010 19:50, Jaime Fernández wrote:
Hi
To build a binary packet (for SMPP protocol), we have to concatenate
different types of data: integers, floats, strings.
We are using struct.pack to generate the binary representation of each
integer and float of the packet, and then they are conca
2010/12/14 Jaime Fernández :
> Hi
> To build a binary packet (for SMPP protocol), we have to concatenate
> different types of data: integers, floats, strings.
> We are using struct.pack to generate the binary representation of each
> integer and float of the packet, and then they are concatenated w
Christian Heimes writes:
[...]
> Tres Seavers once told me a joke like this:
>
>True = not not "Who's at the door?" # say it out loud!
>
> This was back in the old days of Zope 2.5 and Python 2.1, which didn't
> have True and False.
I almost used:
True = "to be" or not "to be" # that is
Mark Crispin writes:
> In a C module, I want to pick up the arguments for a Python call like:
> module.call("string1",["string2a", "string2b", "string2c"], "string3")
> and stash these into:
> char *arg1;
> char *arg2[];
> char *arg3;
> All arguments are required, and we can
You could look into the windows registry, the key
"HKLM\SYSTEM\CurrentControlSet\Control\Nls" has all the supported LCID's
listed. If not, you could simply get the codepage provided by
locale.setlocale(), e.g.:
import locale
print(locale.setlocale(locale.LC_ALL, ""))
prints "Portuguese_Brazil.125
Consider this code:
def spam(*args, **kwargs):
args, kwargs = __pre_spam(*args, **kwargs)
# args & kwargs are OK: proceed
# ...
def __pre_spam(*args, **kwargs):
# validate args & kwargs;
# return canonicalized versions of args & kwargs;
# on failure, raise some *info
Hi.
I wonder if anyone knows any alternative to PIL library, as this does
not work with Python 3.1.
Thanks in advance
Regards.
Cristian
--
http://mail.python.org/mailman/listinfo/python-list
Without buying first?
I'd like to run the front end of all these new devices,
on my PC and program in python, to assess which is the
best on for me. pre-test python scripts before cross
loading onto the device I finally buy.
Is that possible? It would also be nice to have some of
the look and f
This is an idea I got thinking about COM objects, and getting
some support from Mark Hammond, Python's Win32 wizard.
The goal is to have a host language (not Python) instantiate
an object that runs against the Python interpreter, which lives
as its own process. The VMs have various ways of imple
On 12/14/2010 3:17 PM craf said...
Hi.
I wonder if anyone knows any alternative to PIL library, as this does
not work with Python 3.1.
Thanks in advance
Regards.
Cristian
You might try the 1.1.6 port referenced here:
http://www.mail-archive.com/image-sig@python.org/msg02404.html
Emile
Try again after changing line 16 to
sn = SmiGetNode(None, "1.3.6.1.2.1.2.2")
Because, SmiGetNode is a Python function which accepts Python objects
as arguments. Passing is a ctypes object oid is incorrect.
/Jean
On Dec 14, 10:36 am, News Wombat wrote:
> On Dec 11, 12:59 pm, MrJean1 wrote:
- Mensaje reenviado
> De: Emile van Sebille
> Para: python-list@python.org
> Asunto: Re: Alternative to PIL in Python 3.1
> Fecha: Tue, 14 Dec 2010 16:39:19 -0800
>
> On 12/14/2010 3:17 PM craf said...
> > Hi.
> >
> > I wonder if anyone knows any alternative to PIL library, as th
On Tue, Dec 14, 2010 at 6:30 PM, stateslave wrote:
>
> Without buying first?
>
> I'd like to run the front end of all these new devices,
> on my PC and program in python, to assess which is the
> best on for me. pre-test python scripts before cross
> loading onto the device I finally buy.
>
> Is t
kj wrote:
The one thing I don't like about this strategy is that the tracebacks
of exceptions raised during the execution of __pre_spam include one
unwanted stack level (namely, the one corresponding to __pre_spam
itself).
__pre_spam should be completely invisible and unobtrusive
I am unaware
On Dec 9, 6:12 pm, Vinay Sajip wrote:
> Some changes are being proposed to how logging works in default
> configurations.
>
> Briefly - when a logging event occurs which needs to be output to some
> log, the behaviour of the logging package when no explicit logging
> configuration is provided will
On Wed, Dec 15, 2010 at 5:04 AM, kirby.ur...@gmail.com
wrote:
>
> This is an idea I got thinking about COM objects, and getting
> some support from Mark Hammond, Python's Win32 wizard.
>
> The goal is to have a host language (not Python) instantiate
> an object that runs against the Python interpr
On Dec 14, 8:57 am, "D'Arcy J.M. Cain" wrote:
> On Tue, 14 Dec 2010 07:35:45 -0800 (PST)
>
> baloan wrote:
> > Unfortunately you use command('cp...') to copy the file instead of
> > Pythons portable library methods. This choice
> > effectively makes your program work on Unix only (not Windows).
>
On Dec 14, 8:57 am, "D'Arcy J.M. Cain" wrote:
> On Tue, 14 Dec 2010 07:35:45 -0800 (PST)
>
> baloan wrote:
> > Unfortunately you use command('cp...') to copy the file instead of
> > Pythons portable library methods. This choice
> > effectively makes your program work on Unix only (not Windows).
>
On Tue, Dec 14, 2010 at 8:10 PM, Kushal Kumaran
wrote:
<< snip >>
>>
>> In this design pattern, you have something like a dry cleaner's,
>> where people submit jobs at the counter, and go away right
>> away with a ticket (Python returns -- but keeps running). When
>> they come back is more up t
"News Wombat" wrote in message
news:413f5a8f-69a0-4351-acc2-18d7edda8...@j3g2000vbp.googlegroups.com...
On Dec 11, 12:59 pm, MrJean1 wrote:
> In general, for shared libraries, you need to define those first as
> prototype using ctypes.CFUNCTYPE() and then instantiate each prototype
> once supp
Hi Experts,
I am still struggling with handling output generated after execution of
command/script on host unix machine using windows client machine
ssh code :
import sys
import datetime
import time
# setup logging
paramiko.util.log_to_file('darshak_simple.log')
ssh=paramiko.SSHClient()
ssh.set
47 matches
Mail list logo