Elisa Media Center 0.5.34 Release

2009-03-31 Thread Olivier Tilloy
Dear Python users, The Elisa team is happy to announce the release of Elisa Media Center 0.5.34, code-named Always With Me, Always With You. Elisa is a cross-platform and open-source Media Center written in Python. It uses GStreamer [1] for media playback and pigment [2] to create an appealing

[ANN] Data Plotting Library DISLIN 9.5

2009-03-31 Thread Helmut Michels
Dear Python users, I am pleased to announce version 9.5 of the data plotting software DISLIN. DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported such as

Davy's Ironpython Editor

2009-03-31 Thread daftspan...@gmail.com
DIE (Davy's Ironpython Editor) is a clutter free IronPython code editor with some basic IDE features. The project intentions is to create a editor along the lines of SPE or DrPython for the IronPython world. DIE is easy to deploy (zero install) and will run from a USB key etc. This project is

Re: Unix programmers and Idle

2009-03-31 Thread Niklas Norrthon
On 31 Mar, 01:16, Dale Amon a...@vnl.com wrote: I wonder if someone could point me at documentation on how to debug some of the standard Unix type things in Idle. I cannot seem to figure out how to set my argument line for the program I am debugging in an Idle window. for example:        

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote: It's the configuration problem.  Right now you would use something like ConfigParser or optparse to populate some configuration object, which you would then

Re: Speech activated scripting/macroing for Windows

2009-03-31 Thread John Doe
This might be a better link. http://code.google.com/p/dragonfly/ After getting it to work, at first, it seems excellent for continuous command recognition (with speech activated scripting) in Windows. Yes! -- http://mail.python.org/mailman/listinfo/python-list

Re: Re. suid/sudo in python

2009-03-31 Thread rustom
On Mar 30, 9:41 pm, Martin P. Hellwig martin.hell...@dcuktec.org wrote: Rustom Mody wrote: The essence of your program is that you only want information, that is great! Since that makes it all a bit simpler. How about writing a cronjob that outputs the require information into a file and

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available at http://jasonfager.com/?p=440.

Re: complaints about no replies last week

2009-03-31 Thread Arnaud Delobelle
Arnaud Delobelle wrote: prueba...@latinmail.com writes: [...] I myself asked about how to write a library to efficiently do union and intersection of sets containing time intervals some time ago on this list and got little to no answers. It is a tricky problem. Since I was getting

Re: Thoughts on language-level configuration support?

2009-03-31 Thread rustom
I am not sure I understand your solution. I certainly think that the problem is big, very much bigger than is appreciated. Think of the hoopla in the RoR world about convention-over- configuration. On the other hand I feel that emacs is becoming messier and messier because it has taken up

Re: Deleteing empty directories

2009-03-31 Thread CinnamonDonkey
Steven you are right, isDirEmpty() isn't even used. That's what happens when you try to get a last minute thread going 5 minutes before home time! ;-) Thanx for the responses guys! It's been very useful :) On 30 Mar, 16:38, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 2:54 am, David Stanek dsta...@dstanek.com wrote: On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might

Re: usb mass storage device detection

2009-03-31 Thread Tim Golden
prakash jp wrote: Hi all, I am interested in detecting usb mass storage devices, r there any scripts in python to do so. Thanks in advance. What? Detecting their presence in your pocket? :) Which operating system are you using? It tends to make a difference: these things are quite

Re: unpack the source tarball on Windows

2009-03-31 Thread Michael Torrie
Mensanator wrote: Thanks. Still had to untar the ball, but I also downloaded a trial version of Winzip which took care of that. Right. The proper command is: tar -xvjf tarball.tar.bz2 The recommended GUI for all things archival on Windows I think has to be 7zip. And it's not cursed

Re: Thoughts on language-level configuration support?

2009-03-31 Thread CTO
On the one hand, I can 110% see why you want to reduce boilerplate code and provide a discoverable, common mechanism for automating the two and three-quarters parsers that a lot of applications have to write to handle a config file, CLI, and/or registry values, but why introduce a syntax for it? A

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Steven D'Aprano
On Mon, 30 Mar 2009 23:06:50 -0700, jfager wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: ... This would be a interesting idea, but ultimately no more than a veneer over the current set of configuration possibilities.  Quite how such a system would tell whether to

Re: Creating huge data in very less time.

2009-03-31 Thread John Machin
On Mar 31, 4:44 pm, venutaurus...@gmail.com venutaurus...@gmail.com wrote: Hello all,             I've a requirement where I need to create around 1000 files under a given folder with each file size of around 1GB. The constraints here are each file should have random data and no two files

Re: Relative Imports, why the hell is it so hard?

2009-03-31 Thread Kay Schluehr
On 31 Mrz., 04:55, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Mon, 30 Mar 2009 21:15:59 -0300, Aahz a...@pythoncraft.com escribió: In article mailman.2591.1237922208.11746.python-l...@python.org, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: I'd recommend the oposite - use

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:08 am, rustom rustompm...@gmail.com wrote: I am not sure I understand your solution. Any questions, please ask. I certainly think that the problem is big, very much bigger than is appreciated. Think of the hoopla in the RoR world about convention-over- configuration.

Any other web mail accessor like libgmail?

2009-03-31 Thread Ken
Is there other python wrapper such as libhotmail or libyahoomail? curiously ask. :p -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows command line not displaying print commands

2009-03-31 Thread John Machin
On Mar 31, 11:42 am, Terry Reedy tjre...@udel.edu wrote: JonathanB wrote: Ok, I'm sure this is really simple, but I cannot for the life of me get any print statements from any of my python scripts to actually print when I call them from the windows command line. What am I doing wrong?

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:30 am, CTO debat...@gmail.com wrote: On the one hand, I can 110% see why you want to reduce boilerplate code and provide a discoverable, common mechanism for automating the two and three-quarters parsers that a lot of applications have to write to handle a config file, CLI, and/or

Re: Cyclic GC rules for subtyped objects with tp_dictoffset

2009-03-31 Thread Hrvoje Niksic
[ Questions such as this might be better suited for the capi-sig list, http://mail.python.org/mailman/listinfo/capi-sig ] BChess bch...@gmail.com writes: I'm writing a new PyTypeObject that is base type, supports cyclic GC, and has a tp_dictoffset. If my type is sub-typed by a python

Re: Creating huge data in very less time.

2009-03-31 Thread Steven D'Aprano
On Mon, 30 Mar 2009 22:44:41 -0700, venutaurus...@gmail.com wrote: Hello all, I've a requirement where I need to create around 1000 files under a given folder with each file size of around 1GB. The constraints here are each file should have random data and no two files should be

Re: An inheritance question: getting the name of the one up class

2009-03-31 Thread Steven D'Aprano
On Tue, 31 Mar 2009 01:29:50 -0300, Gabriel Genellina wrote: Oh, and while the gurus are at it, what would be the advantage (if any) of changing, say Primate.__init__(self) to super(Human, self).__init__() None, if you use single inheritance everywhere. But there's no

Re: Windows command line not displaying print commands

2009-03-31 Thread John Machin
On Mar 31, 9:57 am, JonathanB doulo...@gmail.com wrote: On Mar 30, 6:28 pm, John Machin sjmac...@lexicon.net wrote: On Mar 31, 8:37 am, Irmen de Jong irmen.nos...@xs4all.nl wrote: Does just typing:    python Yes, just typing python takes me to my interactive prompt Or do you have

Re: Ordered Sets

2009-03-31 Thread pataphor
On Mon, 30 Mar 2009 19:57:39 -0700 (PDT) Alex_Gaynor alex.gay...@gmail.com wrote: I really like the Ordered Set class(I've been thinking about one ever since ordered dict hit the std lib), is there any argument against adding one to the collections module? I'd be willing to write a PEP up

Re: An inheritance question: getting the name of the one up class

2009-03-31 Thread Michele Simionato
On Mar 31, 5:13 am, Nick mediocre_per...@hotmail.com wrote: Oh, and while the gurus are at it, what would be the advantage (if any) of changing, say    Primate.__init__(self) to     super(Human, self).__init__() What others said. In Python 3.0 you would have a bigger advantage, since you

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 3:40 am, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 30 Mar 2009 23:06:50 -0700, jfager wrote: On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: ... This would be a interesting idea, but ultimately no more than a veneer over the current

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Kay Schluehr
On 30 Mrz., 15:40, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like in Python, available athttp://jasonfager.com/?p=440. The basic

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their configuration info in LDAP?  Did the library I'm including make the same decisions, or do I have to do some contortions to adapt?  

Re: PyFits for Windows?

2009-03-31 Thread W. eWatson
W. eWatson wrote: W. eWatson wrote: It looks like PyFits downloads are for Linux. Isn't there anything available for Win (xp)? I'm now on the scipy mail list. Things look hopeful, according to the first respondent, to meet my criteria mentioned in another sub-thread to this one: I'm hoping

Re: Ordered Sets

2009-03-31 Thread pataphor
On Tue, 31 Mar 2009 10:33:26 +0200 pataphor patap...@gmail.com wrote: On Mon, 30 Mar 2009 19:57:39 -0700 (PDT) Alex_Gaynor alex.gay...@gmail.com wrote: I really like the Ordered Set class(I've been thinking about one ever since ordered dict hit the std lib), is there any argument

Re: Creating huge data in very less time.

2009-03-31 Thread andrea
On 31 Mar, 12:14, venutaurus...@gmail.com venutaurus...@gmail.com wrote: That time is reasonable. The randomness should be in such a way that MD5 checksum of no two files should be the same.The main reason for having such a huge data is for doing stress testing of our product. In randomness

Re: Creating huge data in very less time.

2009-03-31 Thread venutaurus...@gmail.com
On Mar 31, 1:15 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 30 Mar 2009 22:44:41 -0700, venutaurus...@gmail.com wrote: Hello all,             I've a requirement where I need to create around 1000 files under a given folder with each file size of around 1GB. The

Authorize.net integration problem

2009-03-31 Thread Lakshman
I am trying to integrate Authorize.net SIM API into django views. I am facing a problem in the fingerprint generation. I am repeatedly getting that the fingerprint generated doesn't match the one the server generates. I have generated the md5 hash with the key provided as specified in the SIM

How to pass one HTML values to another HTML

2009-03-31 Thread Kalyan
hi by using python and google app engine how can i pass one HTML values to another HTML .. i am very new to Python programing Example : in one HTML i entered Name and Address fields and i submit the page at that time i want to see those two values in another HTML page.. please reply me..

[ANN] Data Plotting Library DISLIN 9.5

2009-03-31 Thread Helmut Michels
Dear Python users, I am pleased to announce version 9.5 of the data plotting software DISLIN. DISLIN is a high-level and easy to use plotting library for displaying data as curves, bar graphs, pie charts, 3D-colour plots, surfaces, contours and maps. Several output formats are supported such as

Re: Creating huge data in very less time.

2009-03-31 Thread Tim Chase
venutaurus...@gmail.com wrote: On Mar 31, 1:15 pm, Steven D'Aprano The fastest HDDs can reach about 125 MB per second under ideal circumstances, so that will take at least 8 seconds per 1GB file or 8000 seconds in total. That time is reasonable. You did catch the bit about the *fastest*

First project in python, want someone to hold my hand for 2 hours for $100

2009-03-31 Thread googleaccount
Hey, I have to generate this really big matrix from some data. It's extremely straightforward for someone who has the slightest idea what they are doing. I'd really like to learn how to do this but I've gotten impatient with the tutorials because this should be so straightforward. Email me or

UnknownTimeZoneError

2009-03-31 Thread Brian
I'm running App Engine with Django. I'm having troubles executing timezone conversion via pytz. I have looked at the Google example implementation. The following works in IDLE: import pytz from pytz import common_timezones from pytz import timezone import datetime timestamp =

Re: Creating huge data in very less time.

2009-03-31 Thread Tim Chase
andrea wrote: On 31 Mar, 12:14, venutaurus...@gmail.com venutaurus...@gmail.com wrote: That time is reasonable. The randomness should be in such a way that MD5 checksum of no two files should be the same.The main reason for having such a huge data is for doing stress testing of our product.

Re: Authorize.net integration problem

2009-03-31 Thread andrew cooke
have you printed msg and checked it is formatted correctly? i have node idea what the protocol is, but your use of join and string concatenation in the generation of msg looks unusual to me. andrew Lakshman wrote: I am trying to integrate Authorize.net SIM API into django views. I am facing

Hands on Python - Problem with Local Cgi Server

2009-03-31 Thread Gary Wood
I have the DOS box with the message Localhost CGI server started But when i try this Back in the www directory, 1.. Open the web link http://localhost:8080/adder.html (preferably in a new window, separate from this this tutorial). 2.. You should see an adder form in your browser

Re: Ordered Sets

2009-03-31 Thread Alex_Gaynor
On Mar 31, 5:52 am, pataphor patap...@gmail.com wrote: On Tue, 31 Mar 2009 10:33:26 +0200 pataphor patap...@gmail.com wrote: On Mon, 30 Mar 2009 19:57:39 -0700 (PDT) Alex_Gaynor alex.gay...@gmail.com wrote: I really like the Ordered Set class(I've been thinking about one ever since

Re: Authorize.net integration problem

2009-03-31 Thread Lakshman Prasad
Yup. Unusual, it is. But thats how their string specification syntax is. It includes a ^ at the end. On Tue, Mar 31, 2009 at 6:13 PM, andrew cooke and...@acooke.org wrote: have you printed msg and checked it is formatted correctly? i have node idea what the protocol is, but your use of

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 5:57 am, Kay Schluehr kay.schlu...@gmx.net wrote: On 30 Mrz., 15:40, jfager jfa...@gmail.com wrote: I've written a short post on including support for configuration down at the language level, including a small preliminary half-functional example of what this might look like

Re: Authorize.net integration problem

2009-03-31 Thread Aahz
In article ade24599-b5f8-48db-8019-9cd8859a5...@l19g2000vba.googlegroups.com, Lakshman scorpion...@gmail.com wrote: I am facing a problem in the fingerprint generation. I am repeatedly getting that the fingerprint generated doesn't match the one the server generates. How are you getting this?

Re: Windows command line not displaying print commands

2009-03-31 Thread JonathanB
I think I found the problem. I recently removed Python 2.5 and replaced it with 2.6. When I got in, I tried to run some django commands and even they weren't producing output. On a hunch, I tried to uninstall 2.6 and reinstall it, since now even django wasn't producing output. When I tried, it

Re: Thoughts on language-level configuration support?

2009-03-31 Thread jfager
On Mar 31, 6:02 am, David Stanek dsta...@dstanek.com wrote: On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their configuration info in LDAP?  Did the library I'm including make the

Listing all python modules robustly

2009-03-31 Thread Brian
I've used the C api to write a method that can call any python module function. I would like to extend the interface to allow dynamically listing all python modules, and for a given module all functions, and for a given function all argument types and the return types if possible. Starting with

Re: Creating huge data in very less time.

2009-03-31 Thread Dave Angel
I wrote a tiny DOS program called resize that simply did a seek out to a (user specified) point, and wrote zero bytes. One (documented) side effect of DOS was that writing zero bytes would truncate the file at that point. But it also worked to extend the file to that point without writing any

RE: Cannot register to submit a bug report

2009-03-31 Thread John Posner
We can try to debug this :) E-mail message checked by Spyware Doctor (6.0.0.386) Database version: 5.12060http://www.pctools.com/en/spyware-doctor-antivirus/ Any chance it's Spyware Doctor or some anti-virus flagging the message and hiding it? I said:

Re: win32com python AttributeError!

2009-03-31 Thread Mike Driscoll
On Mar 30, 11:17 pm, Michael mich...@zavelle.com wrote: Hi Python-list - Has anyone figured this out from Rebecca: Hi, I am having trouble with win32com for python.  I get the following error when I try to issue any command after using Dispatch.

Re: Thoughts on language-level configuration support?

2009-03-31 Thread David Stanek
On Tue, Mar 31, 2009 at 10:01 AM, jfager jfa...@gmail.com wrote: On Mar 31, 6:02 am, David Stanek dsta...@dstanek.com wrote: On Tue, Mar 31, 2009 at 3:19 AM, jfager jfa...@gmail.com wrote: Simply having a configuration file - okay.  What format?  What if the end user wants to keep their

RE: Style question - defining immutable class data members

2009-03-31 Thread John Posner
I said: My intent was to fix an obvious omission: a special case was discussed in the Augmented assignment statements section, but an almost-identical special case was omitted from the Assignment statements section. After finally getting registered at bugs.python.org (as described

Re: Ordered Sets

2009-03-31 Thread pataphor
On Tue, 31 Mar 2009 06:03:13 -0700 (PDT) Alex_Gaynor alex.gay...@gmail.com wrote: My inclination would be to more or less *just* have it implement the set API, the way ordered dict does in 2.7/3.1. As far as I can tell all that would be needed is read/write access to two key variables: The

methods and class methods

2009-03-31 Thread Zach Goscha
I just learned python programming and is wondering how to change a method to a class method. Also what are the differences between a method and class method. Thanks in advance - Zach (Freshman student in High school) -- http://mail.python.org/mailman/listinfo/python-list

Re: An inheritance question: getting the name of the one up class

2009-03-31 Thread Nick
Thanks for the replies. This has given me some incentive to start looking at Python 3. Oh, and thanks for the articles on super(). Nick -- http://mail.python.org/mailman/listinfo/python-list

Re: methods and class methods

2009-03-31 Thread Daniel Fetchinson
I just learned python programming and is wondering how to change a method to a class method. class x( object ): @classmethod i_will_be_a_class_method( cls ): pass Also what are the differences between a method and class method. A class method receives the class as its first argument

regex negative lookbehind assertion not working correctly?

2009-03-31 Thread Gabriel Rossetti
Hello everyone, I am trying to write a regex pattern to match an ID in a URL only if it is not a given ID. Here's an example, the ID not to match is 14522XXX98, if my URL is /profile.php?id=14522XXX99 I want it to match and if it's /profile.php?id=14522XXX98 I want it not to. I tried this:

Re: Authorize.net integration problem

2009-03-31 Thread Stephen Chapman
Are they expecting the results in a specific order... because as you probably know a dictionary is never in the order that you add the items. Lakshman Prasad wrote: Yup. Unusual, it is. But thats how their string specification syntax is. It includes a ^ at the end. On Tue, Mar 31, 2009 at

Re: An inheritance question: getting the name of the one up class

2009-03-31 Thread Gabriel Genellina
En Tue, 31 Mar 2009 05:16:47 -0300, Steven D'Aprano ste...@remove.this.cybersource.com.au escribió: On Tue, 31 Mar 2009 01:29:50 -0300, Gabriel Genellina wrote: Oh, and while the gurus are at it, what would be the advantage (if any) of changing, say Primate.__init__(self) to

Re: complaints about no replies last week

2009-03-31 Thread pruebauno
On Mar 31, 2:56 am, Arnaud Delobelle arno...@googlemail.com wrote: Arnaud Delobelle wrote: prueba...@latinmail.com writes: [...] I myself asked about how to write a library to efficiently do union and intersection of sets containing time intervals some time ago on this list and got

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article 039360fb-a29c-4f43-b6e0-ba97fb598...@z23g2000prd.googlegroups.com, Mensanator mensana...@aol.com wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: David C. Ullrich wrote: In article mailman.2701.1238060157.11746.python-l...@python.org,  Paddy O'Loughlin

Re: regex negative lookbehind assertion not working correctly?

2009-03-31 Thread andrew cooke
it is working - it's making the final 8 not be matched. don't you want lookahead rather than lookbehind? or force an end of string? andrew Gabriel Rossetti wrote: Hello everyone, I am trying to write a regex pattern to match an ID in a URL only if it is not a given ID. Here's an

Re: Introducing Python to others

2009-03-31 Thread David C. Ullrich
In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net, Scott David Daniels scott.dani...@acm.org wrote: Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: ... that's cute, but if you show them 2.6 or 3 it's even cuter: from operator import add class

Re: Introducing Python to others

2009-03-31 Thread andrew cooke
David C. Ullrich wrote: In article tm6dnzxrviq0qfbunz2dnuvz_rmdn...@pdx.net, Scott David Daniels scott.dani...@acm.org wrote: Mensanator wrote: On Mar 26, 11:42 am, andrew cooke and...@acooke.org wrote: ... that's cute, but if you show them 2.6 or 3 it's even cuter: from operator

Re: Listing all python modules robustly

2009-03-31 Thread Brian
Turns out that the Twisted framework provides better introspective support than standard python, so problem solved! http://twistedmatrix.com/documents/8.2.0/api/twisted.python.modules.html#walkModules On Tue, Mar 31, 2009 at 8:12 AM, Brian brian.min...@colorado.edu wrote: I've used the C api

Detecting Binary content in files

2009-03-31 Thread ritu
Hi, I'm wondering if Python has a utility to detect binary content in files? Or if anyone has any ideas on how that can be accomplished? I haven't been able to find any useful information to accomplish this (my other option is to fire off a perl script from within m python script that will tell

Re: Creating huge data in very less time.

2009-03-31 Thread Grant Edwards
On 2009-03-31, Dave Angel da...@ieee.org wrote: I wrote a tiny DOS program called resize that simply did a seek out to a (user specified) point, and wrote zero bytes. One (documented) side effect of DOS was that writing zero bytes would truncate the file at that point. But it also worked to

urllib2 problem, data param not working?

2009-03-31 Thread Gabriel Rossetti
Hello everyone, I am having a problem with urllib2, when I do this : post = urllib.urlencode(post) request = urllib2.Request(url, post) response = urllib2.urlopen(request) or this : post = urllib.urlencode(post) response = urllib2.urlopen(url, post) or this : post =

Re: Relative Imports, why the hell is it so hard?

2009-03-31 Thread s4g
Hi, I was looking for a nice idiom for interpackage imports as I found this thread. Here come a couple of solutions I came up with. Any discussion is welcome. I assume the same file structure \ App | main.py +--\subpack1 | | __init__.py | | module1.py | +--\subpack2 | | __init__.py | |

Re: Detecting Binary content in files

2009-03-31 Thread Matt Nordhoff
ritu wrote: Hi, I'm wondering if Python has a utility to detect binary content in files? Or if anyone has any ideas on how that can be accomplished? I haven't been able to find any useful information to accomplish this (my other option is to fire off a perl script from within m python

Re: Creating huge data in very less time.

2009-03-31 Thread Grant Edwards
On 2009-03-31, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: [writing a bunch of files with a bunch of random data in each] Can this be done within few minutes of time. Is it possble only using threads or can be done in any other way. This has to be done in Windows. Is it

Re: Creating huge data in very less time.

2009-03-31 Thread Terry Reedy
venutaurus...@gmail.com wrote: That time is reasonable. The randomness should be in such a way that MD5 checksum of no two files should be the same.The main reason for having such a huge data is for doing stress testing of our product. For most purposes (other than stress testing the HD and

Re: Creating huge data in very less time.

2009-03-31 Thread Tim Chase
Is there a way to create a file to big withouth actually writing anything in python (just give me the garbage that is already on the disk)? No. That would be a monstrous security hole. Sure...just install 26 hard-drives and partition each up into 40 1-GB unformatted partitions each, and

Printing Out Called Function Calls

2009-03-31 Thread Victor Subervi
Hi; Due to screwy problems at my server farm that they refuse to fix, I need to call lines that execute code from other files, like this: theContent += `tidBits[i][y][:-2]` but what that returns is this (as an example): tableTop(348,180) when I need it to execute the fn tableTop. What do? TIA,

Writing to Console on mac OS X

2009-03-31 Thread RGK
I'm on mac os x 10.4.11 running python 2.5.2, and Django 1.0, but this is a python question. When doing django/mod_python stuff, I can write to the Apache error_log file with sys.stderr.write(SOMETHING I WANT TO KNOW) which had me wondering if there's not a means for a misc. python

Re: Detecting Binary content in files

2009-03-31 Thread Benjamin Kaplan
On Tue, Mar 31, 2009 at 12:23 PM, ritu ritu_bhandar...@yahoo.com wrote: Hi, I'm wondering if Python has a utility to detect binary content in files? Or if anyone has any ideas on how that can be accomplished? I haven't been able to find any useful information to accomplish this (my other

Re: regex negative lookbehind assertion not working correctly?

2009-03-31 Thread MRAB
Gabriel Rossetti wrote: Hello everyone, I am trying to write a regex pattern to match an ID in a URL only if it is not a given ID. Here's an example, the ID not to match is 14522XXX98, if my URL is /profile.php?id=14522XXX99 I want it to match and if it's /profile.php?id=14522XXX98 I want it

Re: create a log level for python logging module

2009-03-31 Thread dj
On Mar 30, 4:18 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Mar 30, 4:13 pm, dj d.a.aberna...@gmail.com wrote: I am trying to create a log level called userinfo for the pythonlogging. I read the source code and tried to register the level to theloggingnamespace with the following

Re: Printing Out Called Function Calls

2009-03-31 Thread andrew cooke
Victor Subervi wrote: Hi; Due to screwy problems at my server farm that they refuse to fix, I need to call lines that execute code from other files, like this: theContent += `tidBits[i][y][:-2]` but what that returns is this (as an example): tableTop(348,180) when I need it to execute

Re: Cyclic GC rules for subtyped objects with tp_dictoffset

2009-03-31 Thread BChess
On Mar 31, 12:27 am, Hrvoje Niksic hnik...@xemacs.org wrote: [ Questions such as this might be better suited for the capi-sig list,  http://mail.python.org/mailman/listinfo/capi-sig] BChessbch...@gmail.com writes: I'm writing a new PyTypeObject that is base type, supports cyclic GC, and

Re: Detecting Binary content in files

2009-03-31 Thread Josh Dukes
There might be another way but off the top of my head: #!/usr/bin/env python def isbin(filename): fd=open(filename,'rb') for b in fd.read(): if ord(b) 127: fd.close() return True fd.close() return False for f in ['/bin/bash', '/etc/passwd']: print %s

Re: Detecting Binary content in files

2009-03-31 Thread Josh Dukes
s/if ord(b) 127/if ord(b) 127 or ord(b) 32/ On Tue, 31 Mar 2009 10:19:44 -0700 Josh Dukes josh.du...@microvu.com wrote: There might be another way but off the top of my head: #!/usr/bin/env python def isbin(filename): fd=open(filename,'rb') for b in fd.read(): if

Re: Does Python have certificate?

2009-03-31 Thread Aahz
In article f8fa8f79-2179-4e59-be5f-914a91ef1...@o11g2000yql.googlegroups.com, Paddy3118 paddy3...@googlemail.com wrote: The Academy of Research into Science Education being a true leader in the field offers acclaimed accreditation for Python programmers. Those who pass our strict exams and pay

Re: Cannot register to submit a bug report

2009-03-31 Thread Terry Reedy
John Posner wrote: My ISP (ATT/Yahoo) was blocking email from the Python bug-tracker: The sending system has been identified as a source of spam. I hope you were able to suggest to them that that identification must be an error. Frustrating given the spam sources that somehow do not get

Re: Ordered Sets

2009-03-31 Thread Alex_Gaynor
On Mar 31, 11:06 am, pataphor patap...@gmail.com wrote: On Tue, 31 Mar 2009 06:03:13 -0700 (PDT) Alex_Gaynor alex.gay...@gmail.com wrote: My inclination would be to more or less *just* have it implement the set API, the way ordered dict does in 2.7/3.1. As far as I can tell all that would

Re: Detecting Binary content in files

2009-03-31 Thread Josh Dukes
or rather: #!/usr/bin/env python import string def isbin(filename): fd=open(filename,'rb') for b in fd.read(): if not b in string.printable and b not in string.whitespace: fd.close() return True fd.close() return False for f in ['/bin/bash', '/etc/passwd']:

Re: Printing Out Called Function Calls

2009-03-31 Thread Victor Subervi
change server famrs? Really. But I imagine they are all trash for the price I pay. use eval() or exec()? eval worked, exec no. Thanks! andrew -- http://mail.python.org/mailman/listinfo/python-list

Re: Relative Imports, why the hell is it so hard?

2009-03-31 Thread Kay Schluehr
On 31 Mrz., 18:48, s4g rafals...@gmail.com wrote: Hi, I was looking for a nice idiom for interpackage imports as I found this thread. Here come a couple of solutions I came up with. Any discussion is welcome. I assume the same file structure \ App | main.py +--\subpack1 | |

Re: create a log level for python logging module

2009-03-31 Thread MRAB
dj wrote: On Mar 30, 4:18 pm, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Mar 30, 4:13 pm, dj d.a.aberna...@gmail.com wrote: I am trying to create a log level called userinfo for the pythonlogging. I read the source code and tried to register the level to theloggingnamespace with the

Re: Creating huge data in very less time.

2009-03-31 Thread Irmen de Jong
venutaurus...@gmail.com wrote: On Mar 31, 1:15 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 30 Mar 2009 22:44:41 -0700, venutaurus...@gmail.com wrote: Hello all, I've a requirement where I need to create around 1000 files under a given folder with each

Re: udp package header

2009-03-31 Thread Artur M. Piwko
In the darkest hour on Tue, 24 Mar 2009 00:50:10 + (UTC), R. David Murray rdmur...@bitdance.com screamed: I got a problem. İ want to send udp package and get this package (server and clinet ). it's easy to python but i want to look the udp header how can i do ? The English word is

custom handler does not write to log file

2009-03-31 Thread dj
It seems that you can create custom handlers and add them to the logging.handlers namespace(http://mail.python.org/pipermail/python- list/2008-May/493826.html.) But for reasons beyond my understanding my log file (test.log) is not written to. my handler class

Re: Thoughts on language-level configuration support?

2009-03-31 Thread Lorenzo Gatti
On 31 Mar, 09:19, jfager jfa...@gmail.com wrote: On Mar 31, 2:54 am, David Stanek dsta...@dstanek.com wrote: On Mon, Mar 30, 2009 at 9:40 AM, jfager jfa...@gmail.com wrote: http://jasonfager.com/?p=440. The basic idea is that a language could offer syntactic support for declaring

RE: Cannot register to submit a bug report

2009-03-31 Thread John Posner
Terry Ready said: My ISP (ATT/Yahoo) was blocking email from the Python bug-tracker: The sending system has been identified as a source of spam. I hope you were able to suggest to them that that identification must be an error. Frustrating given the spam sources that somehow

Re: Writing to Console on mac OS X

2009-03-31 Thread Irmen de Jong
RGK wrote: I'm on mac os x 10.4.11 running python 2.5.2, and Django 1.0, but this is a python question. When doing django/mod_python stuff, I can write to the Apache error_log file with sys.stderr.write(SOMETHING I WANT TO KNOW) which had me wondering if there's not a means for a misc.

Re: Writing to Console on mac OS X

2009-03-31 Thread RGK
Thanks for the pointer Irmen. That works fine. Also my unfamiliarity with the console app is showing - I just learned that there is a navigation pane activated by the 'logs' icon that allows me to see various system logs, including the Apache ones :p You're right, I've heard a bit about the

  1   2   3   4   5   >