On Wed, 06 Jan 2010 19:05:40 -0800, Steven K. Wong wrote:
> Well, the example code at
> http://www.python.org/ ... /subprocess.html#replacing-shell-pipeline
> has the same issue:
> Perhaps the doc can be improved to remind folks to close p1.stdout if
> the calling process doesn't need it, unless
On Fri, 08 Jan 2010 11:44:48 +0800, Water Lin wrote:
> I am a new guy to use Python, but I want to parse a html page now. I
> tried to use HTMLParse. Here is my sample code:
> --
> from HTMLParser import HTMLParser
Note that HTMLParser only tokenises HTML; it doesn't actually
On Fri, 08 Jan 2010 20:14:51 +0100, Daniel Fetchinson wrote:
> I have a plain text file which I would like to protect in a very
> simple minded, yet for my purposes sufficient, way. I'd like to
> encrypt/convert it into a binary file in such a way that possession of
> a password allows anyone to c
>> I have a plain text file which I would like to protect in a very
>> simple minded, yet for my purposes sufficient, way. I'd like to
>> encrypt/convert it into a binary file in such a way that possession of
>> a password allows anyone to convert it back into the original text
>> file while not po
Greetings. Is there a way to get at the Computer Music Toolkit (CMT)
http://www.ladspa.org/cmt/
functionality from Python (Python3 in my case) ?
Googling is confusing because of www.cmt.com and cmt-graph and
openscientist.lal.in2p3.fr/v9/cmt.html and pyAMISecure_and_cmt
and so on...
Regards, P
Oki, it seems I've found.
To directly use a bytearray buffer from ctypes, you must first create
a compatible ctypes type (I.E, a char array of same size), and only
then instanciate this new type with newtype.from_buffer
(bytearray_object).
The little danger is : you must NOT change the size of by
On 10 ene, 03:27, Ishwor Gurung wrote:
> Joan,
>
> 2010/1/10 Joan Miller :
>
>
>
> > How to prepend anything to a logging message? Is possible to do it
> > from the dictionary object (ExtraLog) or is there is that override
> > process() [1]?
>
> > --
> > class ExtraLog(object):
>
>
Peter Billam, 10.01.2010 10:15:
Greetings. Is there a way to get at the Computer Music Toolkit (CMT)
http://www.ladspa.org/cmt/
functionality from Python (Python3 in my case) ?
Googling is confusing because of www.cmt.com and cmt-graph and
openscientist.lal.in2p3.fr/v9/cmt.html and pyAMISecure
On Jan 9, 8:23 am, John Machin wrote:
> On Jan 9, 9:56 pm, pp wrote:
>
> > On Jan 9, 3:52 am, Jon Clements wrote:
>
> > > On Jan 9, 10:44 am, pp wrote:
>
> > > > On Jan 9, 3:42 am, Jon Clements wrote:
>
> > > > > On Jan 9, 10:24 am, pp wrote:
> > > > yeah all my versions are latest fromhttp:/
Joan Miller wrote:
> How to prepend anything to a logging message? Is possible to do it
> from the dictionary object (ExtraLog) or is there is that override
> process() [1]?
>
> --
> class ExtraLog(object):
>
> def __getitem__(self, name):
> if name == 'foo':
>
>> ... And I am interested in cleaning this up. I should probably
>> start with the matter of databases, since that's something I won't be able
>> to easily change once clients actually start entering data. Please share
>> with me any further concepts or questions to get me thinking how to redesign
On Jan 10, 8:51 pm, pp wrote:
> On Jan 9, 8:23 am, John Machin wrote:
>
>
>
> > On Jan 9, 9:56 pm, pp wrote:
>
> > > On Jan 9, 3:52 am, Jon Clements wrote:
>
> > > > On Jan 9, 10:44 am, pp wrote:
>
> > > > > On Jan 9, 3:42 am, Jon Clements wrote:
>
> > > > > > On Jan 9, 10:24 am, pp wrote:
>
On 10 ene, 10:26, Peter Otten <__pete...@web.de> wrote:
> Joan Miller wrote:
> > How to prepend anything to a logging message? Is possible to do it
> > from the dictionary object (ExtraLog) or is there is that override
> > process() [1]?
>
> > --
> > class ExtraLog(object):
>
> >
Hello,
I'm having problems getting getopt to function correctly. Basically, no
exception is being raised if no argument is passed to the code snippet
below. I've read the Python documentation and tried example code from
various sources which should cause an exception, only they don't. I've
also tr
Matthew Lear wrote:
> Hello,
>
> I'm having problems getting getopt to function correctly. Basically, no
> exception is being raised if no argument is passed to the code snippet
> below. I've read the Python documentation and tried example code from
> various sources which should cause an exceptio
Hi,
being a causal python user (who likes the language quite a lot)
it took me a while to realize the following:
l...@sylvester py_count $ python
Python 2.6.3 (r263:75183, Oct 26 2009, 12:34:23)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> max
Joan Miller wrote:
> On 10 ene, 10:26, Peter Otten <__pete...@web.de> wrote:
>> Joan Miller wrote:
>> > How to prepend anything to a logging message? Is possible to do it
>> > from the dictionary object (ExtraLog) or is there is that override
>> > process() [1]?
>>
>> > --
>> > cla
On Sun, Jan 10, 2010 at 4:26 AM, Hellmut Weber wrote:
> Hi,
> being a causal python user (who likes the language quite a lot)
> it took me a while to realize the following:
>
>
> l...@sylvester py_count $ python
> Python 2.6.3 (r263:75183, Oct 26 2009, 12:34:23)
> [GCC 4.4.1] on linux2
> Type "hel
On Sun, Jan 10, 2010 at 4:46 AM, Chris Rebert wrote:
> The behavior of disparate types being comparable is deprecated and has
> been removed in Python 3.0+; don't rely upon it.
Clarification: Equality testing between disparate types still works
unaltered however.
By "comparable", I meant >, <, >
On 10 ene, 12:36, Peter Otten <__pete...@web.de> wrote:
> Joan Miller wrote:
> > On 10 ene, 10:26, Peter Otten <__pete...@web.de> wrote:
> >> Joan Miller wrote:
> >> > How to prepend anything to a logging message? Is possible to do it
> >> > from the dictionary object (ExtraLog) or is there is that
Hellmut Weber wrote:
> being a causal python user (who likes the language quite a lot)
> it took me a while to realize the following:
>
>
> l...@sylvester py_count $ python
> Python 2.6.3 (r263:75183, Oct 26 2009, 12:34:23)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "licens
I've just finished reading a sort of beginner Python book, and I know
quite a bit now but I'm looking for a book that can teach me advanced
aspects of Python - code optimisation, threading, etc.
Any recommendations?
Cheers.
--
http://mail.python.org/mailman/listinfo/python-list
On 10 ene, 13:10, Joan Miller wrote:
> On 10 ene, 12:36, Peter Otten <__pete...@web.de> wrote:
>
>
>
> > Joan Miller wrote:
> > > On 10 ene, 10:26, Peter Otten <__pete...@web.de> wrote:
> > >> Joan Miller wrote:
> > >> > How to prepend anything to a logging message? Is possible to do it
> > >> > f
> I've just finished reading a sort of beginner Python book, and I know
> quite a bit now but I'm looking for a book that can teach me advanced
> aspects of Python - code optimisation, threading, etc.
>
> Any recommendations?
>
> Cheers.
Check those link:
http://www.amazon.com/Beginning-Python-V
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote:
> Thanks, this looks very simple too, but where is the decryption code?
> Wikipedia seems to suggest that encryption and decryption are both the
> same but running crypt on the output of crypt doesn't give back the
> original string. So
Hi all,
I'm pleased to announce here that Spyder version 1.0.2 has been released:
http://packages.python.org/spyder
Previously known as Pydee, Spyder (Scientific PYthon Development
EnviRonment) is a free open-source Python development environment
providing MATLAB-like features in a simple and li
On Sun, 10 Jan 2010 09:59:31 +0100, Daniel Fetchinson wrote:
> Thanks, this looks very simple too, but where is the decryption code?
> Wikipedia seems to suggest that encryption and decryption are both the
> same but running crypt on the output of crypt doesn't give back the
> original string. So
On Sun, 10 Jan 2010 15:30:12 +, Steven D'Aprano wrote:
>> Thanks, this looks very simple too, but where is the decryption code?
>> Wikipedia seems to suggest that encryption and decryption are both the
>> same but running crypt on the output of crypt doesn't give back the
>> original string. S
Hellmut Weber wrote:
>> being a causal python user (who likes the language quite a lot)
>> it took me a while to realize the following:
>> >>> max = '5'
>> >>> n = 5
>> >>> n >= max
>> False
>
>> Section 5.9 Comparison describes this.
>>
>> Can someone give me examples of use cases
Peter Ot
Ryniek90 wrote:
I've just finished reading a sort of beginner Python book, and I know
quite a bit now but I'm looking for a book that can teach me advanced
aspects of Python - code optimisation, threading, etc.
Any recommendations?
Cheers.
Check those link:
http://www.amazon.com/Beginni
>> Thanks, this looks very simple too, but where is the decryption code?
>> Wikipedia seems to suggest that encryption and decryption are both the
>> same but running crypt on the output of crypt doesn't give back the
>> original string. So probably I'm misunderstanding something.
>
> Yes, the natu
Nobody writes:
> RC4 (aka ArcFour) is quite trivial to implement, and better than inventing
> your own cipher or using a Vignere: ...
That's a cute implementation, but it has no authentication and doesn't
include any randomness, which means if you use the same key for two
inputs, there is a secur
Hi;
The following code that works:
#! /usr/bin/python
import string
import cgitb; cgitb.enable()
import cgi
import MySQLdb
import sys,os
from sets import Set
import fpformat
cwd = os.getcwd()
sys.path.append(cwd)
from login import login
from particulars import ourOptions
form = cgi.FieldStorage(
On Sat, Jan 9, 2010 at 3:00 PM, Stephen Hansen wrote:
> On Sat, Jan 9, 2010 at 7:15 AM, Victor Subervi wrote:
>
>> On Sat, Jan 9, 2010 at 9:35 AM, Steve Holden wrote:
>>
>>> But we are now in the realm of theory as far as you are concerned, since
>>> you have already stated several times that you
Somebody wrote:
> If you actually need to perform comparisons across types, you can rely
> upon the fact that tuple comparisons are non-strict and use e.g.:
>
> > a = 5
> > b = '5'
> > (type(a).__name__, a) < (type(b).__name__, b)
> True
> > (type(a).__name__, a) > (type(b).__name__, b)
> False
>
In article <0fd84b05-cf12-485b-a14e-608e47679...@s20g2000yqd.googlegroups.com>,
mlowicki wrote:
>
>Hi!, i get such error when I try to install cheetah:
Probably better to ask on the Cheetah list:
https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
--
Aahz (a...@pythoncraft.com
How the logging '%(asctime)s' [1] specifier to gets the millisecond
portion of the time if there is not a directive to get it from the
time module [2] ?
"The date format string follows the requirements of strftime()"
[1] http://docs.python.org/library/logging.html#basic-example
[2] http://docs.p
Victor Subervi wrote:
Hi;
The following code that works:
#! /usr/bin/python
import string
import cgitb; cgitb.enable()
import cgi
import MySQLdb
import sys,os
from sets import Set
import fpformat
cwd = os.getcwd()
sys.path.append(cwd)
from login import login
from particulars import ourOptions
Not sure why in the world you would homebrew something like this- a
small dependency isn't that bad, and aes can be pretty simple to use.
Might as well go for the industrial strength approach.
Geremy Condra
--
http://mail.python.org/mailman/listinfo/python-list
On 10-1-2010 20:04, Joan Miller wrote:
How the logging '%(asctime)s' [1] specifier to gets the millisecond
portion of the time if there is not a directive to get it from the
time module [2] ?
"The date format string follows the requirements of strftime()"
[1] http://docs.python.org/library/logg
I have a Python multiprocessing application where a master process
starts server sub-processes and communicates with them via Pipes; that
works very well. But one of the subprocesses, in turn, starts a
collection of HTTPServer 'workers' (almost exactly as demonstrated in
the docs). This works pe
I am writing a small script to manage my ipod. I am using the python
bindings for libgpod. I have never used swig, or used python to
program against a c/c++ library.
I can get the library to find my ipod, and parse its DB format, but
I'm not sure how to interact with the types that some of the f
geremy condra writes:
> Not sure why in the world you would homebrew something like this- a
> small dependency isn't that bad, and aes can be pretty simple to use.
> Might as well go for the industrial strength approach.
In my experience, 1) small dependencies ARE that bad, since they mean
you ha
so does anyone know how I could do this?
--
http://mail.python.org/mailman/listinfo/python-list
Matt Nordhoff wrote:
> BTW: Checked out optparse? It's bigger and sexier!
Thanks for the tip. Works a treat.
-- Matt
--
http://mail.python.org/mailman/listinfo/python-list
> Matt Nordhoff wrote:
> > BTW: Checked out optparse? It's bigger and sexier!
If you're doing things with positional arguments, you should consider using
argparse (http://argparse.googlecode.com/svn/tags/r101/doc/index.html). It's
like optparse, but (much) better.
Cheers,
Emm
--
http://mail.
hello,
I'd like to have a class viewer, something different from pydoc,
and I wonder if someone has made something similar.
from the given class, it's ancestors and it's derived classes,
I'ld like to get the following information in a tree like structure:
- the file were the class is definied
-
Hey!
I am trying to align contents of some table cells but find the code
below working for some fields and not for others. I am stuck as to why
this is happening. Help will be gretly appreciated!
setTextAlignment(QtCore.Qt.AlignVCenter)
Cheers
Zabin
--
http://mail.python.org/mailman/listinfo/py
In Python 3.1 is there any difference in the buffering behavior of the
initial sys.stdout and sys.stderr streams? They are both line_buffered
and stdout doesn't seem to use a larger-grain buffering, so they seem
to be identical with respect to buffering. Were they different at some
earlier
On Jan 11, 1:10 pm, Zabin wrote:
> Hey!
>
> I am trying to align contents of some table cells but find the code
> below working for some fields and not for others. I am stuck as to why
> this is happening. Help will be gretly appreciated!
>
> setTextAlignment(QtCore.Qt.AlignVCenter)
>
> Cheers
> Z
Maybe there's a more elegant way to do this. I want to express the
result of datetime.datetime.now() in fractional hours.
Here's one way.
dt=datetime.datetime.now()
xtup = dt.timetuple()
h = xtup[3]+xtup[4]/60.0+xtup[5]/3600.00+xtup[6]/10**6
# now is in fractions of an hour
--
http://mail.pyth
Python Goldmine collection contains the extensive collection of articles
going back several years. It includes thousands of code
examples and expert discussions on all major topics.
The information is organized by relevant topics, covered
by the corresponding chapters.
The information was filtere
Thanks Miki and Jason. I knew it could be done :-)
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for valuable answers. Both solutions work and I understand my
mistake.
Best regards,
Daniel
--
http://mail.python.org/mailman/listinfo/python-list
?
--
http://mail.python.org/mailman/listinfo/python-list
no idea :-(
--
http://mail.python.org/mailman/listinfo/python-list
On 1/10/2010 4:15 AM, Peter Billam wrote:
Greetings. Is there a way to get at the Computer Music Toolkit (CMT)
http://www.ladspa.org/cmt/
functionality from Python (Python3 in my case) ?
You can access compiled C shared libraries most easily via the ctypes
module.
Searching Python CMT "Co
On 1/8/2010 11:50 AM, tanix wrote:
Python Goldmine collection contains the extensive collection of articles
going back several years. It includes thousands of code
examples and expert discussions on all major topics.
The information is organized by relevant topics, covered
by the corresponding c
Terry Reedy wrote:
> On 1/8/2010 11:50 AM, tanix wrote:
>> Python Goldmine collection contains the extensive collection of articles
>> going back several years. It includes thousands of code
>> examples and expert discussions on all major topics.
>>
>> The information is organized by relevant topic
Steve Holden wrote:
[...]
> Because I habitually run the NoScript extension to Firefox the popups
> didn't appear, but there didn't seem to be any original content on this
> site. Google continues to be your friend.
>
And dammit, why didn't I think to strip the links out instead of
creating yet on
On Sun, 10 Jan 2010 08:54:51 -0800, Paul Rubin wrote:
> Nobody writes:
>> RC4 (aka ArcFour) is quite trivial to implement, and better than inventing
>> your own cipher or using a Vignere: ...
>
> That's a cute implementation, but it has no authentication and doesn't
> include any randomness, whi
On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote:
> I'd like it a lot if the Python stdlib could include a serious
> cryptography module.
And I'd like a truckload of gold ;)
Right now, even asking for HTTPS support is too much to ask. Heck,
even asking for the fake HTTPS support to be identi
Nobody wrote:
> On Sun, 10 Jan 2010 12:26:05 -0800, Paul Rubin wrote:
>
>> I'd like it a lot if the Python stdlib could include a serious
>> cryptography module.
>
> And I'd like a truckload of gold ;)
>
> Right now, even asking for HTTPS support is too much to ask. Heck,
> even asking for the f
How about:
import time
arizona_utc_offset = -7.00
h = (time.time() / 3600 + arizona_utc_offset) % 24
dt.timetuple()[6] is the day of the week; struct tm_time doesn't
include a sub-second field.
On Jan 10, 10:28 am, "W. eWatson" wrote:
> Maybe there's a more elegant way to do this. I want to exp
On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh
wrote:
>On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
>> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh
>> wrote:
>
>1) Try the commands again. Make sure all the "./configure" options are
>on one line. Make sure to do "sudo make altinstall". (D
Here's an improvement in case you want your code to work outside of
Arizona:
from time import time, timezone
h = ((time() - timezone) / 3600) % 24
On Jan 10, 9:04 pm, Austyn wrote:
> How about:
>
> import time
> arizona_utc_offset = -7.00
> h = (time.time() / 3600 + arizona_utc_offset) % 24
>
>
Steve Holden writes:
>> Right now, even asking for HTTPS support is too much to ask. Heck,
>> even asking for the fake HTTPS support to be identified as such is too
>> much, apparently.
>>
> No, Paul, nobody will complain if you *ask* ...
Er, that wasn't me...
> A question I've been asking myse
Nobody writes:
> But, yeah, the OP needs to be aware of the difference (and probably isn't,
> yet). So to take that a step further ...
> The key passed to arcfour.schedule() shouldn't be re-used
> If you need to verify the data, append a hash of the ciphertext ...
> If you want to encrypt mul
In article ,
p_tierchen <1...@sms.at> wrote:
>
>the application is an interface to a sqlite database and stores image
>metadata (such as year, event, photographer, people on image etc.). i
>use pyqt4 for the interface and developed this application on a linux
>platform (python 2.5.4). friends of m
In article ,
Jean-Michel Pichavant wrote:
>
>class A:
>def __init__(self, foo = None, bar = None):
>if len(foo) > 5:
> raise ValueError('foo cannot exceed 5 characters')
Bad Idea -- what happens when foo is None?
--
Aahz (a...@pythoncraft.com) <*> htt
Paul Rubin wrote:
> Steve Holden writes:
>>> Right now, even asking for HTTPS support is too much to ask. Heck,
>>> even asking for the fake HTTPS support to be identified as such is too
>>> much, apparently.
>>>
>> No, Paul, nobody will complain if you *ask* ...
>
> Er, that wasn't me...
>
Oh s
On Jan 8, 11:14 am, Daniel Fetchinson
wrote:
> I have a plain text file which I would like to protect in a very
> simple minded, yet for my purposes sufficient, way. I'd like to
> encrypt/convert it into a binary file in such a way that possession of
> a password allows anyone to convert it back i
On Sun, Jan 10, 2010 at 3:26 PM, Paul Rubin wrote:
> geremy condra writes:
>> Not sure why in the world you would homebrew something like this- a
>> small dependency isn't that bad, and aes can be pretty simple to use.
>> Might as well go for the industrial strength approach.
>
> In my experience
Carl Banks wrote:
> On Jan 8, 11:14 am, Daniel Fetchinson
> wrote:
>> I have a plain text file which I would like to protect in a very
>> simple minded, yet for my purposes sufficient, way. I'd like to
>> encrypt/convert it into a binary file in such a way that possession of
>> a password allows a
On Jan 10, 8:16 pm, Dave WB3DWE wrote:
> On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh
> wrote:
>
> >On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote:
> >> On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh
> >> wrote:
>
> >1) Try the commands again. Make sure all the "./configure" options are
> >o
Hi there,
I have an array x=[1,2,3]
Is there an operator which I can use to get the result
[1,1,1,2,2,2,3,3,3] ?
I tried x*3, which resulted in [1,2,3,1,2,3,1,2,3]
I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3],
[1,2,3]], but this isn't what I want either.
Cheers, Sebastian
--
On Jan 11, 4:21 pm, Sebastian wrote:
> I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3],
> [1,2,3]]
Sorry, I have to correct myself. The quoted line above resulted in
[[1,1,1],[2,2,2],[3,3,3]] of course!
Cheers, Sebastian
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Jan 10, 2010 at 10:21 PM, Sebastian wrote:
> Hi there,
>
> I have an array x=[1,2,3]
>
> Is there an operator which I can use to get the result
> [1,1,1,2,2,2,3,3,3] ?
>
> I tried x*3, which resulted in [1,2,3,1,2,3,1,2,3]
> I also tried [[b,b,b] for b in x] which led to [[1,2,3],[1,2,3],
Sebastian writes:
> Hi there,
>
> I have an array x=[1,2,3]
In python such an object is called a "list".
(In cpython it's implemented as an automatically resizable array.)
>
> Is there an operator which I can use to get the result
> [1,1,1,2,2,2,3,3,3] ?
There's no operator that will give yo
On Jan 10, 10:34 am, Nobody wrote:
> Hellmut Weber wrote:
> >> being a causal python user (who likes the language quite a lot)
> >> it took me a while to realize the following:
> >> >>> max = '5'
> >> >>> n = 5
> >> >>> n >= max
> >> False
>
> >> Section 5.9 Comparison describes this.
>
> >> Ca
Paul Rudin wrote:
Sebastian writes:
Hi there,
I have an array x=[1,2,3]
In python such an object is called a "list".
(In cpython it's implemented as an automatically resizable array.)
Is there an operator which I can use to get the result
[1,1,1,2,2,2,3,3,3] ?
There's
On Sun, 10 Jan 2010 22:21:54 -0800, Sebastian wrote:
> Hi there,
>
> I have an array x=[1,2,3]
You have a list. Python has an array type, but you have to "import array"
to use it.
> Is there an operator which I can use to get the result
> [1,1,1,2,2,2,3,3,3] ?
Not an operator, but you can d
On Jan 10, 2:35 pm, flow wrote:
> I've just finished reading a sort of beginner Python book, and I know
> quite a bit now but I'm looking for a book that can teach me advanced
> aspects of Python - code optimisation, threading, etc.
>
> Any recommendations?
>
> Cheers.
I like to add this one, whi
Stef Mientki writes:
> from the given class, it's ancestors and it's derived classes,
> I'ld like to get the following information in a tree like structure:
>
> - the file were the class is definied
> - the attributes, split in inherited / created / overriden
> - the methodes, split in inherited
84 matches
Mail list logo