On Apr 15, 8:19 pm, [EMAIL PROTECTED] wrote:
> Coming from VBA I have a tendency to think of everything as an
> array...
Coding to much in Visual Basic, like Fortran 77, is bad for your mind.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Apr 15, 2008 at 10:36 PM, Tobiah <[EMAIL PROTECTED]> wrote:
> I am not sure how to capture the output of a command
> using subprocess without creating a temp file. I was
> trying this:
>
> import StringIO
> import subprocess
>
> file = StringIO.StringIO()
>
> subprocess.call("ls", st
Erich wrote:
> def iterable(item, count_str=False):
> if not count_str and isinstance(item, str):
> return False
> try:
> iter(item)
> except:
> return False
> return True
Beware the "except" clause here, as it catches *all* errors. Thus, if you
happen to ha
On Tue, 15 Apr 2008 13:36:11 -0700, Tobiah wrote:
> I am not sure how to capture the output of a command
> using subprocess without creating a temp file. I was
Sorry, I jumped into a secondary level of the
docs, and didn't see it all. I guess I can
use communicate() to get the output.
Still, ab
On Tue, 2008-04-15 at 11:51 -0700, Erich wrote:
> Hello all,
>
> Today I found myself once again defining two functions that I use all
> the time: nsplit and iterable. These little helper functions of mine
> get used all the time when I work. Im sick of having to define them
> (but am very good
>
> Still, about StringIO...
>
The module description says you can use it to read and write strings
as files, not that you can use strings *everywhere* you can use files.
In your specific case, StringIO doesn't work, because the stdout
redirection takes place at the operating system level (which
Berco Beute schrieb:
> Thanks, that would be great.
Here you go.
http://roggisch.de/vidio.tgz
Diez
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 2008-04-15 at 13:48 -0700, Jeffrey Froman wrote:
> Tim Chase wrote:
> >def nsplit(s, delim=None, maxsplit=None):
> > if maxsplit:
> >results = s.split(delim, maxsplit)
> >result_len = len(results)
> >if result_len < maxsplit:
> > results.extend([''
"Sverker Nilsson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| What serious reports?
http://wiki.python.org/moin/Early2to3Migrations
--
http://mail.python.org/mailman/listinfo/python-list
> Diez: I tried SWIG, and it works nicely with C. For C++, I didn't manage
> to make it work. I tried SIP; I have some problems compiling etc. Would
> it be too much to ask you to supply a working example of a (simple,
> stupid) C++ class and the necessary SIP files? Preferably for Mac OS X,
>
On Apr 15, 11:18 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Berco Beute schrieb:
>
> > Thanks, that would be great.
>
> Here you go.
>
> http://roggisch.de/vidio.tgz
>
> Diez
Wonderful! Thank you very much!
I'm running out of time, but after installing the necessary goodies
using the nice
On Mon, 14 Apr 2008 00:31:34 -0700, Josh wrote:
> Hmm... That didn't work out so well that time. I feel like an idiot.
> Previously there has been an hour difference between the system time and
> the time that python reports.
Thanks for the laugh though Josh. That was funny! :)
--
http://mail.
En Tue, 15 Apr 2008 17:45:08 -0300, <[EMAIL PROTECTED]> escribió:
> when calling function hmm here, what do i get? the widget i clicked
> on?
> if i have a canvs on wich i have a bitmap and i click on the bitmap,
> is the event.widget then the bitmap?
> can i get info about the bitmap then? like c
On 12 Apr., 03:34, baalbek <[EMAIL PROTECTED]> wrote:
> Delphi/Object Pascal simply sucks big time!
I disagree. Delphi/Object Pascal with the VCL (Visual Component
Library) is one
of the most sophisticated IDEs ever, even better than Qt IMO. The only
drawback
is that it is Windows only.
> No rea
[EMAIL PROTECTED] wrote:
> On 13 Apr, 19:19, Bryan Oakley <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> mapq = PhotoImage(file = 'C:\Users\saftarn\Desktop\elmapovic.gif')
>>> w.create_image(10, 10, image = mapq, anchor = NW)
>>> after doing this is there any possibility of getting the
I want to add a timeout so that when I pull out my gps from my serial
port, it would wait for a bit then loop and then see if it's there. I
also want to add a print statement saying that there is no GPS device
found. However when I run my code and unplug my serial port, my code
will just hang until
Erich <[EMAIL PROTECTED]> writes:
> def iterable(item, count_str=False):
> if not count_str and isinstance(item, str):
> return False
> try:
> iter(item)
> except:
> return False
> return True
> This is just simple boolean test for whether or not an object
"Giampaolo Rodola'" <[EMAIL PROTECTED]> writes:
> Is there a way to force unittest to run test methods in the order
> they appear?
No, and this is a good thing.
Your test cases should *not* depend on any state from other test
cases; they should function equally well when executed in any
arbitrar
Dan Bishop wrote:
>>> lines[:] = [line.rstrip('\n') for line in lines]
>> What is the point of the [:] after lines ? How different is it with or
>> without it ?
>
> It causes the result to be stored in the existing list.
>
If we do:
lines = [line.rstrip('\n') for line in lines]
lines is now a
On Apr 14, 8:37 pm, Benjamin <[EMAIL PROTECTED]> wrote:
> On Apr 14, 9:00 pm, agent E 10 <[EMAIL PROTECTED]> wrote:> Hi, I'm brand
> new to programming. Have any suggestions? I'm young.
> > Was it a good idea to start with python? I was planning on creating a
> > very simple program that asked
On 16 Apr, 00:24, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 15 Apr 2008 17:45:08 -0300, <[EMAIL PROTECTED]> escribió:
>
> > when calling function hmm here, what do i get? the widget i clicked
> > on?
> > if i have a canvs on wich i have a bitmap and i click on the bitmap,
> > is the
Just few link on some Lindsay Lohan Movies
Free Movies: http://exclusive.12w.net
F
R
E
E
C
E
L
E
B
R
I
T
Y
M
O
V
I
E
S
--
http://mail.python.org/mailman/listinfo/python-list
Just few link on some Lindsay Lohan Movies
Free Movies: http://exclusive.12w.net
F
R
E
E
C
E
L
E
B
R
I
T
Y
M
O
V
I
E
S
--
http://mail.python.org/mailman/listinfo/python-list
Just few link on some Lindsay Lohan Movies
Free Movies: http://exclusive.12w.net
F
R
E
E
C
E
L
E
B
R
I
T
Y
M
O
V
I
E
S
--
http://mail.python.org/mailman/listinfo/python-list
Just few link on some Lindsay Lohan Movies
Free Movies: http://exclusive.12w.net
F
R
E
E
C
E
L
E
B
R
I
T
Y
M
O
V
I
E
S
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 16, 9:26 am, Yves Dorfsman <[EMAIL PROTECTED]> wrote:
> If we do:
> lines[:] = [line.rstrip('\n') for line in lines]
>
> We reuse an existing list, therefore we are saving the time it takes to
> create a new list ? So this is a performance issue ?
I think it's more of a reference issue. You
On Tuesday 15 April 2008 16:23, Ben Finney wrote:
> "Giampaolo Rodola'" <[EMAIL PROTECTED]> writes:
> > Is there a way to force unittest to run test methods in the order
> > they appear?
>
> No, and this is a good thing.
>
> Your test cases should *not* depend on any state from other test
> cases;
Joe P. Cool wrote:
> In 2005 I heard of plans to add Python as a second language to the
> Gecko engine. Is this still true? Or has this plan been abandoned?
>
You can use Python inside of Mozilla (Gecko) based applications now,
such as Firefox/Thunderbird/Komodo Edit/XulRunner which communicate
What's the current way to install an import hook? I've got an embedded app
that has a few scripts that I want to import each other, but that are not in
sys.modules. I intentionally keep them out of sys.modules because their
names will not be unique across the app. They will, however, be unique
betw
Ben Finney <[EMAIL PROTECTED]> writes:
> Find out about test fixtures in the documentation for unittest
> http://www.python.org/doc/lib/module-unittest>.
Find out easier with the right URL context
http://www.python.org/doc/lib/module-unittest>.
--
\ "I like my dental hygenist, I think she
Dear all,
I'm trying to get a large, machine-generated regular expression (many
thousands of characters) to work in Python on a Mac (running Leopard),
and I keep banging my head against this brick wall:
>>> update_implicit_link_regexp_temp()
Traceback (most recent call last):
File "", line 1, i
On 11 abr, 20:31, sturlamolden <[EMAIL PROTECTED]> wrote:
> On Apr 11, 5:01 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>
> > Another annoying thing with the Qt license is that you have to choose it
> > at the very start of the project. You cannot develop something using the
> > open sourc
I've written up a stripped down version of the code. I apologize for the bad
coding; I am in a bit of a hurry.
import random
import sys
import time
sizeX = 320
sizeY = 240
borderX = 20
borderY = 20
# generates a zero matrix
def generate_zero():
matrix = [[0 for y in range(sizeY)] for x in ra
On Apr 15, 6:37 pm, agent E 10 <[EMAIL PROTECTED]> wrote:
> On Apr 14, 8:37 pm, Benjamin <[EMAIL PROTECTED]> wrote:
>
> > On Apr 14, 9:00 pm, agent E 10 <[EMAIL PROTECTED]> wrote:>Hi, I'm brand
> > new to programming. Have any suggestions? I'm young.
> > > Was it a good idea to start with pyth
On Apr 15, 9:17 pm, [EMAIL PROTECTED] wrote:
> On 11 abr, 20:31, sturlamolden <[EMAIL PROTECTED]> wrote:
>
> > On Apr 11, 5:01 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > wrote:
>
> > > Another annoying thing with the Qt license is that you have to choose it
> > > at the very start of the proje
Hmm.. I'm just now learning wxPython and it's very very easy to me. Perhaps
because I've delved into other GUI APIs like GLUT and Windows DirectX.
Programming in C++ seems a pain when coming from Python. I'll let you know
more when I delve more into it.
-M
> From: [EMAIL PROTECTED]> Subj
> I've written up a stripped down version of the code. I apologize for the bad
> coding; I am in a bit of a hurry.
>
> import random
> import sys
> import time
>
> sizeX = 320
> sizeY = 240
> borderX = 20
> borderY = 20
>
> # generates a zero matrix
> def generate_zero():
> matrix = [[0 for y i
the memory usage of a python app keeps growing in a x86 64 linux
continuously, whereas in 32 bit linux this is not the case. Python
version in both 32 bit and 64 bit linux - 2.6.24.4-64.fc8
Python 2.5.1 (r251:54863, Oct 30 2007, 13:45:26)
i isolated the memory leak problem to a function that uses
> Can I then simply ignore the time data then? I do see better performance
> obviously the smaller the box is, but I guess my issues is how seriously to
> take all this data. Because I can't claim "performance improvement" if there
> isn't really much of an improvement.
>
> On Tue, Apr 15, 2008 at
Hello guys & girls
I'm pasting an "en dash"
(http://www.fileformat.info/info/unicode/char/2013/index.htm) character into a
tkinter widget, expecting it to be properly stored into a MySQL database.
I'm getting this error:
**
On 4/15/08, Daniel Fetchinson <[EMAIL PROTECTED]> wrote:
> > Can I then simply ignore the time data then? I do see better performance
> > obviously the smaller the box is, but I guess my issues is how seriously
> to
> > take all this data. Because I can't claim "performance improvement" if
> there
Hallöchen!
[EMAIL PROTECTED] writes:
> On 11 abr, 20:31, sturlamolden <[EMAIL PROTECTED]> wrote:
>
> [...]
>
> I have no experience with GUI programming in Python, but from this
> discussion it seems if the type of license is not an issue (for
> FOSS development), PyQt is the best tool because it
Hi everyone,
I am looking for binaries (.exe) of python-gammu (any
version) for Python 2.4. What I'm getting from the
download website is only for Python 2.5. Does anyone
know where I can get what I'm looking for? Google
isn't really helping :-C
Regards,
Simon
___
En Tue, 15 Apr 2008 20:26:16 -0300, Yves Dorfsman <[EMAIL PROTECTED]>
escribió:
> Dan Bishop wrote:
>
lines[:] = [line.rstrip('\n') for line in lines]
>>> What is the point of the [:] after lines ? How different is it with or
>>> without it ?
>>
>> It causes the result to be stored in the e
En Tue, 15 Apr 2008 20:37:40 -0300, agent E 10 <[EMAIL PROTECTED]>
escribió:
> On Apr 14, 8:37 pm, Benjamin <[EMAIL PROTECTED]> wrote:
>> On Apr 14, 9:00 pm, agent E 10 <[EMAIL PROTECTED]> wrote:> Hi,
>> I'm brand new to programming. Have any suggestions? I'm young.
>> > Was it a good idea t
En Tue, 15 Apr 2008 20:45:24 -0300, <[EMAIL PROTECTED]> escribió:
> On 16 Apr, 00:24, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
>> En Tue, 15 Apr 2008 17:45:08 -0300, <[EMAIL PROTECTED]> escribió:
>>
>> > when calling function hmm here, what do i get? the widget i clicked
>> > on?
>> > if i ha
On Wed, 2008-04-16 at 02:35 -0300, Gabriel Genellina wrote:
> I'm unsure if teaching Javascript, VBScript and Python at the same time is
> a good thing, I'd think one would get a language soup and mix all the
> concepts, but if it works for you, go ahead.
> For other resources, see the beginne
En Tue, 15 Apr 2008 22:14:18 -0300, Patrick Stinson
<[EMAIL PROTECTED]> escribió:
> What's the current way to install an import hook? I've got an embedded
> app
> that has a few scripts that I want to import each other, but that are
> not in
> sys.modules. I intentionally keep them out of sy
> "C:\Python24\Lib\site-packages\MySQLdb\cursors.py", line 149, in
> execute query = query.encode(charset) UnicodeEncodeError: 'latin-1'
> codec can't encode character u'\u2013' in position 52: ordinal not in
> range(256)
Here it complains that it deals with the character U+2013, which
is "EN DAS
> What is Py_UNICODE_SIZE and why was it not defined? There are current
> questions I have.
Py_UNICODE_SIZE is the number of bytes that a Py_UNICODE value should
have in the interpreter. With --enable-unicode=ucs2, it should be 2.
I cannot guess why it is not defined; check pyconfig.h to find ou
En Tue, 15 Apr 2008 23:24:01 -0300, Jonathan Shao <[EMAIL PROTECTED]>
escribió:
> I've written up a stripped down version of the code. I apologize for the
> bad
> coding; I am in a bit of a hurry.
First things first: I think you will gain inmensely using NumPy:
http://numpy.scipy.org/
My t
Hallöchen!
Joe P. Cool writes:
> On 12 Apr., 03:34, baalbek <[EMAIL PROTECTED]> wrote:
>
>> Delphi/Object Pascal simply sucks big time!
>
> I disagree. Delphi/Object Pascal with the VCL (Visual Component
> Library) is one of the most sophisticated IDEs ever, even better
> than Qt IMO. [...]
I wa
Does anyone know a workaround to plotting beyond 9 subplots in
matplotlib? It would be nice to have 20 plots under the subplot
function for example (poster).
Cheers,
Eli
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your well-formulated article
Providing the Python infrastructure with my program doesn't apply
since I am providing a program/library that is intended to be
general.
So it doesn't help.
All that py3k does to me, it seems, is some extra work.
To be frank, no innovation. Just changes,
101 - 154 of 154 matches
Mail list logo