s
We will need some more information from you when you come to the numpy list.
Please reduce your problematic code to the smallest, self-contained script that
demonstrates the problem, and post it and the exact output that you get.
--
Robert Kern
"I have come to believe that the whole worl
nately, my Google-fu has not located an actual paper. It might be in here
somewhere:
http://homepages.cwi.nl/~steven/abc/publications.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret i
single call to .split() if you preprocess the string first:
a.replace(',', ' ').split()
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlyi
gt; I'm guessing that the slow part is the fact that I am converting the
> data to character format and writing it one character at a time. What
> is a better way of doing this, or where should I look to find a better way?
data.tostring()
--
Robert Kern
"I have come
[EMAIL PROTECTED] wrote:
> P.S. I felt I just had to tie this into the thread on profanity somehow.
> But notice that I didn't mention nazis or Hitler. ;-)
You did it just now!
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that
robert wrote:
> Is there a ready made function in numpy/scipy to compute the correlation
> y=mx+o of an X and Y fast:
> m, m-err, o, o-err, r-coef,r-coef-err ?
numpy and scipy questions are best asked on their lists, not here. There are a
number of people who know the capabilities of
Robert Kern wrote:
> robert wrote:
>> Is there a ready made function in numpy/scipy to compute the correlation
>> y=mx+o of an X and Y fast:
>> m, m-err, o, o-err, r-coef,r-coef-err ?
> scipy.optimize.leastsq() can be told to return the covariance matrix of the
> es
robert wrote:
> Is there a ready made function in numpy/scipy to compute the correlation
> y=mx+o of an X and Y fast:
> m, m-err, o, o-err, r-coef,r-coef-err ?
And of course, those three parameters are not particularly meaningful together.
If your model is truly "y is a linear re
it's not possible
> to treat a for-loop as an expression (which is what a list
> comprehension requires).
As with all such things, you stick the implementation in a well-named function
and simply call the function everywhere. The implementation never needs to be a
one-liner expression.
Dustan wrote:
> Robert Kern wrote:
>> Dustan wrote:
>>> Fredrik Lundh wrote:
>>>> if you care about writing robust code, why not just use a for-loop,
>>>> and the list extend method?
>>> Because I'm embedding this expression in a list compr
sturlamolden wrote:
> Robert Kern wrote:
>
>> The difference between the two models is that the first places no
>> restrictions
>> on the distribution of x. The second does; both the x and y marginal
>> distributions need to be normal. Under the first model, the cor
robert wrote:
> I remember once I saw somewhere a formula for an error range of the corrcoef.
> but cannot find it anymore.
There is no such thing as "a formula for an error range" in a vacuum like that.
Each formula has a model attached to it. If your data does not follow that
onal preference is that having the colon is more
readable. Yours isn't. That's fine. Debating on that basis, however, is pretty
pointless.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad att
that the colon was missing if the compiler
> didn't point it out, is it really that readable? For me, I tend to get
> annoyed at language "features" that I'm constantly tripping over.
Never.
--
Robert Kern
"I have come to believe that the whole world is an enigm
ility". In library code, never call the functions in the
random module. Always take as an argument a random.Random instance. When
testing, you can seed your own Random instance and all of your numbers will be
the same for every test run.
This kind of design is A Good Thing(TM) outside of unit tes
Hendrik van Rooyen wrote:
> "Robert Kern" <[EMAIL PROTECTED]> wrote:
>
>
>> Michael Hobbs wrote:
>>> True enough. Although, I have to ask how many times you define a new
>>> function only to have Python spit a syntax error out at you saying that
f double,
unsigned int, etc.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Antoon Pardon wrote:
> On 2006-11-15, Robert Kern <[EMAIL PROTECTED]> wrote:
>> Dustan wrote:
>>
>>> 2. While I haven't taken a good look at NumPy, my intuition tells me it
>>> won't work with complex data types, which wouldn't work for me
nd up installing numpy
anyways.
http://numpy.scipy.org
All of the f2py documentation is currently in the source, so start here:
http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/f2py/docs/README.txt
Using f2py to wrap Fortran subroutines is actually a fair bit simpler than
wrapping C c
e avoid Scilab but I'm not
> sure why. If anybody knows the reason I'd be happy to hear it.
I think you just stated it.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret
?
scipy can use FFTW3 as its FFT routines.
http://www.scipy.org
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
htt
ay() is
supposed to be called in the initialization function of the other extension
modules. That will make sure that multiarray is imported and the function
pointers are available for dereferencing.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
cket. In the meantime, the .accumulate() method works
correctly; you can use the last item to get the correct result for .reduce().
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret i
A.M wrote:
> Do we have the conditional expressions in Python 2.4?
No.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto
http://svn.scipy.org/svn/scipy/trunk/Lib/sandbox/montecarlo/
Ask on one of the scipy mailing lists if you need help building it.
http://www.scipy.org/Mailing_Lists
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our ow
map method.
There is documentation on map() about halfway down this page:
http://docs.python.org/lib/built-in-funcs.html
Here's a tutorial which you should read:
http://docs.python.org/tut/tut.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harm
7;t it return the one with the highest index?
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
> Erik Max Francis wrote:
>>Here were the "harsh" and "whining" responses to his question he's
>>complaining about:
>
> Fair enough. Maybe they weren't "harsh" and "whining", just patronising
> and abru
t do matrices, and numarray is deprecated. Please point
new users to numpy, instead.
http://numeric.scipy.org/
Since the OP seems to already be using one of Numeric/numarray/numpy, (given
"a.shape"), I would suggest that he ask the question on the appropriate mailing
list:
https://lists.s
ing with scipy, and the
exact code that causes the crash.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.p
I use python and the pymqi module to work with IBM WebSphere MQSeries
and IBM WebSphere Message broker.
--
http://mail.python.org/mailman/listinfo/python-list
ss.html
It also works in Pythons as old as 2.2, but you'll have to install it
separately. The website for the separate release is down at the moment, but when
it comes back up:
http://www.lysator.liu.se/~astrand/popen5/
--
Robert Kern
"I have come to believe that the whole world is
ess
call(['something', 'or', 'other'])
You need to learn how imports work in Python. Please read the tutorial:
http://docs.python.org/tut/tut.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terri
If I remember correctly, this behavior depends on how the class is
created (classic mode versus modern).
Modern
class foo(object):
pass
Classic ( pre python 2.2 I believe )
class foo():
pass
The modern method of specifying object in the class def
have whipped cream and strawberries on that tort?
:Robert
--
http://mail.python.org/mailman/listinfo/python-list
here:
http://www.scipy.org/History_of_SciPy
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
>is :-(
>
> Not at all! A python list *knows* its length at all times. len() is a
> constant time lookup of an internal attribute.
The point is that you had to create the list in the first place. g is an
iterator.
--
Robert Kern
"I have come to believe that the whole world is
to be
a bug that sounds like this, but it was fixed some time ago. Also, please try to
narrow your program down to the smallest piece of code that runs and still
displays the memory leak.
Thank you.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
t
are best handled on numpy-discussion
rather than comp.lang.python .
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it
Saint Malo wrote:
> I am new to programming, and I've chosen python to start with. I wrote
> a simple program that asks several questions and assings each one of
> them a variable via raw_input command. I then combined all the
> variables into one like this a = b + c + d. After this I wrote these
the ssh feature like
> one does on the command line
>
> ssh [EMAIL PROTECTED] .etc
>
> How can I do this easily ?
http://www.python.org/doc/current/lib/module-subprocess.html
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless e
09, 0.91966, -0.13550388182991072, 0),
(0.874239991, 0.7001, -0.2123048713754, 0)])
>>>
Please copy-and-paste the exact code that you wrote and the exact output.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigm
t;[1, 2, 3, 3]
>>>
>>>set([1, 2, 3])
>>
>>Pylab shadows the built-in set name, which is one of the reasons you
>>should generally use "import XXX" instead of "from XXX import *".
>
> Ahh. Understood. Thank you very much.
It should be n
ill usable, but aren't
being actively developed. There's a pure-Python array package somewhere, but I
forget the name.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though
Hi everyone,
Could someone help explain what I am doing wrong in
this code block?
This code block is an excerpt from a larger file that receives
transmitted files via IBM WebSphere MQSeries an drops it to the local
file system.
Transmission of the file works as designed but it has a flaw.
If th
use arrays as
truth values since the desired meaning (alltrue or sometrue) is ambiguous.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
flat = arange(10)
In [11]: a
Out[11]:
array([[0, 1, 2],
[3, 4, 5]])
In [12]: for i in a.flat:
: print i
:
:
0
1
2
3
4
5
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by ou
6, 0],
[0, 9,10, 828202281, 0],
[7, 0, 0, 0, 0],
[0, 0, 0, 0, 0]])
If you have more complicated needs, we can talk about them on numpy-discussion.
I haven't been keeping up. Is Gadfly still in development?
--
http://mail.python.org/mailman/listinfo/python-list
uate
> Semantic Web courses. Why? Because basically there's nothing else with
> the flexibility and as many web libraries," said Prof. James A.
> Hendler.
>
> rd
Well that Professor has shown his ignorance to the world but not for
choosing Python. : )
Robert
--
http://mail.python.org/mailman/listinfo/python-list
regular byte string, not a Unicode string. The encoding declaration only
controls how the file is parsed. The string literal that you use for FIELDS is
a
regular string literal, not a Unicode string literal, so the object it creates
is an 8-bit byte string. The tuple containment test is attemptin
Mike Currie wrote:
> Can anyone explain why I'm getting an ascii encoding error when I'm trying
> to write out using a UTF-8 encoder?
Please read the Python Unicode HOWTO.
http://www.amk.ca/python/howto/unicode
--
Robert Kern
"I have come to believe that the whole
atter the size.
http://www.scipy.org/NumPy
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
writing.
class Foo(object):
def __init__(self, bar):
self._bar = bar
@property
def bar(self):
return self._bar
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to
Threads/index.shtml
A good event-driven framework for Python is Twisted. It's what I use for the
program I mention above.
http://twistedmatrix.com/trac/
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own m
nts of x can be destroyed.
Notes:
y == rfft(irfft(y)) within numerical accuracy.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth.&quo
Fächer") and a unicode string later (u"Fächer"). But set objects
can't know that that's the problem or even if it *is* a problem.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
Dennis Benzinger wrote:
> Robert Kern wrote:
>> Dennis Benzinger wrote:
>>> Ok, I understand.
>>> But isn't it a (minor) problem that using a set like this:
>>>
>>> # -*- coding: UTF-8 -*-
>>>
>>> FIELDS_SET = set(("Fächer&
[EMAIL PROTECTED] wrote:
> Robert Hicks wrote:
> > I haven't been keeping up. Is Gadfly still in development?
>
> I always find this question a little
> irritating -- gadfly is perfect the
> way it is :). If it ain't broke don't
> fix it. At least u
[EMAIL PROTECTED] wrote:
> Robert Hicks wrote:
> > [EMAIL PROTECTED] wrote:
> > > why are people so concerned
> > > that it's not changing?
> > >
> >
> > I didn't mean to be irritating and I wasn't concerned about it not
>
..,"zzz"]
> blist = ""
> for x in alist:
>blist += x
>
> But is there a cleaner and faster way of doing this?
blist = ''.join(alist)
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terri
David Isaac wrote:
> To access the doc string of a property,
> I have to use the class not an instance.
> Why?
Because getting the attribute from the instance gets the calculated value (the
value returned from the getter function), not the actual property object.
--
Robert Kern
&qu
...:
...:
In [3]: set(d.values())
---
exceptions.TypeError Traceback (most recent
call
last)
/Users/kern/
TypeError: list objects are unhashable
Also, I may need keys to map to different objects that happen to be equal.
--
Robert Kern
"I have come to believe that the w
org/NumPy
> my goal is to somehow define multi-dimensional arrays of strengs...
>>> from numpy import *
>>> a = array([['some', 'strings'],['in an', 'array']], dtype=object)
>>> a
array([[some, strings],
[in an, arr
bruce wrote:
> robert
>
> i did an
> python>>> import numpy
> a = array([['q','a'],['w','e']])
>
> and it didn't work...
>
> i used
> >>from import numpy *
>
> and it seems to accept
Please join us on the numpy mailing list with this information; hopefully there
is someone there with a similar platform who can replicate your bug or offer
better advice than myself.
http://www.scipy.org/Mailing_Lists
In the meantime, you might try compiling a recent SVN checkout of nu
re phase of building python
No. Some 64-bit systems (notably Win64) leave C longs as 32-bit. This is known
as the LLP64 data model.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
1] < a[2]
Out[16]: array([0, 1, 0, 0, 0])
In [17]: bool(_)
Out[17]: True
In [18]: a[2] < a[1]
Out[18]: array([1, 0, 1, 1, 1])
In [19]: bool(_)
Out[19]: True
This makes min(a) incorrect when len(a.shape) > 1. Instead, use the minimum and
maximum ufuncs provided with Numeric:
In [21]: N.m
axis=0)
array([ 0.49892358, 0.11931907, 0.01711571, 0.07494308, 0.04111402])
>>> a.min(axis=1)
array([ 0.07494308, 0.01711571, 0.04111402])
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to in
've said previously in this thread, not all systems work like that.
Specifically, on Win64 sizeof(long) == 32.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an
eeks. Hopefully, we can get to
1.0b2 by the SciPy conference in mid-August. If you've been holding off on
trying numpy, the 1.0 betas will be the perfect time to jump in. It will also
be
your last chance to get your 2 cents in.
--
Robert Kern
"I have come to believe that the whole w
Sheldon wrote:
> Good day everyone,
>
> I would like to know if anyone has a fast and concise way of
> concatenating two 2D arrays of same dimensions?
> Whenever I try:
>
> a = concatenate(b,c)
That is not the correct signature.
a = concatenate((b, c))
--
Robert
at you want. I prefer using dot() on regular arrays, myself.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http:/
tiply() has been deprecated in favor of dot() for
many, many years now even in Numeric, numpy's predecessor. It has finally been
removed in recent versions of numpy.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our
are not matrices. * performs elementwise multiplication. Use
numpy.dot(z, m).
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list
"getopt modules." There's the (old) getopt module and the
(preferred) optparse module in the standard library. optparse really does fill
the niche quite thoroughly.
However, if you like, there's the newcomer argparse that tries to improve upon
optparse in several respects:
http
st developers' perception, it is (not necessarily in
> the absolute sense, but perhaps relative to Django or Turbogears).
> Mind, it doesn't even need to be true, we're talking of perception
> here.
You might be. No one else in the thread is.
--
Robert Kern
"I h
Ray wrote:
> Robert Kern wrote:
>> You might be. No one else in the thread is.
>
> What are you saying? That my perception that RoR is mature is wrong?
No, that the part of your message that I quoted was wrong. Specifically, "we're
talking of perception here." No
Simon Forman wrote:
> Paul Rubin wrote:
>> "EP" <[EMAIL PROTECTED]> writes:
>>> Given that I am looking for matches of all files against all other
>>> files (of similar length) is there a better bet than using re.search?
>>> The initial application concerns files in the 1,000's, and I could use
>>>
Simon Forman wrote:
> Andrew Robert wrote:
>> Simon Forman wrote:
>>> Paul Rubin wrote:
>>>> "EP" <[EMAIL PROTECTED]> writes:
>>>>> Given that I am looking for matches of all files against all other
>>>>> files (of s
[EMAIL PROTECTED] wrote:
> John Salerno wrote:
>> Is it possible to get vim-python for Windows, or is that just a Linux build?
>
>
> It builds for windows.
>
When installed, you may also want to consider the python add-on located at
http://www.vim.org/scripts/script.php?script_id=790
Enhanced
uch module included in numpy.
> Is alter_code1.py supposed to take its place? If so why hasn't
> the Home Page been updated to reflect this?
Are you volunteering to maintain the site? I'd be happy to set you up with
access.
>> NumPy Developers
>
> And you have the GALL to C
alf wrote:
> Fredrik Lundh wrote:
>> http://www.catb.org/~esr/faqs/smart-questions.html#writewell
>>
>>
>
> and means?
It's his signature.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terribl
alue )
enthought.traits.trait_errors.TraitError: The 'int_member' trait of a MyClass
instance must be a value of type 'int', but a value of moo was specified.
"""
# and similar errors for
# a.int_member = 'moo'
# a.process_data('moo')
The met
't work out for you, and the many choices leave you bewildered,
describe your C code and what you want the Python interface to look like, and
then we can help you find a better tool for your needs.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless
or greater than
the number of rows, then residuals will be returned as an empty array
otherwise resids = sum((b-dot(A,x)**2).
Singular values less than s[0]*rcond are treated as zero.
In [12]: abc, residuals, rank, s = np.linalg.lstsq(A, z)
In [13]: abc
Out[13]: array([ 0.93104714,
release.
>
> Thanks for your explanation.
>
> Filippo
Have a look at wxGlade if you want to do some windowing prototyping:
wxglad.sf.net
HTH
Robert
--
http://mail.python.org/mailman/listinfo/python-list
his if you
> report it to them.
https://svn.enthought.com/enthought/ticket/864
The person who builds the Enthought Edition releases is out on vacation this
week, so a new release will probably wait until he comes back. In the meantime,
installing Fredrik's binaries on top of ours sh
[EMAIL PROTECTED] wrote:
> One other thing: the mac os x built at python.org
> (http://www.python.org/download/)
>
> does not state whether it is a Framework build or not. I'm guessing it
> isn't.
It is.
--
Robert Kern
"I have come to believe that the whole
3 (and they already have a build for
> 2.5rc1), so I'm not sure what you mean.
The Mac OS X Universal binary build process has been improved since the 2.4.3
source release.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made te
a symbol that should be
provided by libg2c, the FORTRAN runtime for g77.
http://www.scipy.org/FAQ#head-26562f0a9e046b53eae17de300fc06408f9c91a8
Please ask again on the numpy mailing list and provide some more information,
like your platform, the versions of your compilers, and some more details about
how you went
t is easy to
> convert Numeric arrays into Numpy arrays:
>>>> my_numpy_array=numpy.array(my_numeric_array)
The NetCDF interface has been ported to numpy and currently resides in the
scipy
sandbox.
http://svn.scipy.org/svn/scipy/trunk/Lib/sandbox/netcdf/
--
Robert Kern
"I hav
s that the above could be
> considered correct if the rules of Python were that an assignment
> statement takes
> IDENTIFIER '=' LVALUE
>
> Also "class" IDENTIFIER COLON could also be considered correct.
>
Yes it could but it isn't and isn't likely to be. Simply do not use
reserved words. That rule is hardly limited to Python.
Robert
--
http://mail.python.org/mailman/listinfo/python-list
y's random module does not
have one. If the number of samples is high enough, then one might be able to
approximate the binomial distribution with a normal one, but you'd be better
off
just installing numpy.
--
Robert Kern
"I have come to believe that the whole world i
, so its near the relevent
> test's results.
Several test runners (py.test, testoob, nose) will trap stdout and stderr and
only display them if that test fails. Then you can simply use print statements
in your test methods.
--
Robert Kern
"I have come to believe that the whole
e
delimiter string. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified or is None, any
whitespace string is a separator.
Using the maxsplit argument saves split from having to do unnecessary work
splitting the garbage portion if there are nulls there,
Robert Kern wrote:
> Michael wrote:
>> I guess, I still don't see how this will work. I'm receiving a C
>> zero-terminated string in my Python program as a 1K byte block (UDP
>> datagram). If the string sent was "abc", then what I receive in Python
>
; environment variables, both by direct assignment of os.environ and by
> calling os.putenv(), but neither results in python being able to find
> my dynamic libraries.
Those environment variables need to be set before the python executable starts.
--
Robert Kern
"I have come to believe th
George Sakkis wrote:
> Michael wrote:
>
>> Robert,
>>
>> Thanks to you and everyone else for the help. The "s.split('\x00',
>> 1)[0] " solved the problem.
>
> And a probably faster version: s[:s.index('\x00')]
Yup. About twice as
No, his extensions link against other shared libraries which are not Python
extensions. Those shared libraries are in nonstandard locations because he is
running his tests before installing the libraries and his Python code.
--
Robert Kern
"I have come to believe that the whole world is an eni
1801 - 1900 of 4167 matches
Mail list logo