QOTW: Those who show promise can advance to our Winter Improve Python to
Expert program, for an additional fee, and, be given expert tutoring to help
you gain our exemplary A.R.S.E./W.I.P.E certification which is guaranteed to
attract certain types of employers by its name alone. - Paddy3118
Hi all,
just would like to say that most of the parallel port preexistant code is
usually blinking leds,
which is the not the true reprsentation of the paralle port behaviour. Here
one needs to
think that data is coming out byte after byte. Now plz look out for the
sequence to
push data byte
En Thu, 02 Apr 2009 09:35:53 -0300, arve.knud...@gmail.com
arve.knud...@gmail.com escribió:
I can't seem to get complete tracebacks when modules imported from zip
archives raise exceptions. [...]
As you can see, the code for each stack entry is omitted. Is this
normal??
A known problem, at
En Mon, 06 Apr 2009 13:58:12 -0300, Roberto Fichera ker...@tekno-soft.it
escribió:
I've embedded python v2.6.x engine into my application without any
problem.
Now I would like to inject some additional functions after importing a
python module.
So, basically I'm importing a python module
In message mailman.3480.1239112765.11746.python-l...@python.org, Support
Desk wrote:
You could do something like below to get the rendered page.
Import os
site = 'website.com'
X = os.popen('lynx --dump %s' % site).readlines()
I wonder how easy it would be to get the page image in SVG
import os
ch = os.system(import -window root temp.png)
print ch
after that no way to store the screen shot
regards
Prakash
On Mon, Apr 6, 2009 at 10:28 PM, Roberto Fichera ker...@tekno-soft.itwrote:
Hi All in the list,
I've embedded python v2.6.x engine into my application without any
It started with this error message... TypeError: object cannot be
used as an index
foo = {}
someObject = someClass()
foo[someObject] = hello
Obviously, there are some known reasons why objects may not be
indexes, such as if they are not hashable (as in the case of lists).
However, I'm not
On Apr 6, 10:37 am, grkunt...@gmail.com wrote:
I am considering teaching an introduction to programming
course for continuing education adults at a local community
college. These would people with no programming experience,
but I will require a reasonable facility with computers.
What would
import _tkinter
import Tkinter
Tkinter._test
function _test at 0x0265D430
--
http://mail.python.org/mailman/listinfo/python-list
G'day All
I was following the instructions (listed at bottom of post) from the
PythonInfo Wiki which says to run three tests.
I ran the tests and test 1 and 2 worked
Test 3 gave me an error - function _test at 0x0265D430
can anyone help ???
Tks in advance
Pete
import _tkinter
import
On Wed, Apr 8, 2009 at 1:15 AM, Eclipse pnsm...@gmail.com wrote:
import _tkinter
import Tkinter
Tkinter._test
function _test at 0x0265D430
That last input line should be:
Tkinter._test()
Note the parens, which do matter (Python != Ruby/Smalltalk). Try again
and see if you get an actual
On Apr 8, 1:20 pm, Eclipse pnsm...@gmail.com wrote:
G'day All
I was following the instructions (listed at bottom of post) from the
PythonInfo Wiki which says to run three tests.
I ran the tests and test 1 and 2 worked
Test 3 gave me an error - function _test at 0x0265D430
can anyone help
On 07 Apr 2009 02:05:59 GMT
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
The demuxer can't be an iterator, since it needs to run through the
entire collection.
Then your demuxer obviously cannot handle infinite sequences.
def demux(it, n):
collectors = [[] for i in
tleeuwenb...@gmail.com wrote:
It started with this error message... TypeError: object cannot be
used as an index
foo = {}
someObject = someClass()
foo[someObject] = hello
interpreted or used?
If the former, 'foo' may be a list rather than a dict, and someClass a
classic class:
class
Hello
I'd like to go through a list of e-mail addresses, and extract those
that belong to well-known ISP's. For some reason I can't figure out,
Python shows the whole list instead of just e-mails that match:
=== script
test = t...@gmail.com
isp = [gmail.com, yahoo.com]
for item in isp:
Gilles Ganault wrote:
test = t...@gmail.com
isp = [gmail.com, yahoo.com]
for item in isp:
if test.find(item):
print item
=== output
gmail.com
yahoo.com
===
Any idea why I'm also getting yahoo.com?
find() returns the index where it is found or -1 if it is not found. Both an
On Wed, 2009-04-08 at 12:01 +0200, Peter Otten wrote:
Gilles Ganault wrote:
I'd like to go through a list of e-mail addresses, and extract those
that belong to well-known ISP's. For some reason I can't figure out,
Python shows the whole list instead of just e-mails that match:
Gilles Ganault nos...@nospam.com writes:
I'd like to go through a list of e-mail addresses, and extract those
that belong to well-known ISP's. For some reason I can't figure out,
Python shows the whole list instead of just e-mails that match:
=== script
test = t...@gmail.com
isp =
Carl Banks pavlovevide...@gmail.com (CB) wrote:
CB On Apr 6, 2:23 pm, Diez B. Roggisch de...@nospam.web.de wrote:
This is a classical synchronization problem with a classical solution:
You treat the readers as a group, and the writers individually. So you
have a write lock that each writer
Gilles Ganault wrote:
Hello
I'd like to go through a list of e-mail addresses, and extract those
that belong to well-known ISP's. For some reason I can't figure out,
Python shows the whole list instead of just e-mails that match:
=== script
test = t...@gmail.com
isp = [gmail.com,
Remeber the return value of find function of a string is -1 when it
fails, which is True.
Try:
for item in isp:
if item in test:
print item
From: Gilles Ganault nos...@nospam.com
Date: April 8, 2009 5:56:34 PM CST
To: python-list@python.org
Subject: Why does Python show
In message
8e3d0032-5e9f-44c2-9380-1d2383552...@u5g2000vbc.googlegroups.com,
grkunt...@gmail.com wrote:
I am considering teaching an introduction to programming course for
continuing education adults at a local community college. These would
people with no programming experience, but I will
Gilles Ganault wrote:
I'd like to go through a list of e-mail addresses, and extract those
that belong to well-known ISP's. For some reason I can't figure out,
Python shows the whole list instead of just e-mails that match:
=== script
test = t...@gmail.com
isp = [gmail.com, yahoo.com]
tleeuwenb...@gmail.com tleeuwenb...@gmail.com (tc) wrote:
tc What, exactly, needs to be in place for an object to be a valid
tc dictionary key?
It must have __hash__ and __cmp__ or __eq__ methods. Newstyle classes
inherit these from object.
--
Piet van Oostrum p...@cs.uu.nl
URL:
Here's a tricky case that doesn't show up in your example:
In each case above, the directory names are distinct.
how about:
['/desk', '/desk/ethanallen', '/desk/ikea',
'/desktop', /desktop/pc', '/desktop/mac']
Should the answer be ['/desk'] or ['/desk', '/desktop'] ?
Hi Scott
good point.
On Wed, 08 Apr 2009 12:11:55 +0200, Ulrich Eckhardt
eckha...@satorlaser.com wrote:
find() returns the index where it is found or -1 if it is not found. Both an
index0 or a -1 evaluate to True when used as conditional expression.
Thanks everyone. I shouldn't have assumed that if test.find(item):
QOTW: Those who show promise can advance to our Winter Improve Python to
Expert program, for an additional fee, and, be given expert tutoring to help
you gain our exemplary A.R.S.E./W.I.P.E certification which is guaranteed to
attract certain types of employers by its name alone. - Paddy3118
Gilles Ganault wrote:
On Wed, 08 Apr 2009 12:11:55 +0200, Ulrich Eckhardt
eckha...@satorlaser.com wrote:
find() returns the index where it is found or -1 if it is not found. Both
an
index0 or a -1 evaluate to True when used as conditional expression.
Thanks everyone. I shouldn't have assumed
On Apr 7, 1:08 pm, akineko akin...@gmail.com wrote:
Hello everyone,
I'm trying to use named pipes to fuse a Python program and a C
program.
One side creates pipes using os.mkfifo() and both sides use the same
named pipes (one side reads, another side writes). The read side uses
Sorin Schwimmer sx...@yahoo.com wrote:
I wanted to replace my old Python 2.4 and tcl/tk 8.4 with tcl/tk 8.5.6 and
Python 2.6, mainly so that I can enjoy ttk. tcl/tk was installed from sources
without any problem, I started a wish and worked.
Now, for the Python, here are all the issues
Hello,
Anyone using Python for coding up genetic algorithms? If
so, would you share your favorite modules/libraries/tools?
Thanks,
Esmail
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-04-08, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
ClientForm.Control = FancyControl
ClientForm.CheckboxControl = FancyCheckboxControl
That would work -- but there are probably 8 or 10 different
Control subclasses. It's a bit tedious mixing them all one at a
time, and
On 2009-04-08, Gabriel Genellina gagsl-...@yahoo.com.ar wrote:
class Mixin: # or class Mixin(object) if new-style:
def __eq__(self, other):
return (self.type == other.type ...
def __ne__(self, other):
return not self.__eq__(other)
class
On Apr 7, 3:18 pm, Adam Olsen rha...@gmail.com wrote:
On Apr 6, 3:02 pm, George Sakkis george.sak...@gmail.com wrote:
For example, it is common for a function f(x) to expect x to be simply
iterable, without caring of its exact type. Is it ok though for f to
return a list for some
Never mind (at least tentatively).
Later in the day I got an email from the publisher,
saying they're going to send me a corrected copy
free.
Evidently if you get a bad copy you don't have to complain
to the publisher or the retailer, you just have to post
a complaint somewhere where Google can
pataphor wrote:
On 07 Apr 2009 02:05:59 GMT
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
The demuxer can't be an iterator, since it needs to run through the
entire collection.
Then your demuxer obviously cannot handle infinite sequences.
def demux(it, n):
Hello,
I'm trying to implement something very simple without using a Python
WebFramework and I need some advice. I want to send a comma delimited string
from the client to a server-side Python script. My initial plan was to use a
JavaScript function (see below) called makerequest that creates a
On Apr 5, 12:24 pm, a...@pythoncraft.com (Aahz) wrote:
[posted e-mailed, please respond on-group]
There was some problem with the CGIXMLRPCRequestHandler code in the
SimpleXMLRPC Server.
It was not getting the length to read from the CONTENT_LENGTH
environement variable ( as it the CGI server
I have done something in this direction. I will be happy to share my
experience. However, my code is not generic and needs many things to be
manually introduced. My GA is standard (selection by roulette wheel or
tournament, single point cross). Let me know if you are interested!
On Wed, Apr 8,
Thanks for the pointers.
Here are some answers:
Ok, so DBM wasn't built because it couldn't find the external symbol
'dbm_firstkey'. I have no idea off the top of my head why that would
happen, but I don't think you really care at the moment since you are
trying to get tkinter working. If
On Apr 7, 1:44 pm, Tim Chase python.l...@tim.thechases.com wrote:
f = urllib.urlopen(http://www.google.com;)
s = f.read()
It is working, but it's returning the source of the page. Is there anyway I
can get almost a screen capture of the page?
This is the job of a browser -- to render
Jim Garrison wrote:
Ye Liu wrote:
On Apr 6, 6:33 pm, Jim Garrison j...@acm.org wrote:
I notice the online docs (at docs.python.org/3.0/index.html) were
updated today. It seems some of the top-level pages, like
Tutorial, Using Python, Language Reference are truncated
after the first few
Hello Mohammed,
Yes, that would great. While I am comfortable with GAs,
I'm still rather inexperienced with Python so seeing some
implementation examples would be very useful.
Thanks,
Esmail
--
Date: Wed, 8 Apr 2009 17:08:48 +0200
Subject: Re: genetic algorithms in Python?
From:
Hi everybody,
I have a data structure (a tree) that has one constraint: I can only store
strings in this data structure.
To know if an object foo already exists in memory, I store str(id(foo)) in
the data structure.
OK.
But how do I get a usable reference from the id value?
For example, if foo
I'm trying to use difflib to compare strings ignoring changes
to white-space (space/tab). According to the doc page, you can
do this by specifying a charjunk parameter to filter out
characters:
charjunk: A function that accepts a character (a string of
length 1), and returns if the
Hi,
This will be a very simple question to ask all the awesome programmers
here:
How can I get answer in in decimals for such a math operator:
3/2
I get 1. I want to get 1.5
Thanks in advance,
Avi
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Apr 8, 2009 at 9:03 AM, Avi avinashr...@gmail.com wrote:
Hi,
This will be a very simple question to ask all the awesome programmers
here:
How can I get answer in in decimals for such a math operator:
3/2
I get 1. I want to get 1.5
Add the following line to the top of your
But how do I get a usable reference from the id value?
For example, if foo has a method bar(), how can I call foo.bar()
from str(id(foo)) (say, 149466208).
can you just use a weakref instead? It is certainly cleaner than
trying to store id's,
since an id is only guaranteed to be unique for the
TP wrote:
Hi everybody,
I have a data structure (a tree) that has one constraint: I can only store
strings in this data structure.
To know if an object foo already exists in memory, I store str(id(foo)) in
the data structure.
OK.
But how do I get a usable reference from the id value?
For
TP wrote:
Hi everybody,
I have a data structure (a tree) that has one constraint: I can only store
strings in this data structure.
To know if an object foo already exists in memory, I store str(id(foo)) in
the data structure.
OK.
But how do I get a usable reference from the id value?
For
On 2009-04-08, Grant Edwards inva...@invalid wrote:
I'm trying to use difflib to compare strings ignoring changes
to white-space (space/tab). According to the doc page, you
can do this by specifying a charjunk parameter to filter out
characters:
charjunk: A function that accepts a
Avi wrote:
Hi,
This will be a very simple question to ask all the awesome programmers
here:
How can I get answer in in decimals for such a math operator:
3/2
I get 1. I want to get 1.5
You don't say which python-version you have. Depending on that, the answer
is different.
In
snip
You could create a dict with the string as the key and the object as the
value.
/snip
This will create a strong reference to the object, which is (I'm
assuming) undesired behavior.
--
http://mail.python.org/mailman/listinfo/python-list
Esmail esmail...@gmail.com wrote:
Hello Mohammed,
Yes, that would great. While I am comfortable with GAs,
I'm still rather inexperienced with Python so seeing some
implementation examples would be very useful.
A google for 'python genetic algorithms' turns up a number
of interesting hits.
Jim Garrison j...@acm.org
Jim Garrison wrote:
Ye Liu wrote:
On Apr 6, 6:33 pm, Jim Garrison j...@acm.org wrote:
I notice the online docs (at docs.python.org/3.0/index.html) were
updated today. It seems some of the top-level pages, like
Tutorial, Using Python, Language Reference are
MRAB wrote:
You could create a dict with the string as the key and the object as the
value.
Thanks. But it implies an additional data structure: a dictionnary.
I don't know what is the best:
* using an additional dict and maintaining it
* or using the di module proposed by CTO
If di is
In python2.6 and 3.x, the new behavior is standard.
Apparently that is nonsense - it seems to be not standard for 2.6. Which
Makes sense I guess.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
I don't know what is the best:
* using an additional dict and maintaining it
It works, but as you say, is somewhat inelegant.
* or using the di module proposed by CTO
Let me be clear: I am not proposing that you use it. It *does* do what
you
ask- but what you are asking is, all by itself,
Complete newbie, so forgive my improper use of Python terminology.
I am working with Django and I have to send off a number of emails
after a person has filled out a form. What I want is to make a call
that goes off to form and send the emails and redirect the user to
another view. I have this
On Apr 7, 11:39 pm, Lawrence D'Oliveiro l...@geek-
central.gen.new_zealand wrote:
In message mailman.3514.1239161591.11746.python-l...@python.org, Steve
Holden wrote:
Lawrence D'Oliveiro wrote:
In message 7dd228af-
e549-444d-8623-11e951851...@y9g2000yqg.googlegroups.com, janus99 wrote:
Correction: the UserString will be dead on the final line. When I
typed
it in I had a strong reference still hanging around.
--
http://mail.python.org/mailman/listinfo/python-list
Stef Mientki wrote:
Baris Demir wrote:
Hi all,
I need to develop a GUI for some scientific data processing
operations and this GUI should work well with a 3D plotting module,
also with NumPy and SciPy for sure. I made a search about packages
but, there are plenty of these modules available.
Avi wrote:
Hi,
This will be a very simple question to ask all the awesome programmers
here:
How can I get answer in in decimals for such a math operator:
3/2
I get 1. I want to get 1.5
Thanks in advance,
Avi
I'm going to assume your operands are variables instead of numeric
Sorin Schwimmer sx...@yahoo.com wrote:
Thanks for the pointers.
Here are some answers:
Ok, so DBM wasn't built because it couldn't find the external symbol
'dbm_firstkey'. I have no idea off the top of my head why that would
happen, but I don't think you really care at the moment
Grant Edwards inva...@invalid wrote:
Apparently that filtering out characters doesn't mean that
they're ignored when doing the comparison. (A bit of a WTF?
if you ask me). After some more googling, it appears that I'm
far from the first person who interpreted filtered out as
ignored when
On Wed, 08 Apr 2009 10:51:19 -0400
Neal Becker ndbeck...@gmail.com wrote:
What was wrong with this one?
def demux(iterable, n):
return tuple(islice(it, i, None, n) for (i, it) in
enumerate(tee(iterable, n)))
Nothing much, I only noticed after posting that this one handles
infinite
Baris Demir wrote:
Stef Mientki wrote:
Baris Demir wrote:
Hi all,
I need to develop a GUI for some scientific data processing
operations and this GUI should work well with a 3D plotting module,
also with NumPy and SciPy for sure. I made a search about packages
but, there are plenty of
TP wrote:
If di is reliable, it seems a good solution for my initial constraint
which is the impossibility to store anything but strings in my data
structure.
'di' is dangerous and not reliable. When the original object is freed,
then the memory address may be used by another Python object,
Hi,
joeygartin wrote:
Complete newbie, so forgive my improper use of Python terminology.
I am working with Django and I have to send off a number of emails
after a person has filled out a form. What I want is to make a call
that goes off to form and send the emails and redirect the user to
Anyway, this person also posted on mod_python list. One of the things
I highlighted there was that mod_python for some configurations is
multithreaded and as such they may not be properly protecting
variables if they are storing them at global scope. They haven't
responded to any comments
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote in message
news:grhq75$eb...@lust.ihug.co.nz...
I thought that a good introduction might be to show them how HTML works, and
progress from there to embedding little bits of JavaScript.
Nothing to do with Python I know, but might be a
There are a number of things which I have been used
to doing in other OO languages which I have not yet
figured out how to do in Python, the most important
of which is passing method names as args and inserting
them into method calls. Here are two cases I have been
trying to figure out for a
On Wed, 2009-04-08 at 19:47 +0100, Dale Amon wrote:
There are a number of things which I have been used
to doing in other OO languages which I have not yet
figured out how to do in Python, the most important
of which is passing method names as args and inserting
them into method calls. Here
Dale Amon schrieb:
There are a number of things which I have been used
to doing in other OO languages which I have not yet
figured out how to do in Python, the most important
of which is passing method names as args and inserting
them into method calls. Here are two cases I have been
trying to
On Wed, Apr 08, 2009 at 09:03:00PM +0200, paul wrote:
I'd say you can use:
Thanks. I could hardly ask for a faster response on a
HowTo than this!
signature.asc
Description: Digital signature
--
http://mail.python.org/mailman/listinfo/python-list
I taught myself Python from Python Programming for the Absolute
Beginner by Michael Dawson (which has been mentioned above) and with
lots of help from the friendly members of this group, but there's now
a free e-book titled Snake Wrangling for Kids by Jason Briggs. You can
view it at
I see how it avoids needing to look at the parent node in general, but
if we were compiling by recursively descending through the AST, then
we would know whether Name's would be loads or stores by the time we
got to them (we would already had to have visited an encompassing
assignment or
hello
i recently tried out this new version of psyco...
http://www.voidspace.org.uk/python/weblog/arch_d7_2009_03_14.shtml#e1063
...because of the new support for generators. the above link says To
use and test generators, create preferences.py, following the
instructions in setup.py -
In article 637028a0-58b9-4912-896d-2b17e1341...@q16g2000yqg.googlegroups.com,
joeygartin joeygar...@gmail.com wrote:
I am working with Django and I have to send off a number of emails
after a person has filled out a form. What I want is to make a call
that goes off to form and send the emails
On Wed, Apr 8, 2009 at 11:28 AM, Jim Garrison j...@acm.org wrote:
Jim Garrison wrote:
Ye Liu wrote:
On Apr 6, 6:33 pm, Jim Garrison j...@acm.org wrote:
I notice the online docs (at docs.python.org/3.0/index.html) were
updated today. It seems some of the top-level pages, like
Tutorial,
Cameron Simpson c...@zip.com.au wrote:
On 07Apr2009 10:08, akineko akin...@gmail.com wrote:
| I'm trying to use named pipes to fuse a Python program and a C
| program.
| One side creates pipes using os.mkfifo() and both sides use the same
| named pipes (one side reads, another side writes). The
Hello again,
/usr/local/lib is in /etc/ld.so.conf. The files are real. However,
creating symlinks in /usr/lib targeting the libraries in /usr/local/lib,
then recompiling, solved the tkinter problem. So, the conclusion is that
only /usr/lib is consulted for the tcl/tk libraries.
multiprocessing
On Mon, 06 Apr 2009 07:37:19 -0700, grkuntzmd wrote:
What would be a good book to use as the text for the course?
Python Programming: An Introduction to Computer Science
Franklin, Beedle Associates, by little Johny Zelle.
Accept no substitues!
Jim
--
On Wed, 2009-04-08 at 01:57 +0100, Rhodri James wrote:
On Tue, 07 Apr 2009 12:46:18 +0100, J. Clifford Dyer
j...@sdf.lonestar.org wrote:
On Mon, 2009-04-06 at 23:41 +0100, Rhodri James wrote:
On Mon, 06 Apr 2009 23:12:14 +0100, Anish Chapagain
anishchapag...@gmail.com wrote:
Hi,
HIi everyone.
i was using python/c api to call a python function from c and I know the
name of the function which i want to call.Is there any way to do that??
This is the method i tried...
for eg:This is the python function i wants to call.
def add(x):
... return x+10
This is my code in
On Wed, Apr 8, 2009 at 1:21 PM, pataphor wrote:
On Wed, 08 Apr 2009 10:51:19 -0400 Neal Becker wrote:
What was wrong with this one?
def demux(iterable, n):
return tuple(islice(it, i, None, n) for (i, it) in
enumerate(tee(iterable, n)))
Nothing much, I only noticed after posting that
So I'm trying to see whats the cleanest way to do this:
I have a
checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y,
either both on one)
allist = [a,b,c,]
xlist = [x, y, ..]
now I wanna loop through alist and xlist and see if the combination
exists in checklist
so
Hi everybody,
I'm doing some experiments with the python 3.0 C API, and I'm having
some problems for obtaining character strings. In python 2.X APIs, a
function called PyString_AsString was available. This function
provided a C string (char*) given a PyObject. But, in python 3.0 API
there is no
Esmail wrote:
Hello,
Anyone using Python for coding up genetic algorithms? If
so, would you share your favorite modules/libraries/tools?
Search 'Python genetic algorithm' on Google or elsewhere.
--
http://mail.python.org/mailman/listinfo/python-list
R. David Murray wrote:
Esmail esmail...@gmail.com wrote:
Hello Mohammed,
Yes, that would great. While I am comfortable with GAs,
I'm still rather inexperienced with Python so seeing some
implementation examples would be very useful.
A google for 'python genetic algorithms' turns up a number
Terry Reedy wrote:
Esmail wrote:
Hello,
Anyone using Python for coding up genetic algorithms? If
so, would you share your favorite modules/libraries/tools?
Search 'Python genetic algorithm' on Google or elsewhere.
Hi Terry,
I did that first, and I came up with a number of hits. The
PyObject* key = PyList_GetItem(moduleKeys,idx);
PyObject* module = PyDict_GetItem( interp-modules, key );
char* theKeyName =
PySys_WriteStdout(Module '%s'\n, theKeyName);
}
I was not able to obtain theKeyName, knowing that the key PyObject
is in fact
PK wrote:
So I'm trying to see whats the cleanest way to do this:
I have a
checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y,
either both on one)
Since you will be repeatedly looking for items in checklist, I suggest
making it a set instead.
allist = [a,b,c,]
[Miles]
I assume that smallish values of n refers to the fact that
itertools.tee places items into every generator's internal deque,
which islice then skips over, whereas your version places items only
into the deque of the generator that needs it.
The pure python equivalent listed in the
Sorry but it did not help... I tried this:
PyObject* key = PyList_GetItem(moduleKeys,idx);
char* theKeyName = PyUnicode_AsUTF8String( key );
And this, just in case:
PyObject* key = PyList_GetItem(moduleKeys,idx);
char* theKeyName = PyUnicode_AsUTF8String(
The issue is that all PyUnicode* functions are returning PyObjects.
PyString_AsString return value was char*. Is there any real equivalent
of this function?
Ah, right. PyString_AsUTF8String returns a bytes object, to which you
need to apply PyBytes_AsString to. At the end, you need to decref
On Apr 8, 2:15 pm, PK superp...@gmail.com wrote:
So I'm trying to see whats the cleanest way to do this:
I have a
checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y,
either both on one)
allist = [a,b,c,]
xlist = [x, y, ..]
now I wanna loop through alist and xlist
Thank you very much for your help Martin, now I got it.
Cheers,
RC
On 9 abr, 00:05, Martin v. Löwis mar...@v.loewis.de wrote:
The issue is that all PyUnicode* functions are returning PyObjects.
PyString_AsString return value was char*. Is there any real equivalent
of this function?
Ah,
Hello,
I'm trying to do compression/decompression of stuff with zlib, and I
just don't get it...
Here is an example. I assume that dec should be a, but it isn't. dec
turns out to be an empty string, and I don't understand why...
===
import zlib
compressor =
Quoting PK superp...@gmail.com:
So I'm trying to see whats the cleanest way to do this:
I have a
checklist = [ax, bx, by, cy ..] (a combination of a,b,c with x and y,
either both on one)
allist = [a,b,c,]
xlist = [x, y, ..]
[...]
now the problem is I want to include alpha in
1 - 100 of 148 matches
Mail list logo