On Aug 15, 3:42 pm, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > IOW, there is currently no recommended way to do *anything* with
> > annotations(**). That is entirely left up to users and third-party
> > packages, and the PEP goes out of its way to disclaim all author
akonsu wrote:
hello,
i need to add properties to instances dynamically during run time.
this is because their names are determined by the database contents.
so far i found a way to add methods on demand:
class A(object) :
def __getattr__(self, name) :
if name == 'test' :
On Aug 17, 12:35 am, Michael Torrie <[EMAIL PROTECTED]> wrote:
> However it's not necessary in python to do any of this, since you can
> define nested functions that have access to the parent scope. Anytime
> you need to clean up, just call the nested cleanup function and then return.
That is unn
On Aug 16, 5:20Â pm, castironpi <[EMAIL PROTECTED]> wrote:
> On Aug 16, 4:42Â pm, "Michel Claveau - NoSpam SVP ; merci"
>
> <[EMAIL PROTECTED]> wrote:
> > Hi!
>
> > I use mmap for interchange data between Python & Autoit. Â For that, I
> > use (Autoit's side) a little DLL.
> > This DLL can, perhaps
Michael Torrie wrote:
> I think the most direct translation would be this:
Nevermind I forgot about the while loop and continuing on after it.
Guess the function doesn't quite fit this use case after all.
--
http://mail.python.org/mailman/listinfo/python-list
Kurien Mathew wrote:
> Hello,
>
> Any suggestions on a good python equivalent for the following C code:
>
> while (loopCondition)
> {
> if (condition1)
> goto next;
> if (condition2)
> goto next;
> if (condition3)
> goto next;
> st
Dennis Lee Bieber wrote:
> Nasty code even for C... I've never used goto in C... Options:
> convert the statements of next into a function, and put in an else
> clause...
I think the parent post's pseudocode example was too simple to show the
real benefits and use cases of goto in C. Obviou
On Aug 16, 11:37 pm, sapsi <[EMAIL PROTECTED]> wrote:
> Hello,
> Below is a small class using ctypes and libspectre to read a
> postscript file.
> My program is a PyQT 4.4 application and when the user clicks on a
> entry in a QTableWidget, i run
>
> PostScriptImage( filename_as_contained_in_click
Hello,
Below is a small class using ctypes and libspectre to read a
postscript file.
My program is a PyQT 4.4 application and when the user clicks on a
entry in a QTableWidget, i run
PostScriptImage( filename_as_contained_in_clicked_tableWidgetItem )
However on i get a segfault while trying docum
On Aug 16, 11:20 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> sapsi wrote:
>
> [please don't top-post]
>
>
>
> > Thank you for the tip, you're absolutely right.I;m getting an
> > exception that the name must not be null. However, this is some debug
> > output
> > --- logging.debug(" %s %s %s" % (
Martijn Lievaart wrote:
On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
Actually, I was thinking of the 1401. But both the 1620 and the 1401
(without the optional Advanced Programming Feature) share the basic
omission of any instruction that could do call-and-return without
hard-codin
akonsu wrote:
i am not an expert in python, would someone please tell me what i am
doing wrong?
You can't add properties to an instance. They must be specified on the
type (aka new style class). Descriptors and magic methods are only
looked up on classes for various reasons - mostly performan
hello,
i need to add properties to instances dynamically during run time.
this is because their names are determined by the database contents.
so far i found a way to add methods on demand:
class A(object) :
def __getattr__(self, name) :
if name == 'test' :
def f() : retur
On Aug 16, 4:42Â pm, "Michel Claveau - NoSpam SVP ; merci"
<[EMAIL PROTECTED]> wrote:
> Hi!
>
> I use mmap for interchange data between Python & Autoit. Â For that, I
> use (Autoit's side) a little DLL.
> This DLL can, perhaps, be used with ctypes.
>
> @-salutations
> --
> Michel Claveau
Say more-
On Thu, 14 Aug 2008 18:33:30 -0400, John W Kennedy wrote:
> Actually, I was thinking of the 1401. But both the 1620 and the 1401
> (without the optional Advanced Programming Feature) share the basic
> omission of any instruction that could do call-and-return without
> hard-coding an adcon with the
Hi!
I use mmap for interchange data between Python & Autoit. For that, I
use (Autoit's side) a little DLL.
This DLL can, perhaps, be used with ctypes.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Kurien Mathew wrote:
Hello,
Any suggestions on a good python equivalent for the following C code:
There are various ways to write your example in Python. For example
while loopCondition:
condition = 1
while condition:
if condition1:
break
if condition2:
Kurien Mathew schrieb:
Any suggestions on a good python equivalent for the following C code:
while (loopCondition)
{
if (condition1)
goto next;
if (condition2)
goto next;
if (condition3)
goto next;
stmt1;
stmt2;
next:
stmt3;
stmt4;
}
while
Kurien Mathew wrote:
Any suggestions on a good python equivalent for the following C code:
while (loopCondition)
{
if (condition1)
goto next;
if (condition2)
goto next;
if (condition3)
goto next;
stmt1;
stmt2;
next:
stmt3;
stmt4;
}
seems as
On Sat, 16 Aug 2008 23:20:52 +0200, Kurien Mathew <[EMAIL PROTECTED]> wrote:
Hello,
Any suggestions on a good python equivalent for the following C code:
while (loopCondition)
{
if (condition1)
goto next;
if (condition2)
goto next;
if (con
Hello,
Any suggestions on a good python equivalent for the following C code:
while (loopCondition)
{
if (condition1)
goto next;
if (condition2)
goto next;
if (condition3)
goto next;
stmt1;
stmt2;
next:
On Fri, 15 Aug 2008 17:48:39 + (UTC), Brian Victor
<[EMAIL PROTECTED]> wrote:
>Ivan Reborin wrote:
>> win.Show
>
>This line isn't doing anything. It needs to be:
>win.Show() # note the parentheses
Yes, that was the problem. I must've been tired while writing it, for
I haven't noticed it aft
has anyone completed python for the absolute beginner ?
chapter 7 in the book the trivia_challenge.py file does not work correctly and
does not display all the correct questions - and even though the answer is
correct it will still state the answer is wrong. this file is from the CD i
have not
Hi all,
I have a mmap and a data structure in it. I know the structure's
location in the mmap and what structure it is. It has a ctypes
definition.
I want to initialize a ctypes object to point to a part of the mmap.
Here is my attempt:
>>> b
>>> c= ctypes.pointer( b )
Traceback (most recent
Hi,
If you have struct defined in .h file then it's ok or can dea easyily
with struct written with .i file,
in .h file,
struct def
{
int a;
char name[10];
};
can be referenced as
>>strvar=new_def() //now strvar is y
In article <[EMAIL PROTECTED]>,
Ivan Reborin <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm new to python, new as newbies get, so please, don't take wrongly
> if this seems like a stupid or overly simple question.
>
> I'm going through examples in a book I have ("Beginning python", by
> Hetlan
sapsi wrote:
[please don't top-post]
> Thank you for the tip, you're absolutely right.I;m getting an
> exception that the name must not be null. However, this is some debug
> output
> --- logging.debug(" %s %s %s" % (vdbname, foldername,where_query))
> OUTPUT: TestVDB test_b title regexp 'tit'
On Aug 16, 4:02 pm, Maric Michaud <[EMAIL PROTECTED]> wrote:
> I'd say that everywhere exec/eval are used in a application/function/lib that
> doesn't mean to interpret arbitrary and user provided python code, it is a
> bad usage
Problem is, there are things you cannot do without
exec/eval: for in
On Aug 16, 3:25 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Aug 16, 12:50 am, Michele Simionato <[EMAIL PROTECTED]>
> wrote:
> > The namedtuple recipe by Raymond Hetting does
> > exactly that and, guess what, it uses exec!
>
> I might be wrong, but the reason namedtuple uses exec is performa
Le Saturday 16 August 2008 06:50:02 Michele Simionato, vous avez écrit :
> On Aug 16, 4:48 am, Nadeem <[EMAIL PROTECTED]> wrote:
> > I understand the 99% rule... the example I gave was to simplify the
> > issue. The full thing I'm working on is a library for an introductory
> > CS class I'm teachin
Nadeem wrote:
I understand that all this can be done with classes and OO
programming, but the whole point of the HtDP curriculum is to
introduce students to programming in a pedagogically-effective way
using a functional approach instead of OO-first.
And yet, one of the HtDP authors just poste
I forgot to mention that i was creating a view just before this i.e
sql="create view %s as %s" % (foldername, query)
# self.cursor.execute(sql)
self.cursor.execute(sql)
Now if i remove this, the insert code works fine.
Regards
Saptarshi
--
http://mail.python.org/mailman/listinfo/pytho
On Aug 16, 12:50 am, Michele Simionato <[EMAIL PROTECTED]>
wrote:
> On Aug 16, 4:48 am, Nadeem <[EMAIL PROTECTED]> wrote:
>
> > I understand the 99% rule... the example I gave was to simplify the
> > issue. The full thing I'm working on is a library for an introductory
> > CS class I'm teaching. I'
On Aug 16, 3:53 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Casey wrote:
> > I'm doing some image processing that requires accessing the individual
> > pixels of the image. I'm using PIL 1.1.6 and creating a 2D array of
> > pixel RGB tuples using the Image class instance load() method.
>
> load
On 16 Aug., 02:21, Rex <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am a Python programmer facing my first small XML project. I am
> looking to find a simple tool to take an XSD file and convert the XSD
> tree structure to another text format (e.g. an adjacency matrix for
> the tree's graph), or conve
Hi,
Thank you for the tip, you're absolutely right.I;m getting an
exception that the name must not be null. However, this is some debug
output
--- logging.debug(" %s %s %s" % (vdbname, foldername,where_query))
OUTPUT: TestVDB test_b title regexp 'tit'
--- print vdbname.__class__,
foldername.__cl
On Aug 16, 3:51 am, Benjamin <[EMAIL PROTECTED]> wrote:
> On Aug 15, 9:21 am, "Paul Wilson" <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all,
>
> > I'd like to be able to do the following to a python source file
> > programmatically:
> > * Read in a source file
> > * Add/Remove/Edit Classes, methods,
Ok, Swig needs the structure to be declared like this :
typedef struct SIn
{
int in1, in2;
} SIn;
Else, it doesn't understand it's a structure... :-S
Now, I can write to it.
I also found out that Swig didn't allow to write to the array :
http://www.swig.org/Doc1.3/SWIG.html#SWIG_nn34 ...
On Saturday 16 August 2008 12:16:14 Fredrik Lundh wrote:
> Ghirai wrote:
> > Using urllib, is there any way i could access some info about the SSL
> > certificate (when opening a https url)?
> >
> > I'm really interested in the fingerprint.
> >
> > I haven't been able to find anything so far.
>
> y
Hello,
I spent almost a week to be able to embed Python within my C++ game
engine.
I wrote a mini-tutorial of what I was able to do so far here :
http://forums.indiegamer.com/showpost.php?p=169352&postcount=9
At the end of my tutorial, I wrote : "You can do the same with C++
classes, and with str
Ghirai wrote:
Using urllib, is there any way i could access some info about the SSL
certificate (when opening a https url)?
I'm really interested in the fingerprint.
I haven't been able to find anything so far.
you can get some info via (undocumented?) attributes on the file handle:
>>> im
has any one out there succeeded in compiling/installing mod_python for apache2
and python 2.5. I am using python 2.5 on cygwin.
thanks in advance
Edwin
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
produc
Hello list,
Using urllib, is there any way i could access some info about the SSL
certificate (when opening a https url)?
I'm really interested in the fingerprint.
I haven't been able to find anything so far.
Any help is appreciated.
--
Regards,
Ghirai.
--
http://mail.python.org/mailman/list
Netcom3™ is a recognized global leader in internet security software.
With Netcom3 Internet Security Suite, it's key focus is on securing
sensitive consumer online interactions, as well as prevent and remove
Spyware, Adware, optimize, fix PC errors, and make your system run
faster and error free. N
Casey wrote:
I'm doing some image processing that requires accessing the individual
pixels of the image. I'm using PIL 1.1.6 and creating a 2D array of
pixel RGB tuples using the Image class instance load() method.
load returns an access object that's attached to the image; to modify
the ima
On Aug 13, 4:14 am, Hussein B <[EMAIL PROTECTED]> wrote:
> Hey,
> I'm a Java/Java EE developer and I'm playing with Python these days.
> I like the Python language so much and I like its communities and the
> Django framework.
> My friends are about to open a Ruby/Rails shop and they are asking me
46 matches
Mail list logo