], [3, 4]]
>>> b
[5, 6]
And I don't understand it. I thought, that b will be a reference to a,
so changing b should change a as well. What do I do wrong. And a
second question - can I create a reference to element of a list of
floating points and use this reference to change t
In the tutorial there is an example iterator class that revesrses the
string given to the constructor. The problem is that this class works
only once, unlike built-in types like string. How to modify it that it
could work several times? I have tried two approaches. They both work,
but which of
hats if you use un*x. If you word under windows, the first would work,
but rather use some IDE like IDLE or SPE than mess with the windows
command line. Then you just load the file and run it from the menu.
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
?
File "mandelimage.py", line 3, in ?
class MandelImage (Image):
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
I am using python 2.4 from the Debian (Sid) packages.
Is it a bug, or am I doing something wrong?
zefciu
--
-BEGI
earth can I create array object in C?
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
uld put the whole loop into c code. But as
before the function returned only one integer at every call, now it
would have to return a rather large array of integers (maybe chars would
be enough).
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Lee Bieber wrote:
> Written properly, all it returns is the address of that array data
> -- there is no massive copying of data..
I know :) That's why I want to know how to write it properly.
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
x27;t
understand why it happens like this.
zefciu
import Tkinter
from mandelpalette import MandelPalette
class MandelSetWindow(Tkinter.Toplevel, object):
"""A dialog window with main fractal settings"""
def __init__(self, settings, callback):
s Open Source.
If you mean hacking as cracking into computer systems, then what's the
difference if it's with Python or anything else.
If you mean hacking as gaining excellency in programming - then why
should it be?
Greets
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
-} make it
C-ish and Perlish.
Frop Python-zen:
Simple is better than complex.
Flat is better than nested.
Sets are good. Sets are fun. Sets are pythonish (the programmer codes
the logical side of a data structure, bothering less 'bout the
technical). I think, they deserve their literal n
{
NULL, NULL, 0, NULL
}
};
PyMODINIT_FUNC initmandelc(void)
{
(void) Py_InitModule ("mandelc", MandelcMethods);
}
int main(int argc, char **argv)
{
Py_SetProgramName(argv[0]);
Py_Initialize();
initmandelc();
return 0;
}
Greets
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
Thinker wrote:
> zefciu wrote:
>>> I am trying to embed a c function in my python script for a first
>>> time. When I try to call it I get an error
>>>
>>> SystemError: new style getargs format but argument is not a tuple
>>>
>>> Guido sa
Thinker wrote:
> It should be "PyObject *coord;" .
> Maybe, it is what is wrong with your program!
>
>
Should it? The gcc shows me a warning then:
warning: 'coord' is used uninitialized in this function
and during the execution I get the same error *pl
isn't. But can
PyArg_ParseTuple be used to tuples other than function arguments? If
not, what should I use?
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
, 1.5), 9, 2.2)
args parsed
coord parsed
ii3
>>> mandelpixel((1.5, 1.5), 9, 2.2)
TypeError: bad argument type for built-in operation
etcaetera (the "args parsed" "coord parsed" and "i" are effect of
printfs in the code, as you see when it fails, it doesn&
orks, but I will of course change it to get the simpler
parenthesised version as in your Example 1.
Great thanks :D
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
hat in fact you are trying to do.
Please provide us with further info - what are you working at?
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
eName are
variables, not literal parts of the string. You should put those names
outside the quotation marks, or better us the % format operator as
Sriram showed
you, or even better use os.path module. Here is the reference:
http://docs.python.org/lib/module-os.path.html
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
performance to the process?
zefciu
--
http://mail.python.org/mailman/listinfo/python-list
19 matches
Mail list logo