[ANN] Next Meeting of pyCologne, January, 13th

2010-01-10 Thread Thomas Lenarz
Hello, The first meeting of pyCologne in 2010 will take place Wednesday, January, 13th starting about 6.30 pm - 6.45 pm at Room 0.14, Benutzerrechenzentrum (RRZK-B) University of Cologne, Berrenrather Str. 136, 50937 Köln, Germany Agenda: * Short-Introduction into the ConfigParser module and

Release of version 0.21.0 of CodeInvestigator

2010-01-10 Thread hans moleman
CodeInvestigator 0.21.0 was released on January 11. Bug changes: - In Windows, a shortcut was only created when an Administrator did the install: Administrator privileges are no longer required. Functionality changes: - Tabs styling. - Drive letters show in the sub-menu under Windows. -

REMINDER: OSCON 2010: Call for Proposals

2010-01-10 Thread Aahz
Deadline: Feb 1, 2010 OSCON, the O'Reilly Open Source Convention July 19 - 23, 2010 Oregon Convention Center Portland, OR http://post.oreilly.com/rd/9z1zg6ii2gsi1l6cshb1806k2apmotnacpkrk77ttgg Faster, Freer, Smarter: Whatever your Goal, Make It Happen with Open Source More than 2,500 experts,

Re: subprocess.Popen does not close pipe in an error case

2010-01-10 Thread Nobody
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

Re: Ask how to use HTMLParser

2010-01-10 Thread Nobody
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

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
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

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
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 possessing

Computer Music Toolkit (CMT) ?

2010-01-10 Thread Peter Billam
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,

Re: Direct use of bytearray buffers with ctypes ?

2010-01-10 Thread Pakal
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

Re: Prepend to logging message

2010-01-10 Thread Joan Miller
On 10 ene, 03:27, Ishwor Gurung ishwor.gur...@gmail.com wrote: Joan, 2010/1/10 Joan Miller pelok...@gmail.com: 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]? --

Re: Computer Music Toolkit (CMT) ?

2010-01-10 Thread Stefan Behnel
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

Re: Porblem with xlutils/xlrd/xlwt

2010-01-10 Thread pp
On Jan 9, 8:23 am, John Machin sjmac...@lexicon.net wrote: On Jan 9, 9:56 pm, pp parul.pande...@gmail.com wrote: On Jan 9, 3:52 am, Jon Clements jon...@googlemail.com wrote: On Jan 9, 10:44 am, pp parul.pande...@gmail.com wrote: On Jan 9, 3:42 am, Jon Clements jon...@googlemail.com

Re: Prepend to logging message

2010-01-10 Thread Peter Otten
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':

(non-python) upgrading a MySQL database

2010-01-10 Thread Dikkie Dik
... 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 the

Re: Porblem with xlutils/xlrd/xlwt

2010-01-10 Thread John Machin
On Jan 10, 8:51 pm, pp parul.pande...@gmail.com wrote: On Jan 9, 8:23 am, John Machin sjmac...@lexicon.net wrote: On Jan 9, 9:56 pm, pp parul.pande...@gmail.com wrote: On Jan 9, 3:52 am, Jon Clements jon...@googlemail.com wrote: On Jan 9, 10:44 am, pp parul.pande...@gmail.com wrote:

Re: Prepend to logging message

2010-01-10 Thread Joan Miller
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):     def

getopt not raising exception

2010-01-10 Thread Matthew Lear
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

Re: getopt not raising exception

2010-01-10 Thread Matt Nordhoff
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 exception,

integer and string compare, is that correct?

2010-01-10 Thread Hellmut Weber
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 = '5' n =

Re: Prepend to logging message

2010-01-10 Thread Peter Otten
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]? -- class ExtraLog(object):

Re: integer and string compare, is that correct?

2010-01-10 Thread Chris Rebert
On Sun, Jan 10, 2010 at 4:26 AM, Hellmut Weber m...@hellmutweber.de 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

Re: integer and string compare, is that correct?

2010-01-10 Thread Chris Rebert
On Sun, Jan 10, 2010 at 4:46 AM, Chris Rebert c...@rebertia.com wrote: snip 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

Re: Prepend to logging message

2010-01-10 Thread Joan Miller
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 override

Re: integer and string compare, is that correct?

2010-01-10 Thread Peter Otten
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 license for more

Advanced Python programming book?

2010-01-10 Thread flow
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

Re: Prepend to logging message

2010-01-10 Thread Joan Miller
On 10 ene, 13:10, Joan Miller pelok...@gmail.com 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 from the

Advanced Python programming book?

2010-01-10 Thread Ryniek90
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:

Re: lightweight encryption of text file

2010-01-10 Thread Steven D'Aprano
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

[ANN] Spyder v1.0.2 released

2010-01-10 Thread Pierre Raybaut
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

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
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

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
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. So

Re: integer and string compare, is that correct?

2010-01-10 Thread Nobody
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 Otten wrote: The use cases

Re: Advanced Python programming book?

2010-01-10 Thread Tom Pacheco
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:

Re: lightweight encryption of text file

2010-01-10 Thread Daniel Fetchinson
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 nature of a

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody nob...@nowhere.com 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,

Academic Question

2010-01-10 Thread Victor Subervi
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 =

Re: Something More Elegant

2010-01-10 Thread Victor Subervi
On Sat, Jan 9, 2010 at 3:00 PM, Stephen Hansen apt.shan...@gmail.comwrote: On Sat, Jan 9, 2010 at 7:15 AM, Victor Subervi victorsube...@gmail.comwrote: On Sat, Jan 9, 2010 at 9:35 AM, Steve Holden st...@holdenweb.com wrote: But we are now in the realm of theory as far as you are concerned,

Re: integer and string compare, is that correct?

2010-01-10 Thread Peter Otten
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 The second

Re: problem with cheetah

2010-01-10 Thread Aahz
In article 0fd84b05-cf12-485b-a14e-608e47679...@s20g2000yqd.googlegroups.com, mlowicki mlowi...@gmail.com 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

Milliseconds in logging format

2010-01-10 Thread Joan Miller
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]

Re: Academic Question

2010-01-10 Thread MRAB
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

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
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

Re: Milliseconds in logging format

2010-01-10 Thread Irmen de Jong
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]

Bad file descriptor in HTTPServer using Multiprocessing.

2010-01-10 Thread Adam Tauno Williams
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

How to use list type generated by SWIG?

2010-01-10 Thread Bryan
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

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
geremy condra debat...@gmail.com 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

Re: Microsoft Office Word and Python (Win XP)

2010-01-10 Thread 3lvss0...@gmail.com
so does anyone know how I could do this? -- http://mail.python.org/mailman/listinfo/python-list

Re: getopt not raising exception

2010-01-10 Thread Matthew Lear
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

Re: getopt not raising exception

2010-01-10 Thread Emmanuel Surleau
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 --

class viewer ?

2010-01-10 Thread Stef Mientki
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

setTextAlignment function Qtablewidget PyQt

2010-01-10 Thread Zabin
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 --

sys.stdout vs. sys.stderr

2010-01-10 Thread Mitchell L Model
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

Re: setTextAlignment function Qtablewidget PyQt

2010-01-10 Thread Zabin
On Jan 11, 1:10 pm, Zabin zabin.faris...@gmail.com 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!

Fractional Hours from datetime?

2010-01-10 Thread W. eWatson
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 --

Python Goldmine has been updated: http://preciseinfo.org/Convert/index_Convert_Python.html

2010-01-10 Thread tanix
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

Re: Introspection

2010-01-10 Thread m...@infoserv.dk
Thanks Miki and Jason. I knew it could be done :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Manipulating pointers in C using ctypes

2010-01-10 Thread Daniel Platz
Thanks for valuable answers. Both solutions work and I understand my mistake. Best regards, Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Office Word and Python (Win XP)

2010-01-10 Thread 3lvss0...@gmail.com
? -- http://mail.python.org/mailman/listinfo/python-list

Re: Microsoft Office Word and Python (Win XP)

2010-01-10 Thread 3lvss0...@gmail.com
no idea :-( -- http://mail.python.org/mailman/listinfo/python-list

Re: Computer Music Toolkit (CMT) ?

2010-01-10 Thread Terry Reedy
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

Re: Python Goldmine has been updated: http://preciseinfo.org/Convert/index_Convert_Python.html

2010-01-10 Thread Terry Reedy
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

Re: Python Goldmine has been updated: http://preciseinfo.org/Convert/index_Convert_Python.html

2010-01-10 Thread Steve Holden
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 topics, covered

Re: Python Goldmine has been updated: http://preciseinfo.org/Convert/index_Convert_Python.html

2010-01-10 Thread Steve Holden
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 one

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
On Sun, 10 Jan 2010 08:54:51 -0800, Paul Rubin wrote: Nobody nob...@nowhere.com 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

Re: lightweight encryption of text file

2010-01-10 Thread Nobody
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

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
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 fake HTTPS

Re: Fractional Hours from datetime?

2010-01-10 Thread Austyn
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 wolftra...@invalid.com wrote: Maybe there's a more elegant way to do

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-10 Thread Dave WB3DWE
On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh cas...@gmail.com wrote: On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote: On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh cas...@gmail.com wrote: 1) Try the commands again. Make sure all the ./configure options are on one line. Make sure to do

Re: Fractional Hours from datetime?

2010-01-10 Thread Austyn
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 aus...@gmail.com wrote: How about: import time arizona_utc_offset = -7.00 h = (time.time() / 3600 +

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Steve Holden st...@holdenweb.com 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

Re: lightweight encryption of text file

2010-01-10 Thread Paul Rubin
Nobody nob...@nowhere.com 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

Re: py2exe for loop hangs in compiled program

2010-01-10 Thread Aahz
In article mailman.2237.1261415752.2873.python-l...@python.org, 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

Re: How to validate the __init__ parameters

2010-01-10 Thread Aahz
In article mailman.2244.1261418090.2873.python-l...@python.org, Jean-Michel Pichavant jeanmic...@sequans.com 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

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Paul Rubin wrote: Steve Holden st...@holdenweb.com 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

Re: lightweight encryption of text file

2010-01-10 Thread Carl Banks
On Jan 8, 11:14 am, Daniel Fetchinson fetchin...@googlemail.com 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

Re: lightweight encryption of text file

2010-01-10 Thread geremy condra
On Sun, Jan 10, 2010 at 3:26 PM, Paul Rubin no.em...@nospam.invalid wrote: geremy condra debat...@gmail.com 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

Re: lightweight encryption of text file

2010-01-10 Thread Steve Holden
Carl Banks wrote: On Jan 8, 11:14 am, Daniel Fetchinson fetchin...@googlemail.com 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

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-10 Thread casevh
On Jan 10, 8:16 pm, Dave WB3DWE wrote: On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh cas...@gmail.com wrote: On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote: On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh cas...@gmail.com wrote: 1) Try the commands again. Make sure all the ./configure

how to duplicate array entries

2010-01-10 Thread Sebastian
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

Re: how to duplicate array entries

2010-01-10 Thread Sebastian
On Jan 11, 4:21 pm, Sebastian sebastian.lan...@gmx.de 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 --

Re: how to duplicate array entries

2010-01-10 Thread Chris Rebert
On Sun, Jan 10, 2010 at 10:21 PM, Sebastian sebastian.lan...@gmx.de 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

Re: how to duplicate array entries

2010-01-10 Thread Paul Rudin
Sebastian sebastian.lan...@gmx.de 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

Re: integer and string compare, is that correct?

2010-01-10 Thread Dan Bishop
On Jan 10, 10:34 am, Nobody nob...@nowhere.com 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. Can someone give me

Re: how to duplicate array entries

2010-01-10 Thread Gary Herron
Paul Rudin wrote: Sebastian sebastian.lan...@gmx.de 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

Re: how to duplicate array entries

2010-01-10 Thread Steven D'Aprano
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 do it

Re: Advanced Python programming book?

2010-01-10 Thread Marco Salden
On Jan 10, 2:35 pm, flow drnco...@live.com 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

Re: class viewer ?

2010-01-10 Thread Ben Finney
Stef Mientki stef.mien...@gmail.com 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,

[issue7643] What is a Unicode line break character?

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: I don't know what to do about this: - FS, GS, RS are combined marks (CM): “Prohibit a line break between the character and the preceding character” I know they are not commonly used. So we can keep them as line breaks. But if we comply

[issue7582] [patch] diff.py to use iso timestamp

2010-01-10 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Brian, documentation says quite the opposite. time.daylight Nonzero if a DST timezone is defined. http://docs.python.org/library/time.html?highlight=daylight#time.daylight -- ___ Python

[issue7664] python logger does not handle IOError Exception

2010-01-10 Thread Yateen V. Joshi
New submission from Yateen V. Joshi yjo...@starentnetworks.com: I am running an in house application that uses multiprocessing logger. This application ftp's files from a remote host and keep them on a local disk. Here is the scenario - While pulling the files, I make the local disk full

[issue6965] tmpnam should not be used if tempfile or mkstemp are available

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: I get similar warnings while building on Debian AMD64: (...) libpython2.7.a(posixmodule.o): In function `posix_tmpnam': ./Modules/posixmodule.c:7193: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'

[issue2973] _ssl compiler warnings

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Still occurs on dev and py3k. And patch applies correctly. -- nosy: +flox versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2973

[issue6965] tmpnam should not be used if tempfile or mkstemp are available

2010-01-10 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- type: - compile error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6965 ___ ___ Python-bugs-list

[issue2973] _ssl compiler warnings

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: It occurs on Debian Lenny AMD64. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2973 ___ ___

[issue7662] time.utcoffset()

2010-01-10 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: Answered in msg97503 In the meanwhile it looks like another proposal about RFC format in issue #7584 doesn't account for proper timezone too. -- ___ Python tracker rep...@bugs.python.org

[issue6965] tmpnam should not be used if tempfile or mkstemp are available

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Then close it as duplicate of issue486434, which was closed for the same reason. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org

[issue7532] Extended slicing with classic class behaves strangely

2010-01-10 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks! Applied in r77408. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7532 ___

[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1

2010-01-10 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- priority: low - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5377 ___ ___

[issue7661] compiling ctypes fails with non-ascii path

2010-01-10 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Patch attached. -- keywords: +patch nosy: +flox stage: needs patch - patch review versions: +Python 3.2 Added file: http://bugs.python.org/file15815/issue7661_ctypes_path.diff ___ Python tracker

[issue7661] compiling ctypes fails with non-ascii path

2010-01-10 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- components: +Build, ctypes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7661 ___ ___

  1   2   >