7stud <[EMAIL PROTECTED]> writes:
> --output:--
> (, , )
>
> The output suggests that Dog actually is a subclass of type--despite
> the fact that issubclass(Dog, type) returns False.
What was it in the output that gave you the impression that Dog is a
subclass of type? The last entry is only for
On Mon, 04 Feb 2008 03:21:18 +, Odysseus wrote:
> def extract_data():
> i = 0
> while i < len(names):
> name = names[i][6:] # strip off "Name: "
> found[name] = {'epoch1': cells[10 * i + na],
>'epoch2': cells[10 * i + na + 1],
>
In article <[EMAIL PROTECTED]>,
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> Here and in later code you use a ``while`` loop although it is known at
> loop start how many times the loop body will be executed. That's a job
> for a ``for`` loop. If possible not over an integer that is
On Feb 4, 12:49 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> 7stud <[EMAIL PROTECTED]> writes:
> > --output:--
> > (, , )
>
> > The output suggests that Dog actually is a subclass of type--despite
> > the fact that issubclass(Dog, type) returns False.
>
> What was it in the output that gave you t
7stud a écrit :
> print dir(type) #__mro__ attribute is in here
> print dir(object) #no __mro__ attribute
>
>
> class Mammals(object):
> pass
> class Dog(Mammals):
> pass
>
> print issubclass(Dog, type) #False
> print Dog.__mro__
>
> --output:--
> (, , )
>
>
> The output sugg
On Feb 4, 3:21 am, Odysseus <[EMAIL PROTECTED]> wrote:
> The next one is much messier. A couple of the strings represent times,
> which I think will be most useful in 'native' form, but the input is in
> the format "DD Mth HH:MM:SS UTC".
time.strptime will do this!
You can find the documenta
7stud <[EMAIL PROTECTED]> writes:
> On Feb 4, 12:49 am, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
>> 7stud <[EMAIL PROTECTED]> writes:
>> > --output:--
>> > (, , )
>>
>> > The output suggests that Dog actually is a subclass of type--despite
>> > the fact that issubclass(Dog, type) returns False.
>>
> In Python, the direct translation of this is a for loop. When the
> index doesn't matter to me, I tend to write it as:
>
> for _ in xrange (1,n):
>some code
>
> An alternative way of indicating that you don't care about the loop
> index would be
>
> for dummy in xrange (1,n):
>some code
On Sat, 02 Feb 2008 00:08:21 +0100, Mike Kent <[EMAIL PROTECTED]> wrote:
> In a comment Guido made on a recent bug report for the 'freeze'
> utility, he stated:
>
> "I think nobody really cares about freeze any more -- it isn't
> maintained."
>
> That being the case, what is the preferred/best rep
On Mon, 04 Feb 2008 10:50:10 +0100, Hrvoje Niksic wrote:
> ...regardless of whether dir() is aware of it.
I've always thought that having dir(obj) return only some attributes of
obj, according to some arbitrary, implementation and version dependent
algorithm, was an ugly wart.
help(dir) =>
"Re
On Feb 4, 8:43 pm, Odysseus <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> > found = dict()
> BTW what's the difference between the above and "found = {}"?
{} takes 4 fewer keystrokes, doesn't have the overhead of a functio
On Sun, 03 Feb 2008 15:31:49 -0800, Paul Boddie wrote:
> I don't know whether I can offer much better advice than others, but I
> have noticed that a lot of my own code has moved in the direction of not
> having specific default values in function/method signatures. So,
> instead of this...
>
>
www.enmac.com.hk
GSM Mobile Phones, Digital iPods, Digital Clocks, Digital Pens,
Digital Quran. Enjoy these products with Islamic Features (Complete
Holy Quran with Text and Audio, Tafaseer books, Ahadees Books, Daily
Supplications, Universal Qibla Direction, Prayer Timing and much more)
visit our
[EMAIL PROTECTED] wrote:
> try:
> test = Popen(test_path,
> stdout=PIPE,
> stderr=PIPE,
> close_fds=True,
> env=test_environ)
> whi
Why don't you start around 50 threads at a time to do the file
writes? Threads are effective for IO. You open the source file,
start a queue, and start sending data sets to be written to the
queue. Your source file processing can go on while the writes are
done in other threads.
--
http://mail.
Hi all,
I apologize if this question was already answered before but I was
unable to find a proper solution to my problem. Anyways, I am trying
to run shaderobjects.py on Windows (Python 2.5.1) by just double-
clicking, and I got the following error:
[...]
File "/usr/lib/python2.5/site-packages/O
Hi,
when I try to catch ctrl+c with
except KeyboardInterrupt:
pychecker tells me
Catching a non-Exception object (KeyboardInterrupt)
It works fine, but the message indicates that it's not completely clean.
How should I write the exception correctly?
Thanks,
Michael
--
http://mail.python.o
On Mon, 04 Feb 2008 13:57:39 +0100, AMD wrote:
> The problem I have under windows is that as soon as I get to 500 files I
> get the Too many open files message. I tried the same thing in Delphi
> and I can get to 3000 files. How can I increase the number of open files
> in Python?
Windows XP has
Jeff wrote:
> Why don't you start around 50 threads at a time to do the file
> writes? Threads are effective for IO. You open the source file,
> start a queue, and start sending data sets to be written to the
> queue. Your source file processing can go on while the writes are
> done in other thr
You're right I totally misunderstood it. And your idea is obvious and simple
enough :)
On Feb 1, 2008 6:33 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> En Fri, 01 Feb 2008 15:46:05 -0200, Trevor Johnson
> <[EMAIL PROTECTED]> escribió:
>
> > I think I have a good candidate for a meta class h
7stud wrote:
> The output suggests that Dog actually is a subclass of type--despite
> the fact that issubclass(Dog, type) returns False. In addition, the
> output of dir(type) and dir(object):
No, type is the meta class of the class object:
>>> issubclass(object, type)
False
>>> isinstance(objec
Jon Ribbens wrote:
> This should work I believe:
>
> if os.fork():
> os._exit(0)
> os.setsid()
> os.chdir("/")
> fd = os.open("/dev/null", os.O_RDWR)
> os.dup2(fd, 0)
> os.dup2(fd, 1)
> os.dup2(fd, 2)
> if fd > 2:
> os.close(fd)
> # do stuff
>
> Although bear in mind it'
En Mon, 04 Feb 2008 11:53:52 -0200, Michael Goerz
<[EMAIL PROTECTED]> escribi�:
> when I try to catch ctrl+c with
>
> except KeyboardInterrupt:
>
> pychecker tells me
>
> Catching a non-Exception object (KeyboardInterrupt)
>
> It works fine, but the message indicates that it's not completely cle
I want to build some basic kid games for Linux (Ubuntu/EdUbuntu) and
so after looking around I've decided that Python would probably be the
path of least resistance.
I have a need to create custom gui elements (widgets?). I want these
games to be very graphical. Not 3d or anything crazy, I just wa
Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Michael Goerz <[EMAIL PROTECTED]> writes:
>
>> when I try to catch ctrl+c with
>>
>> except KeyboardInterrupt:
>>
>> pychecker tells me
>>
>> Catching a non-Exception object (KeyboardInterrupt)
>
> Looks like a pychecker bug. It might be confused by Ke
Michael Goerz <[EMAIL PROTECTED]> writes:
> when I try to catch ctrl+c with
>
> except KeyboardInterrupt:
>
> pychecker tells me
>
> Catching a non-Exception object (KeyboardInterrupt)
Looks like a pychecker bug. It might be confused by KeyboardInterrupt
being derived not from Exception, but fro
After reading an earlier thread about opening and closing lots of files,
I thought I'd do a little experiment.
Suppose you have a whole lot of files, and you need to open each one,
append a string, then close them. There's two obvious ways to do it:
group your code by file, or group your code b
On Mon, 04 Feb 2008 15:08:44 +, Bob Martin wrote:
> Rexx's method is the way to do it : "do 50"
I tried writing Rexx code and executing it in Python, but I got
unexpected results, mostly SyntaxError exceptions. Is that a bug in
Python?
No-I'm-not-really-serious-ly yours,
--
Steven
--
Whiplash wrote:
> I want to build some basic kid games for Linux (Ubuntu/EdUbuntu) and
> so after looking around I've decided that Python would probably be the
> path of least resistance.
>
> I have a need to create custom gui elements (widgets?). I want these
> games to be very graphical. Not 3d
in 332496 20080204 102153 "=?ISO-8859-1?Q?BJ=F6rn_Lindqvist?=" <[EMAIL
PROTECTED]> wrote:
>> In Python, the direct translation of this is a for loop. When the
>> index doesn't matter to me, I tend to write it as:
>>
>> for _ in xrange (1,n):
>>
On 2008-02-04, Bernard <[EMAIL PROTECTED]> wrote:
> #Fork and commit suicide
> if os.fork():
> sys.exit(0)
I'm pretty sure that should be os._exit(0)
> #What to do in parent process
This is now the child process.
> sys.stdin =
On Feb 2, 11:09 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
[snip]
While you're waiting for it to be implemented, you can build your own
version as a decorator. Here's an example written in haste:
>>> class composer(object):
def __init__(self, *funcs):
self.funcs = funcs
AMD wrote:
> Hello,
>
> I need to split a very big file (10 gigabytes) into several thousand
> smaller files according to a hash algorithm, I do this one line at a
> time. The problem I have is that opening a file using append, writing
> the line and closing the file is very time consuming. I'd
On Feb 4, 2008 9:57 AM, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Chris Mellon wrote:
>
> > Nitpick, but an important one. It emulates *look*. Not feel. Native
> > look is easy and totally insufficient for a "native" app - it's the
> > feel that's important.
>
> Is this opinion based on firsthand e
Jon Ribbens wrote:
> Why? I don't think you do.
> Neither does BSD daemon.c or glibc daemon.c
The problem is well documented at
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
"""
The second fork _is_ necessary, Jonathan Bartlett, 2003/10/31
The first fork accomplishes two things -
Jon Ribbens wrote:
> I think that's changing Python's idea of stdin etc but not the
> operating system's idea of them. You won't be closing the original
> file descriptors, and if you run any subprocesses they will end up
> with the original stdin/out/err. Unless sys.stdin is more magic
> than I'm
Hi there,
Im trying to run a Python based program which uses MySQL with python-sqlite
and Im recieving this error,
'Connection' object has no attribute 'autocommit'
I´ve had a google for this and its seems like it may be a bug python-sqlite or
sqlite bug , but also I tried searching
for it
On 3 fév, 21:52, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> Hello
>
> I need to launch a Python script, and fork it so that the calling
> script can resume with the next step will the Python script keeps
> running.
>
> I tried those two, but they don't work, as the calling script is stuck
On 2008-02-04, Christian Heimes <[EMAIL PROTECTED]> wrote:
>> Although bear in mind it's pretty UNIX-y.
>
> IIRC you have to fork a second time after you have changed the working
> dir and created a new session group.
Why? I don't think you do.
Neither does BSD daemon.c or glibc daemon.c
--
http:
On Feb 4, 2008 8:18 AM, David Cook <[EMAIL PROTECTED]> wrote:
> On 2008-02-03, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> wrote:
> > what would be the best python GUI toolkit, it must be cross platform.
> >
> > i have tried gtk, but it interface are real bad and its coding was
> difficult
> > so i dr
[EMAIL PROTECTED] wrote:
> Hi all,
>
> I apologize if this question was already answered before but I was
> unable to find a proper solution to my problem. Anyways, I am trying
> to run shaderobjects.py on Windows (Python 2.5.1) by just double-
> clicking, and I got the following error:
>
> [...
Hello,
I need to split a very big file (10 gigabytes) into several thousand
smaller files according to a hash algorithm, I do this one line at a
time. The problem I have is that opening a file using append, writing
the line and closing the file is very time consuming. I'd rather have
the files
QOTW: "Everyone with a PC knows that eventually their computer will slow down,
crash unexpectedly, and develop problems with applications." - promotional
materials for award-winning *Degunking Windows* book
"It's a very good idea to read the entire FAQ as soon as you've gotten past
the very basic
On Feb 4, 3:00 pm, Dustan <[EMAIL PROTECTED]> wrote:
> On Feb 2, 11:09 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> [snip]
>
> While you're waiting for it to be implemented, you can build your own
> version as a decorator. Here's an example written in haste:
>
> >>> class composer(object):
>
>
Steven D'Aprano wrote:
> So, what's going on? Can anyone explain why the code which does more work
> takes less time?
Short answer: CPU and RAM are much faster than hard disks.
The three loops and the creation of a list costs only a few CPU cycles
compared to flushing the new data to disk.
Chri
On Feb 4, 4:24 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> "It's a very good idea to read the entire FAQ as soon as you've gotten past
> the very basic Python level, so that you can save yourself and others a lot
> of time stumbling over the traditional problems that everyone goes through.
Wouldn't it be handy if there was a web framework that allowed you to
create pages and control the interface like you would using a
client-side GUI framework such as Tkinter?
The framework would need a small, fast web server that would
automatically fire up when you ran your application and you
On Feb 4, 2008 10:46 AM, Kevin Walzer <[EMAIL PROTECTED]> wrote:
> Chris Mellon wrote:
>
> >
> > I didn't say inherently unable, I said the toolkit doesn't provide it.
> > Note that you said that you did a lot of work to follow OS X
> > conventions and implement behavior. The toolkit doesn't help y
En Mon, 04 Feb 2008 12:50:15 -0200, Christian Heimes <[EMAIL PROTECTED]>
escribi�:
> Jeff wrote:
>> Why don't you start around 50 threads at a time to do the file
>> writes? Threads are effective for IO. You open the source file,
>> start a queue, and start sending data sets to be written to t
On Mon, 04 Feb 2008 09:43:04 +, Odysseus wrote:
> In article <[EMAIL PROTECTED]>,
> Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
>
>> def extract_data(names, na, cells):
>> found = dict()
>
> The problem with initializing the 'super-dictionary' within this
> function is that I w
On 2008-02-04, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Jon Ribbens wrote:
>> Why? I don't think you do.
>> Neither does BSD daemon.c or glibc daemon.c
>
> The problem is well documented at
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66012
OK I understand what is being said here
It doesn't matter how many doors opening and closing there are, it
matters the order in which the opening, walking through, and closing
are done. That's my point. In the second example, all of the disk
operations are done at the same time. That's what I meant by people
going through the doors.
[EMAIL PROTECTED] wrote:
> You just described what XUL aims to be
> http://developer.mozilla.org/en/docs/The_Joy_of_XUL
> http://developer.mozilla.org/en/docs/XULRunner
>
> At present it lacks for sure documentation (or maybe it isn't
> organized really well)
Just took a look at XUL and it in som
On Mon, 04 Feb 2008 10:48:32 -0800, rdahlstrom wrote:
> It doesn't matter how many doors opening and closing there are, it
> matters the order in which the opening, walking through, and closing
> are done. That's my point. In the second example, all of the disk
> operations are done at the same
On Feb 4, 12:53 pm, rdahlstrom <[EMAIL PROTECTED]> wrote:
> On Feb 4, 10:17 am, Steven D'Aprano <[EMAIL PROTECTED]
>
>
>
> cybersource.com.au> wrote:
> > After reading an earlier thread about opening and closing lots of files,
> > I thought I'd do a little experiment.
>
> > Suppose you have a whole
On Feb 4, 10:17 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> After reading an earlier thread about opening and closing lots of files,
> I thought I'd do a little experiment.
>
> Suppose you have a whole lot of files, and you need to open each one,
> append a string, then clos
This won't work for builtin functions. It hardly works for functions
and methods defined in 3rd party modules and in no way for functions
defined in C extensions. It adds boilerplate statically to remove it
at runtime.
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
Pydev and Pydev Extensions 1.3.13 have been released
Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com
Release Highlights in Pydev Extensions:
--
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Mon, 04 Feb 2008 13:57:39 +0100, AMD wrote:
>
>> The problem I have under windows is that as soon as I get to 500 files I
>> get the Too many open files message. I tried the same thing in Delphi
>> and I can get to 3000 files. How can I increase the
Chris Mellon wrote:
> Nitpick, but an important one. It emulates *look*. Not feel. Native
> look is easy and totally insufficient for a "native" app - it's the
> feel that's important.
Is this opinion based on firsthand experience with use of the Tile/ttk
widgets on any of the relevant platforms
Ok, simple fix... Updated to MySQL_python-1.2.2 and all ok now! :D
- Original Message -
From: Andy Smith
To: [email protected]
Sent: Monday, February 04, 2008 3:45 PM
Subject: Pysqlite issue no attribute 'autocommit'
Hi there,
Im trying to run a Python based pro
On Jan 29, 11:50 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> Jens schrieb:
>
>
>
> > On Jan 25, 3:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> Jens schrieb:
>
> >>> Hello Everyone
> >>> I'm newbie toZopeand i have a few questions regarding external
> >>> methods. What i wan't t
To create a deamon, you indeed need to fork two times. For more
information and a working example see:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm
quite sure this works, because I used it several times to create a deamon.
Jon Ribbens wrote:
> On 2008-02-04, Christian H
On Feb 4, 10:11 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> This is nice.
Thanks.
> * I wouldn't choose '&' as the composing operator as when I read
> 'double & square' I think 'take an x, double it & square it' which is
> the wrong interpretation (perhaps << instead?).
A very good point t
>
> Another toolkit you might look into is Tkinter. I think it is something
> like the "official" toolkit for python. I also think it is an adapter
> for other toolkits, so it will use gtk widgets on gnome, qt widgets on
> kde and some other strange widgets on windows.
>
Not t so, AFAIK. Tkinter
On Jan 29, 2:36 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I need to extend the import mechanism to support another file type.
> > I've already written the necessary C library to read the file and
> > return a python code object.
>
> > I found one example which just
On Feb 3, 10:31 pm, 7stud <[EMAIL PROTECTED]> wrote:
> On Feb 3, 10:28 pm, 7stud <[EMAIL PROTECTED]> wrote:
>
> > From the docs:
>
> > issubclass(class, classinfo)
> > Return true if class is a subclass (direct or indirect) of classinfo.
>
> print issubclass(Dog, object) #True
> print issubclass(t
On 2008-02-04, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> I need to launch a Python script, and fork it so that the calling
> script can resume with the next step will the Python script keeps
> running.
>
> I tried those two, but they don't work, as the calling script is stuck
> until the Py
[EMAIL PROTECTED] wrote:
> Hi all,
>
> I apologize if this question was already answered before but I was
> unable to find a proper solution to my problem. Anyways, I am trying
> to run shaderobjects.py on Windows (Python 2.5.1) by just double-
> clicking, and I got the following error:
>
> [...]
>
On Sun, 03 Feb 2008 20:38:41 +0100, Thomas Dybdahl Ahle <[EMAIL PROTECTED]>
wrote:
[snip]
> Another toolkit you might look into is Tkinter. I think it is something
> like the "official" toolkit for python. I also think it is an adapter
> for other toolkits, so it will use gtk widgets on gnome, qt
On Monday 04 February 2008 19:14:13 John Nagle wrote:
>I'm getting some wierd commit-related behavior from MySQLdb. I'm
> using InnoDB, so transactions really matter.
>
> I'm currently doing
>
> cursor = db.cursor()
> cursor.execute(...)
> cursor.close()
> db.commit()
>
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>On Thu, 24 Jan 2008 13:34:56 +, Antoon Pardon wrote:
>
>> On 2008-01-21, Steven D'Aprano <[EMAIL PROTECTED]>
>> wrote:
>>> On Sun, 20 Jan 2008 21:15:02 -0600, Albert Hopkins wrote:
>>>
>>> According to the IEEE-754 sta
[EMAIL PROTECTED] a écrit :
>
> You just described what XUL aims to be
> http://developer.mozilla.org/en/docs/The_Joy_of_XUL
> http://developer.mozilla.org/en/docs/XULRunner
XUL is great but it does not allow yet to use Python.
There use to be such a beast, it was named 'Nufox'...
Give a try to
Thanks.
--
http://mail.python.org/mailman/listinfo/python-list
On 4 Feb, 18:45, USCode <[EMAIL PROTECTED]> wrote:
> Wouldn't it be handy if there was a web framework that allowed you to
> create pages and control the interface like you would using a
> client-side GUI framework such as Tkinter?
>
> The framework would need a small, fast web server that would
>
On Mon, 04 Feb 2008 15:17:18 +, Steven D'Aprano wrote:
> # Method one: grouped by file.
> for each file:
> open the file, append the string, then close it
>
>
> # Method two: grouped by procedure.
> for each file:
> open the file
> for each open file:
> append the string
> for ea
* Steven D'Aprano wrote:
> On Sun, 03 Feb 2008 15:31:49 -0800, Paul Boddie wrote:
>
>> I don't know whether I can offer much better advice than others, but I
>> have noticed that a lot of my own code has moved in the direction of not
>> having specific default values in function/method signatures
On Mon, 2008-02-04 at 19:53 +0100, Frank Aune wrote:
> No, you obviously need to commit your changes before closing the cursor. I'm
> surprised if your code above even works if adding content to the db.
Why is that obvious? Is this some MySQL-specific oddity? In other
databases, it's the cursor's
Chris Mellon wrote:
>
> I didn't say inherently unable, I said the toolkit doesn't provide it.
> Note that you said that you did a lot of work to follow OS X
> conventions and implement behavior. The toolkit doesn't help you with
> any of this. A mac-native toolkit (or one that strives for native
On Feb 4, 2008 1:36 AM, 7stud <[EMAIL PROTECTED]> wrote:
> print dir(type) #__mro__ attribute is in here
> print dir(object) #no __mro__ attribute
>
>
> class Mammals(object):
> pass
> class Dog(Mammals):
> pass
>
> print issubclass(Dog, type) #False
> print Dog.__mro__
>
> --outpu
On 2008-02-04, Rolf van de Krol <[EMAIL PROTECTED]> wrote:
> To create a deamon, you indeed need to fork two times. For more
> information and a working example see:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/278731 . I'm
> quite sure this works, because I used it several times to
In article <[EMAIL PROTECTED]>,
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> Rather complicated description... A sample of the real/actual input
> /file/ would be useful.
Sorry, I didn't want to go on too long about the background, but I guess
more context would have helped. The data
Hello,
My program uses the subprocess module to spawn a child and capture its
output. What I'd like to achieve is that stdout is parsed after the
subprocess finishes, but anything that goes to stderr is printed
immediately. The code currently looks like:
try:
test = Popen(test_pa
AMD wrote:
> Hello,
>
> I need to split a very big file (10 gigabytes) into several thousand
> smaller files according to a hash algorithm, I do this one line at a
> time. The problem I have is that opening a file using append, writing
> the line and closing the file is very time consuming. I'd
On Feb 4, 6:53 am, André Malo <[EMAIL PROTECTED]> wrote:
> * Steven D'Aprano wrote:
> > On Sun, 03 Feb 2008 15:31:49 -0800, Paul Boddie wrote:
>
> >> I don't know whether I can offer much better advice than others, but I
> >> have noticed that a lot of my own code has moved in the direction of not
On Mon, 04 Feb 2008 12:25:24 +, Odysseus wrote:
> I'm not clear on what makes an object global, other than appearing as an
> operand of a "global" statement, which I don't use anywhere. But "na" is
> assigned its value in the program body, not within any function: does
> that make it global
I can understand that. But look at the bright side, you don't have to
rely on windows authentication, you just need an open port. Now i
don't know what you are building, but with a client/server setup you
can also get to other data that you might need, like mouse movement to
detect for activity, us
7stud wrote:
> On Feb 3, 10:28 pm, 7stud <[EMAIL PROTECTED]> wrote:
>> From the docs:
>>
>> issubclass(class, classinfo)
>> Return true if class is a subclass (direct or indirect) of classinfo.
>
>
> print issubclass(Dog, object) #True
> print issubclass(type, object) #True
> print issubclass(D
[EMAIL PROTECTED] wrote:
> On Jan 29, 2:36 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>> [EMAIL PROTECTED] wrote:
>>> I need to extend the import mechanism to support another file type.
>>> I've already written the necessary C library to read the file and
>>> return a python code object.
>>> I fou
Thomas Bellman wrote:
> The readlines() method will read until it reaches end of file (or
> an error occurs), not just what is available at the moment. You
> can see that for your self by running:
Bad idea ;)
readlines() on a subprocess Popen instance will block when you PIPE more
than one strea
On Feb 4, 2008 9:19 AM, <[EMAIL PROTECTED]> wrote:
>
> >
> > Another toolkit you might look into is Tkinter. I think it is something
> > like the "official" toolkit for python. I also think it is an adapter
> > for other toolkits, so it will use gtk widgets on gnome, qt widgets on
> > kde and some
On Feb 3, 7:17 pm, [EMAIL PROTECTED] wrote:
> I'm considering writing a little interpreter for a python-like
> language and I'm looking for name suggestions. :-)
>
> Basically, I don't want to change a whole lot about Python. In fact,
> I see myself starting with the compiler module from Python 2.
On Feb 3, 3:55 pm, Norm Matloff <[EMAIL PROTECTED]> wrote:
> I have something of an obsession with debuggers, so I was glad to see
> this posting. While we're on the subject, I might as well add my own
> small contribution, which I call Xpdb.
>
> Xpdb is available athttp://heather.cs.ucdavis.edu/~
Hi Guru's,
As a python newb, I was thinking about trying to implement a program
that converts whistled music into midi; the idea coming from a
proposed application in the Mydreamapp competition hosted last year,
more details here: http://stratfordisland.com/whistler/
So, does anyone have a sugge
OK - I know how to get the text/title of the windows on a local system
by using the window handle. What I want to do is to get the text/
title of the windows on a remote system. Enumerating the window
handles will of course not work remotely, I know that. Does anyone
know anything short of a cli
On Feb 4, 1:12 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Feb 4, 12:53 pm, rdahlstrom <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Feb 4, 10:17 am, Steven D'Aprano <[EMAIL PROTECTED]
>
> > cybersource.com.au> wrote:
> > > After reading an earlier thread about opening and closing lots of files,
> > >
On Feb 4, 2:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Well, i guess you will need a process on each machine you need to
> monitor, and then you do have a client server setup.
>
> This can be easily accomplished with fx Pyro (http://
> pyro.sourceforge.net/) for communication, and the
I'm getting some wierd commit-related behavior from MySQLdb. I'm
using InnoDB, so transactions really matter.
I'm currently doing
cursor = db.cursor()
cursor.execute(...)
cursor.close()
On 4 Ún, 11:49, Thomas Bellman <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > try:
> > test = Popen(test_path,
> > stdout=PIPE,
> > stderr=PIPE,
> > close_fds=True,
> >
Carsten Haese wrote:
> On Mon, 2008-02-04 at 19:53 +0100, Frank Aune wrote:
>> No, you obviously need to commit your changes before closing the cursor. I'm
>> surprised if your code above even works if adding content to the db.
>
> Why is that obvious? Is this some MySQL-specific oddity? In other
1 - 100 of 152 matches
Mail list logo