Thomas Heller wrote:
> nikie schrieb:
> > When I try to compress the output of py2exe like this:
> >
> > from distutils.core import setup
> > import py2exe
> >
> > setup(console=['hello.py'], options={"py2exe": {"compre
When I try to compress the output of py2exe like this:
from distutils.core import setup
import py2exe
setup(console=['hello.py'], options={"py2exe": {"compressed": 1}})
I get strange error messages:
Adding zlib.pyd to C:\tests\CanControllerTest\New Folder
(2)\dist\library.zip
Traceback (m
Paul McGuire wrote:
> "Chaos" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >
> > Paul McGuire wrote:
> > > "Paul McGuire" <[EMAIL PROTECTED]> wrote in message
> > > news:[EMAIL PROTECTED]
> > > > "Chaos" <[EMAIL PROTECTED]> wrote in message
> > > > news:[EMAIL PROTECTED]
> > > >
Chaos wrote:
> nikie wrote:
> > Chaos wrote:
> >
> > > As my first attempt to loop through every pixel of an image, I used
> > >
> > > for thisY in range(0, thisHeight):
> > > for thisX in range(0, thisWidth):
> >
Chaos wrote:
> As my first attempt to loop through every pixel of an image, I used
>
> for thisY in range(0, thisHeight):
> for thisX in range(0, thisWidth):
> #Actions here for Pixel thisX, thisY
>
> But it takes 450-1000 milliseconds
>
> I want speeds less t
janama wrote:
> Hi all,
>
> Using wx
> When adding a second timer as i have the first, the second timer
> adding stops the first timer (updating or stops?) . In this example im
> updating a uptime and localtime label. It works fine for displaying the
> last "self.startTimer2()" called. But preve
[EMAIL PROTECTED] wrote:
> Hi everyone,
>
> which compiler will Python 2.5 on Windows (Intel) be built with? I
> notice that Python 2.4 apparently has been built with the VS2003
> toolkit compiler, and I read a post from Scott David Daniels [1] where
> he said that probably the VS2003 toolkit will
Christoph Zwerschke wrote:
> nikie wrote:
> > Let's look at two different examples: Consider the following C# code:
> >
> > static decimal test() {
> >decimal x = 10001;
> >x /= 100;
> >x -= 100;
> >return x;
> >
&g
Let's look at two different examples: Consider the following C# code:
static decimal test() {
decimal x = 10001;
x /= 100;
x -= 100;
return x;
}
It returns "0.01", as you would expect it. Now, consider the python
equivalent:
def test():
x = 10001
x /= 100
x -= 100
ret
xkenneth wrote:
> Hi,
>
>I'm writing a couple python applications that use the serial port
> (RS-232) quite extensively. Is there any way I can monitor all activity
> on the serial port and have it printed as the transactions occur? I'm
> trying to reverse engineer a microcontroller serial rou
xkenneth wrote:
> Hi,
>
>I'm writing a couple python applications that use the serial port
> (RS-232) quite extensively. Is there any way I can monitor all activity
> on the serial port and have it printed as the transactions occur? I'm
> trying to reverse engineer a microcontroller serial rou
Xah Lee wrote:
> Software Needs Philosophers
>
> by Steve Yegge, 2006-04-15.
>
> Software needs philosophers.
>
> This thought has been nagging at me for a year now, and recently it's
> been growing like a tumor. One that plenty of folks on the 'net would
> love to see kill me.
No, we all wish yo
Brian Blais wrote:
> Hello,
>
> Are there any recommendations for which Windows python version to use? I'd
> like to
> see a pros-and-cons description of each, given that different uses might
> dictate
> different versions. The versions I know (and there are surely more) are:
>
> 1) download f
Kaz Kylheku wrote:
> Kaz Kylheku wrote:
> > But suppose that the expression and the multi-line lambda body are
> > reordered? That is to say, the expression is written normally, and the
> > mlambda expressions in it serve as /markers/ indicating that body
> > material follows. This results in the
Hari wrote:
> Hi all,
>
> I need to get a part of string which follows a pattern 'addr='
>
>
> For example:
>
>
> a)test="192.168.1.17:/home/ankur/nios_fson/mnt/tmptype
> nfs(rw,addr=192.168.1.17)"
> b)test="/dev/root on / typr nfs
> (rw,v2,rsize=1024,wsize=1024,hard,udp,nolock,addr=192.168.1.93)"
san wrote:
> Hi
>
> I am using windows xp and have installed python and win32. I am
> familiar with basic Python. I wanted to control some of the
> applications via python script.
>
> I would like to write a python script to say:
> 1. Open firefox and log on to gmail
> 2. Another firefox window to
Steven Bethard wrote:
> nikie wrote:
> > Steven Bethard wrote:
> >
> >> nikie wrote:
> >>> Steven Bethard wrote:
> >>>
> >>>> John Salerno wrote:
> >>>>> If I want to make a list of four items, e.g. L = ['
Robin Becker schrieb:
> When young I was warned repeatedly by more knowledgeable folk that self
> modifying code was dangerous.
>
> Is the following idiom dangerous or unpythonic?
>
> def func(a):
> global func, data
> data = somethingcomplexandcostly()
> def func(a):
> ret
Steven Bethard wrote:
> nikie wrote:
> > Steven Bethard wrote:
> >
> >> John Salerno wrote:
> >>> If I want to make a list of four items, e.g. L = ['C', 'A', 'D', 'B'],
> >>> and then figure out if
I V wrote:
> On Fri, 28 Apr 2006 14:27:00 -0700, nikie wrote:
> > Steven Bethard wrote:
> >
> >> >>> L = ['C', 'A', 'D', 'B']
> >> >>> positions = dict((item, i) for i, item in enumerate(L))
>
> D
Steven Bethard wrote:
> John Salerno wrote:
> > If I want to make a list of four items, e.g. L = ['C', 'A', 'D', 'B'],
> > and then figure out if a certain element precedes another element, what
> > would be the best way to do that?
> >
> > Looking at the built-in list functions, I thought I could
[EMAIL PROTECTED] wrote:
> Here is another non-pythonic question from the Java Developer. (I beg
> for forgiveness...)
>
> Does Python have a mechanism for events/event-driven programming?
>
> I'm not necessarily talking about just GUIs either, I'm interested in
> using events for other parts of a
Roy Smith wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
> > I write a lot of code that looks like this:
> >
> > for myElement, elementIndex in zip( elementList,
> > range(len(elementList))):
> > print "myElement ", myElement, " at index: ",elementIndex
> >
> >
> > My q
Douglas Douglas schrieb:
> Hi everybody.
>
> I have a paper form that I scan into an image. My user fills some circles in
> this paper form using black ink. Every form has ten rows with five circles
> each
> and the user fills only one circle for each row.
>
> I was wondering if I could use the P
Bob Greschke wrote
> I've resorted to actually drawing all of the characters of the alphabet on a
> graph to avoid having to drag around font files. It's mostly just uppercase
> characters, so it's not too bad.
>
> But I noticed that some of the line segments have to be extended one pixel
> longe
> How can I use python to find images that looks quite similar? Thought
> I'd scale the images down to 32x32 and convert it to use a standard
> palette of 256 colors then compare the result pixel for pixel etc, but
> it seems as if this would take a very long time to do when processing
> lots of im
> want to encode/decode an arbitrary short 8-bit string as save filename.
> is there a good already builtin encoding to do this (without too much
> inflation) ? or re.sub expression?
>
> or which characters are not allowed in filenames on typical OS?
On Windows, / \ : * ? " < > | are forbidden, a
Philippe Martin wrote:
> PS: where can I find those extra parameters in the doc (ex: quality) ... I
> must be blind.
In the http://www.pythonware.com/library/pil/handbook/formats.htm page.
Look in the "JPEG" section. Different file formats support different
options.
--
http://mail.python.org/mail
Philippe Martin wrote:
> Hi,
>
> Thanks to the NG, I got the script hereunder working.
>
> 1) I am not certain that the call to convert does much (checking the doc)
I think you only need it if your source image comes in a format that
can't be stored into a jpeg file (e.g. 8-bit paletted). You'll n
> try running this in python:
>
> print [39.95]
>
> the output i get is:
> [39.953]
>
> what's up with that?
That's perfectly normal - some numbers aren't exactly expressible as
binary floating points, just like 1/3 isn't expressible as a decimal
floating point number.
Here's a good l
I guess the indention got mixed up in your post, if I try to run it, I
get error messages at each of the "else:" lines, because they're
mis-indented.
"else" should be indented like the "if" it belongs to, e.g (using
underscores for spaces):
if s=='10':
print "well done"
else:
print "somethi
> The version I have in front of me is a bit shorter, 252 pages, but describes
> polyfit in section 5.3 on page 91 along with the other polynomial functions.
> lstsq (linear_least_squares is a backwards-compatibility alias that was
> recently
> moved to numpy.linalg.old) is described in section 10
Robert Kern wrote:
> Both functions are described in the full book. Were you just looking at the
> sample chapter?
No, I've got the full PDF by mail a few days ago, "numpybook.pdf", 261
pages (I hope we're talking about the same thing). I entered
"linear_least_squares" and "polyfit" in acrobat's "
Although I think it's worth reading, it only covers the fundamental
structure (what arrays are, what ufuncs are..) of NumPy. Neither of the
functions dicussed in this thread (polyfit/linear_least_squares) is
mentioned in the file.
--
http://mail.python.org/mailman/listinfo/python-list
Thank you!
THAT's what I've been looking for from the start!
--
http://mail.python.org/mailman/listinfo/python-list
I still don't get it...
My data looks like this:
x = [0,1,2,3]
y = [1,3,5,7]
The expected output would be something like (2, 1), as y[i] = x[i]*2+1
(An image sometimes says more than 1000 words, so to make myself clear:
this is what I want to do:
http://www.statistics4u.info/fundstat_eng/cc_regr
I'm a little bit stuck with NumPy here, and neither the docs nor
trial&error seems to lead me anywhere:
I've got a set of data points (x/y-coordinates) and want to fit a
straight line through them, using LMSE linear regression. Simple
enough. I thought instead of looking up the formulas I'd just se
37 matches
Mail list logo