hi can any one please help me..

2010-02-15 Thread chiranjeevi muttoju
Hi, when i'm installing the pytc(python wrapper for tokyo cabinet.) i'm getting the fallowing error.. i'm getting this error for python2.6 only.. for python 2.4 its working fine.. - running install running build running build_ext building 'pytc'

Re: hi can any one please help me..

2010-02-15 Thread Alf P. Steinbach
* chiranjeevi muttoju: Hi, when i'm installing the pytc(python wrapper for tokyo cabinet.) i'm getting the fallowing error.. i'm getting this error for python2.6 only.. for python 2.4 its working fine.. - running install running build running build_ext

Re: hi can any one please help me..

2010-02-15 Thread steve
Hello, On 02/15/2010 02:20 PM, chiranjeevi muttoju wrote: Hi, when i'm installing the pytc(python wrapper for tokyo cabinet.) i'm getting the fallowing error.. i'm getting this error for python2.6 only.. for python 2.4 its working fine.. - running

Printing with raw_input

2010-02-15 Thread Joan Miller
Does `raw_input` uses internally `sys.stdout.write`? -- http://mail.python.org/mailman/listinfo/python-list

Re: Printing with raw_input

2010-02-15 Thread Peter Otten
Joan Miller wrote: Does `raw_input` uses internally `sys.stdout.write`? You can test this yourself without reading the C source: Python 2.6.4 (r264:75706, Dec 7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. import sys class A: ...

trouble installing matplotlib - syslibroot: multiply specified

2010-02-15 Thread katrine
Hi, Hope you guys don't mind a question about building matplotlib from a biologist who wants to learn how to use python. I am trying to install matplotlib on my mac with OS X 10.4.11, using python 2.6.4 and Xcode 2.2.1. I have had a few fights with freetype and Tkinter, and I think I've got

Re: trouble installing matplotlib - syslibroot: multiply specified

2010-02-15 Thread Alf P. Steinbach
* katrine: Hope you guys don't mind a question about building matplotlib from a biologist who wants to learn how to use python. I am trying to install matplotlib on my mac with OS X 10.4.11, using python 2.6.4 and Xcode 2.2.1. I have had a few fights with freetype and Tkinter, and I think I've

Re: python crash on windows but not on linux

2010-02-15 Thread hjebbers
On 13 feb, 13:48, Dave Angel da...@ieee.org wrote: hjebbers wrote: On Feb 13, 10:25 am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 12 Feb 2010 09:21:07 -0800 (PST), hjebbers hjebb...@gmail.com declaimed the following in gmane.comp.python.general: What strikes me is: 1. the

Re: Printing with raw_input

2010-02-15 Thread Joan Miller
On 15 feb, 10:11, Peter Otten __pete...@web.de wrote: Joan Miller wrote: Does `raw_input` uses internally `sys.stdout.write`? You can test this yourself without reading the C source: Python 2.6.4 (r264:75706, Dec  7 2009, 18:43:55) [GCC 4.4.1] on linux2 Type help, copyright, credits or

Re: Printing with raw_input

2010-02-15 Thread Peter Otten
Joan Miller wrote: Does `raw_input` uses internally `sys.stdout.write`? It was to display the output inside a GUI app. overriding `sys.stdout`. And as `print` also uses internally `sys.stdout.write` then can be used `print` the shell script and get the output too in the GUI, cann't it? It

Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Dear Folks, I want to execute a command from within python using the subprocess module. Coming from a Perl background, I thought I could use variable interpolation in strings, but found that this is neither supported nor the Python way. Accordingly, I am a little at sea about how to

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Alf P. Steinbach
* R (Chandra) Chandrasekhar: width = 5 height = 30 colors = ['#abcdef]', '#456789'] filename = /tmp/image.png # I want to get the equivalent of variable interpolation in Perl # so that the command # # convert -size 5x30 gradient:#abcdef-#456789 /tmp/image.png # # is derived from the variables

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Peter Otten
R (Chandra) Chandrasekhar wrote: I want to execute a command from within python using the subprocess module. Coming from a Perl background, I thought I could use variable interpolation in strings, but found that this is neither supported nor the Python way. Accordingly, I am a little at

Re: Printing with raw_input

2010-02-15 Thread Shashwat Anand
raw_input uses sys.stderr I guess ? On Mon, Feb 15, 2010 at 5:35 PM, Peter Otten __pete...@web.de wrote: Joan Miller wrote: Does `raw_input` uses internally `sys.stdout.write`? It was to display the output inside a GUI app. overriding `sys.stdout`. And as `print` also uses internally

Re: trouble installing matplotlib - syslibroot: multiply specified

2010-02-15 Thread katrine
On Feb 15, 12:20 pm, Alf P. Steinbach al...@start.no wrote: * katrine: Hope you guys don't mind a question about building matplotlib from a biologist who wants to learn how to use python. I am trying to install matplotlib on my mac with OS X 10.4.11, using python 2.6.4 and Xcode

Re: Replace various regex

2010-02-15 Thread Jean-Michel Pichavant
Martin wrote: Hi, I am trying to come up with a more generic scheme to match and replace a series of regex, which look something like this... 19.01,16.38,0.79,1.26,1.00 ! canht_ft(1:npft) 5.0, 4.0, 2.0, 4.0, 1.0 ! lai(1:npft) Ideally match the pattern to the right of the ! sign (e.g.

Talking with ebay using Python

2010-02-15 Thread starglider develop
Hi, I need a way of talking with the eBay API: Made search, Ask for item status. What can it be done, and where can I get the info. Thank you in advance for your help. -- http://mail.python.org/mailman/listinfo/python-list

CFP - SLE'2010

2010-02-15 Thread Anthony Cleve
CALL FOR PAPERS 3rd International Conference on Software Language Engineering SLE 2010 12-13 Oct 2010 -- Eindhoven, The Netherlands http://planet-sl.org/sle2010/ Co-located with the International Conference on Generative Programming and Component Engineering (GPCE'10).

Re: Replace various regex

2010-02-15 Thread Martin
On Feb 15, 2:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Martin wrote: Hi, I am trying to come up with a more generic scheme to match and replace a series of regex, which look something like this... 19.01,16.38,0.79,1.26,1.00 ! canht_ft(1:npft) 5.0, 4.0, 2.0, 4.0,

Re: Replace various regex

2010-02-15 Thread Jean-Michel Pichavant
Martin wrote: On Feb 15, 2:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Martin wrote: Hi, I am trying to come up with a more generic scheme to match and replace a series of regex, which look something like this... 19.01,16.38,0.79,1.26,1.00 !

constructor overwrite

2010-02-15 Thread Mug
hi ,i had a problem on constructor overwrite: i have something like: class obj: def __init__(self, x=100, y=None): if y is None: self.x=x else: self.y=y so i can call : objet = obj() # x=100 y=None or objet = obj(40) # x= 40 y=None but if i do : objet = obj('not

Re: constructor overwrite

2010-02-15 Thread Arnaud Delobelle
Mug exallion.l...@gmail.com writes: hi ,i had a problem on constructor overwrite: i have something like: class obj: def __init__(self, x=100, y=None): if y is None: self.x=x else: self.y=y so i can call : objet = obj() # x=100 y=None or objet = obj(40) #

Re: constructor overwrite

2010-02-15 Thread Steve Holden
Mug wrote: hi ,i had a problem on constructor overwrite: i have something like: class obj: def __init__(self, x=100, y=None): if y is None: self.x=x else: self.y=y so i can call : objet = obj() # x=100 y=None or objet = obj(40) # x= 40 y=None but if i

Re: constructor overwrite

2010-02-15 Thread Bruno Desthuilliers
Mug a écrit : hi ,i had a problem on constructor overwrite: i have something like: class obj: def __init__(self, x=100, y=None): if y is None: self.x=x else: self.y=y With such an initializer, you'll have instances with an attribute 'y' and no attribute 'x', and

how to structure a directory with many scripts and shared code

2010-02-15 Thread Benedict Verheyen
Hi, i wanted to ask how you guys structure your code. I mainly have scripts that automate small tasks. These scripts use a common set of utility code. My code is structured like this, for example: script_1.py script_2.py script_3.py tools\ |-__init__.py |-logutils.py |-mailutils.py

Time out a regular expression in Python 2.6.4?

2010-02-15 Thread python
Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria. If a user enters a pathological regular expression, we would like to timeout the evaluation of this expression after a short period of

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename=tmp/image with space in its name.png): lookup = locals() assert all(\n not in str(s) for s in lookup.values()) subprocess.call(\ convert -size {width}x{height}

Re: Time out a regular expression in Python 2.6.4?

2010-02-15 Thread Steve Holden
pyt...@bdurham.com wrote: Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria. If a user enters a pathological regular expression, we would like to timeout the evaluation of this

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread John Posner
On 2/15/2010 7:35 AM, R (Chandra) Chandrasekhar wrote: Dear Folks, I want to execute a command from within python using the subprocess module. Coming from a Perl background, I thought I could use variable interpolation in strings, but found that this is neither supported Yes, it is: see the

Loop problem while generating a new value with random.randint()

2010-02-15 Thread Paulo Repreza
Greetings, I'm having problems with a little script that I'm trying to finish, I don't know if I'm in the right track but I know somebody is going to help me. The script: # Import modules random for function randint import random # Generating a constant. var = 65 # Generating a random

Re: how to structure a directory with many scripts and shared code

2010-02-15 Thread Jean-Michel Pichavant
Benedict Verheyen wrote: Hi, i wanted to ask how you guys structure your code. I mainly have scripts that automate small tasks. These scripts use a common set of utility code. My code is structured like this, for example: script_1.py script_2.py script_3.py tools\ |-__init__.py

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename=tmp/image with space in its name.png): lookup = locals() assert all(\n not in str(s) for s in lookup.values()) subprocess.call(\ convert -size {width}x{height}

Re: Loop problem while generating a new value with random.randint()

2010-02-15 Thread Jean-Michel Pichavant
Paulo Repreza wrote: Greetings, I'm having problems with a little script that I'm trying to finish, I don't know if I'm in the right track but I know somebody is going to help me. The script: # Import modules random for function randint import random # Generating a constant. var = 65 #

get a field

2010-02-15 Thread mierdatutis mi
Hi, I have this: pe= http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml I would like to extract this: 691046.shtml But is dynamically. Not always have the same lenght the string. Could you help me how could I do extract this in

Which mock library do you prefer?

2010-02-15 Thread Lacrima
Hello! I am newbie mastering test driven development. I can't clarify myself which mock library to use. There are number of them and which one do you prefer? Two libraries that attracted my attention are: * minimock * dingus As for me the latest one, dingus, is the easiest (see this screencast:

Re: how to structure a directory with many scripts and shared code

2010-02-15 Thread Benedict Verheyen
Jean-Michel Pichavant wrote: snip Hi, 1/ Provide the output of the error so we can provide some useful help. 2/ Embed your structure into a package. Names like 'tools', 'lib', 'mail', 'log' are too generic and will clash with other badly designed module/package names. Choose a name for you

Re: how to structure a directory with many scripts and shared code

2010-02-15 Thread sstein...@gmail.com
On Feb 15, 2010, at 11:06 AM, Jean-Michel Pichavant wrote: 3/ make sure your working copy of myBeautifulPackage is in your PYTHONPATH. Or, make a simple setup.py which imports distribute or setuptools and use: # python setup.py develop which will put your code into the PYTHONPATH by

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Steve Holden
R (Chandra) Chandrasekhar wrote: Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename=tmp/image with space in its name.png): lookup = locals() assert all(\n not in str(s) for s in lookup.values())

Re: Loop problem while generating a new value with random.randint()

2010-02-15 Thread Bruno Desthuilliers
Jean-Michel Pichavant a écrit : Paulo Repreza wrote: Greetings, I'm having problems with a little script that I'm trying to finish, I don't know if I'm in the right track but I know somebody is going to help me. (snip - problem already addressed by Jean-Michel...) while var != ranum:

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread R (Chandra) Chandrasekhar
Alf P. Steinbach wrote: * R (Chandra) Chandrasekhar: width = 5 height = 30 colors = ['#abcdef]', '#456789'] filename = /tmp/image.png # I want to get the equivalent of variable interpolation in Perl # so that the command # # convert -size 5x30 gradient:#abcdef-#456789 /tmp/image.png # # is

Re: Loop problem while generating a new value with random.randint()

2010-02-15 Thread Arnaud Delobelle
Jean-Michel Pichavant jeanmic...@sequans.com writes: Paulo Repreza wrote: Greetings, I'm having problems with a little script that I'm trying to finish, I don't know if I'm in the right track but I know somebody is going to help me. The script: # Import modules random for function

Re: Loop problem while generating a new value with random.randint()

2010-02-15 Thread Steve Holden
Paulo Repreza wrote: Greetings, I'm having problems with a little script that I'm trying to finish, I don't know if I'm in the right track but I know somebody is going to help me. The script: # Import modules random for function randint import random # Generating a constant.

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Peter Otten
R (Chandra) Chandrasekhar wrote: Peter Otten wrote: import subprocess def convert(width=5, height=30, colors=['#abcdef', '#456789'], filename=tmp/image with space in its name.png): lookup = locals() assert all(\n not in str(s) for s in lookup.values())

Re: get a field

2010-02-15 Thread Jean-Michel Pichavant
mierdatutis mi wrote: Hi, I have this: pe=http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml; I would like to extract this: 691046.shtml But is dynamically. Not always have the same lenght the string. Could you help me how could I

Re: get a field

2010-02-15 Thread Steve Holden
mierdatutis mi wrote: Hi, I have this: pe=http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml; I would like to extract this: 691046.shtml But is dynamically. Not always have the same lenght the string. Could you help me

Re: Fighting with subprocess.Popen

2010-02-15 Thread Nobody
On Sun, 14 Feb 2010 21:43:22 +0100, Christian Heimes wrote: Below is a test case that demonstrates this. Tests 1 2 concatenate the command and the argument, Tests 3 4 mimic the python docs and use the form Popen([mycmd, myarg], ...), which never seems to work. It doesn't work with

Re: Which mock library do you prefer?

2010-02-15 Thread Phlip
Lacrima wrote: I am newbie mastering test driven development. I can't clarify myself which mock library to use. There are number of them and which one do you prefer? Two libraries that attracted my attention are: * minimock * dingus As for me the latest one, dingus, is the easiest (see

Re: Executing a command from within python using the subprocess module

2010-02-15 Thread Nobody
On Tue, 16 Feb 2010 00:11:36 +0800, R (Chandra) Chandrasekhar wrote: One other question I forgot to ask is this why is there a terminal backslash in subprocess.call(\ Removing the backslash makes the function fail. I wonder why, because is supposed to allow multi-line strings. I am

Re: Which mock library do you prefer?

2010-02-15 Thread Steve Howell
On Feb 15, 8:15 am, Lacrima lacrima.ma...@gmail.com wrote: Hello! I am newbie mastering test driven development. I can't clarify myself which mock library to use. There are number of them and which one do you prefer? Two libraries that attracted my attention are: * minimock * dingus As

Re: Python Optimization

2010-02-15 Thread mukesh tiwari
On Feb 15, 1:07 am, Steve Howell showel...@yahoo.com wrote: On Feb 14, 11:52 am, Mark Dickinson dicki...@gmail.com wrote: On Feb 14, 4:53 pm, mukesh tiwari mukeshtiwari.ii...@gmail.com wrote: Hello everyone. I am new to python and previously i did programming in c/c++.Could some

Re: Loop problem while generating a new value with random.randint()

2010-02-15 Thread Paulo Repreza
Thanks for the help! Using while True helps alot! Paulo Repreza -- http://mail.python.org/mailman/listinfo/python-list

saving a TIFF

2010-02-15 Thread fernando sedano
I'm trying to save an image created from two arrays (I'm using numpy and PIL): n=(b4a-b3a)/(b4a+b3a); ndvi = Image.fromarray(n) ndvi.save(F:\Fire_scar_mapping\ILS3\ndvi_test,TIFF) ...but I get the following error message: IOError: [Errno 22] invalid mode ('wb') or filename:

Re: saving a TIFF

2010-02-15 Thread Benjamin Kaplan
On Mon, Feb 15, 2010 at 12:55 PM, fernando sedano fer...@gmail.com wrote: I'm trying to save an image created from two arrays (I'm using numpy and PIL): n=(b4a-b3a)/(b4a+b3a); ndvi = Image.fromarray(n) ndvi.save(F:\Fire_scar_mapping\ILS3\ndvi_test,TIFF) ...but I get the following

Re: get a field

2010-02-15 Thread Tim Chase
Holden wrote: mierdatutis mi wrote: I have this: pe=http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml; I would like to extract this: 691046.shtml But is dynamically. Not always have the same lenght the string. s =

Using class attributes

2010-02-15 Thread Leo Breebaart
I have a base class Foo with a number of derived classes FooA, FooB, FooC, etc. Each of these derived classes needs to read (upon initialisation) text from an associated template file FooA.tmpl, FooB.tmpl, FooC.tmpl, etc. I can derive the template filename string for each instance by doing

Re: Which mock library do you prefer?

2010-02-15 Thread Lacrima
On Feb 15, 6:57 pm, Phlip phlip2...@gmail.com wrote: Lacrima wrote: I am newbie mastering test driven development. I can't clarify myself which mock library to use. There are number of them and which one do you prefer? Two libraries that attracted my attention are: * minimock *

Plugin architecture

2010-02-15 Thread mk
Hello everyone, I'm thinking about writing plugin-style architecture for (a new) web-based app (with SQLAlchemy as backend). Say, there's core web app and someone decides to write plugin Accounting for this web app that would work with SQA objects of the core app or other plugins. I found

Re: Plugin architecture

2010-02-15 Thread Daniel Fetchinson
I'm thinking about writing plugin-style architecture for (a new) web-based app (with SQLAlchemy as backend). Say, there's core web app and someone decides to write plugin Accounting for this web app that would work with SQA objects of the core app or other plugins. I found this:

TypeError Exception in email lib

2010-02-15 Thread BJ Swope
File /usr/lib/python2.5/email/_parseaddr.py, line 142, in mktime_tz if data[9] is None: TypeError: 'NoneType' object is unsubscriptable I'm parsing a bunch of spam and using the date field from the spams for a date-time stamp. I've fixed the lib on my box to place the call inside a

Re: get a field

2010-02-15 Thread MRAB
Tim Chase wrote: Holden wrote: mierdatutis mi wrote: I have this: pe=http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml; I would like to extract this: 691046.shtml But is dynamically. Not always have the same lenght the string.

Re: Modifying Class Object

2010-02-15 Thread John Posner
Alf said (2/13/2010 8:34 PM): Names in Python refer to objects. Those references can be copied via assignment. That's (almost) all. And it provides a very short and neat way to describe pass by sharing. Alf also said (2/13/2010 8:43 PM): * Steve Howell: This thread is interesting on

Re: TypeError Exception in email lib

2010-02-15 Thread Stephen Hansen
On Mon, Feb 15, 2010 at 10:53 AM, BJ Swope bigbluesw...@gmail.com wrote: File /usr/lib/python2.5/email/_parseaddr.py, line 142, in mktime_tz if data[9] is None: TypeError: 'NoneType' object is unsubscriptable I'm parsing a bunch of spam and using the date field from the spams for a

Re: TypeError Exception in email lib

2010-02-15 Thread BJ Swope
On Mon, Feb 15, 2010 at 2:31 PM, Stephen Hansen apt.shan...@gmail.com wrote: On Mon, Feb 15, 2010 at 10:53 AM, BJ Swope bigbluesw...@gmail.com wrote:  File /usr/lib/python2.5/email/_parseaddr.py, line 142, in mktime_tz    if data[9] is None: TypeError: 'NoneType' object is unsubscriptable

Re: TypeError Exception in email lib

2010-02-15 Thread Dave Angel
BJ Swope wrote: File /usr/lib/python2.5/email/_parseaddr.py, line 142, in mktime_tz if data[9] is None: TypeError: 'NoneType' object is unsubscriptable I'm parsing a bunch of spam and using the date field from the spams for a date-time stamp. I've fixed the lib on my box to place the

Re: Using class attributes

2010-02-15 Thread Chris Rebert
On Mon, Feb 15, 2010 at 10:29 AM, Leo Breebaart l...@lspace.org wrote: I have a base class Foo with a number of derived classes FooA, FooB, FooC, etc. Each of these derived classes needs to read (upon initialisation) text from an associated template file FooA.tmpl, FooB.tmpl, FooC.tmpl, etc.

Re: TypeError Exception in email lib

2010-02-15 Thread BJ Swope
On Mon, Feb 15, 2010 at 2:47 PM, BJ Swope bigbluesw...@gmail.com wrote: On Mon, Feb 15, 2010 at 2:31 PM, Stephen Hansen apt.shan...@gmail.com wrote: On Mon, Feb 15, 2010 at 10:53 AM, BJ Swope bigbluesw...@gmail.com wrote:  File /usr/lib/python2.5/email/_parseaddr.py, line 142, in mktime_tz    

Re: Which mock library do you prefer?

2010-02-15 Thread Phlip
Lacrima wrote: Thanks for your reply! Isn't what you are talking about integration tests? And unit tests should be fully isolated? So even for method 'some_method()' of class A I should mock instance of class A (i.e. to mock 'self') to test 'some_method()'. Unit test is a high-end QA

Re: Talking with ebay using Python

2010-02-15 Thread Chris Rebert
On Mon, Feb 15, 2010 at 6:10 AM, starglider develop starglider@gmail.com wrote: Hi, I need a way of talking with the eBay API: Made search, Ask for item status. What can it be done, and where can I get the info. In the future, search Google and PyPI (http://pypi.python.org/pypi). (PyPI

Re: Talking with ebay using Python

2010-02-15 Thread Chris Rebert
On 15 February 2010 20:04, Chris Rebert c...@rebertia.com wrote: On Mon, Feb 15, 2010 at 6:10 AM, starglider develop starglider@gmail.com wrote: Hi, I need a way of talking with the eBay API: Made search, Ask for item status. What can it be done, and where can I get the info.

error: Setup script exited with error: command 'gcc' failed with exit status 1

2010-02-15 Thread chiranjeevi muttoju
Hi, When i'm trying to install some modules for python i'm getting the fallowing error.. error: Setup script exited with error: command 'gcc' failed with exit status 1 can any one know what it exactly means.. if any body know please reply. i have gcc version 4.1.2 20080704 (Red Hat 4.1.2-46).

Re: TypeError Exception in email lib

2010-02-15 Thread MRAB
BJ Swope wrote: [snip] Speak of the devil and demons appear... /logs/python/imap_fetcher/spam_serv1.bigbluenetworks.com.py Parsing of emails for spam at serv1.bigbluenetworks.com failed. Traceback (most recent call last): File /logs/python/imap_fetcher/spam_serv1.bigbluenetworks.com.py,

Re: error: Setup script exited with error: command 'gcc' failed with exit status 1

2010-02-15 Thread Philip Semanchuk
On Feb 15, 2010, at 3:33 PM, chiranjeevi muttoju wrote: Hi, When i'm trying to install some modules for python i'm getting the fallowing error.. error: Setup script exited with error: command 'gcc' failed with exit status 1 can any one know what it exactly means.. if any body know please

Re: TypeError Exception in email lib

2010-02-15 Thread John Yeung
On Feb 15, 2:54 pm, BJ Swope bigbluesw...@gmail.com wrote: def clean_stale_mail():     msg_date1= the_email.get('Date')     msg_date2 = email.utils.parsedate_tz(msg_date1)     try:         utc_msg_date = email.utils.mktime_tz(msg_date2)     except OverflowError:         M.store(msg_id,

Re: Modifying Class Object

2010-02-15 Thread Arnaud Delobelle
John Posner jjpos...@optimum.net writes: [...] x = s[0] [...] assigns the name *x* to the object that *s[0]* refers to s[0] does not refer to an object, it *is* an object (once evaluated of course, otherwise it's just a Python expression). -- Arnaud --

Few Small Questions Regarding CGI

2010-02-15 Thread joy99
Dear Group, I am trying to learn CGI. I was checking Python Docs. There are multiple modules. Which one to start with? Is there any other material or URL for step by step learning of CGI. My next question is: I want to test it. I have a small personal computer. I have internet but is connected

Re: plugin / intra process communication system

2010-02-15 Thread Florian Ludwig
On Sun, 2010-02-14 at 18:47 +0100, Diez B. Roggisch wrote: Here there problem with the trac (and other plugin systems I've seen) approach: You need to define something like: | | class IAuthPlugin(Interface): [...] | in your blog software. Why? Any reason you can't define it in

Re: TypeError Exception in email lib

2010-02-15 Thread BJ Swope
On Mon, Feb 15, 2010 at 3:42 PM, MRAB pyt...@mrabarnett.plus.com wrote: BJ Swope wrote: [snip] def clean_stale_mail():    msg_date1= the_email.get('Date') What is the value of 'msg_date1' at this point?    msg_date2 = email.utils.parsedate_tz(msg_date1) What is the value of 'msg_date2'

Re: Plugin architecture

2010-02-15 Thread Florian Ludwig
Hi mk, On Mon, 2010-02-15 at 19:43 +0100, mk wrote: Hello everyone, I'm thinking about writing plugin-style architecture for (a new) web-based app (with SQLAlchemy as backend). [...] How would you approach designing such architecture using features available in Python (and some major

Re: Replace various regex

2010-02-15 Thread Martin
On Feb 15, 2:27 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Martin wrote: On Feb 15, 2:03 pm, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Martin wrote: Hi, I am trying to come up with a more generic scheme to match and replace a series ofregex, which look

Re: MODULE FOR I, P FRAME

2010-02-15 Thread Rhodri James
On Sun, 14 Feb 2010 10:07:35 -, DANNY danijel.gv...@gmail.com wrote: Hy, first thanks for your response! Well I am thinkin on coding in MPEG4/10, but I would just encode the video in that encoding, then stream it with VLC and save the video file on my disc. Then I would play it with my

Re: how to structure a directory with many scripts and shared code

2010-02-15 Thread Steven D'Aprano
On Mon, 15 Feb 2010 16:29:05 +0100, Benedict Verheyen wrote: However, when i make a subdirectory, for example database and put a script in there, how would i import logutils or mailtutils from within the database subdirectory? This fails: from tools.logutils import logger Sounds like you

Re: Modifying Class Object

2010-02-15 Thread Steven D'Aprano
On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote: John Posner jjpos...@optimum.net writes: [...] x = s[0] [...] assigns the name *x* to the object that *s[0]* refers to s[0] does not refer to an object, it *is* an object (once evaluated of course, otherwise it's just a

Parsing for email addresses

2010-02-15 Thread galileo228
Hey all, I'm trying to write python code that will open a textfile and find the email addresses inside it. I then want the code to take just the characters to the left of the @ symbol, and place them in a list. (So if galileo...@gmail.com was in the file, 'galileo228' would be added to the list.)

Re: Modifying Class Object

2010-02-15 Thread Alf P. Steinbach
* Steven D'Aprano: On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote: John Posner jjpos...@optimum.net writes: [...] x = s[0] [...] assigns the name *x* to the object that *s[0]* refers to s[0] does not refer to an object, it *is* an object (once evaluated of course, otherwise

Re: Parsing for email addresses

2010-02-15 Thread Jonathan Gardner
On Feb 15, 3:34 pm, galileo228 mattbar...@gmail.com wrote: I'm trying to write python code that will open a textfile and find the email addresses inside it. I then want the code to take just the characters to the left of the @ symbol, and place them in a list. (So if galileo...@gmail.com was

Re: Few Small Questions Regarding CGI

2010-02-15 Thread Jonathan Gardner
On Feb 15, 2:04 pm, joy99 subhakolkata1...@gmail.com wrote: I am trying to learn CGI. I was checking Python Docs. There are multiple modules. Which one to start with? Is there any other material or URL for step by step learning of CGI. I would suggest skipping 15 years of internet progress

Re: Time out a regular expression in Python 2.6.4?

2010-02-15 Thread Jonathan Gardner
On Feb 15, 7:59 am, Steve Holden st...@holdenweb.com wrote: pyt...@bdurham.com wrote: Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria. If a user enters a pathological regular

listing existing windows services with python

2010-02-15 Thread News123
Hi, What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. Thanks for any info and bye N --

How to use python to register a service (an existing .exe file)

2010-02-15 Thread News123
Hi, Is there a python way to register new windows services. I am aware of the instsrv.exe program, which can be used to install services. I could use subprocess.Popen to call instsrv.exe service_name program.exe but wondered, whether there's already an existing function. Thans in advance

Re: Which mock library do you prefer?

2010-02-15 Thread Ben Finney
Lacrima lacrima.ma...@gmail.com writes: Minimock has wider usage and community, but I have some troubles using it. Maybe I am wrong, but with minimock you always have to keep track the order of imports in your test modules. Well, may be I just don't understand fully how minimock works. I'm

Re: listing existing windows services with python

2010-02-15 Thread Alf P. Steinbach
* News123: Hi, What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. Thanks for any info and bye * Library: If there is some

Re: Modifying Class Object

2010-02-15 Thread John Posner
On 2/15/2010 6:09 PM, Steven D'Aprano wrote: On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote: John Posnerjjpos...@optimum.net writes: [...] x = s[0] [...] assigns the name *x* to the object that *s[0]* refers to s[0] does not refer to an object, it *is* an object (once

Re: Parsing for email addresses

2010-02-15 Thread Tim Chase
Jonathan Gardner wrote: On Feb 15, 3:34 pm, galileo228 mattbar...@gmail.com wrote: I'm trying to write python code that will open a textfile and find the email addresses inside it. I then want the code to take just the characters to the left of the @ symbol, and place them in a list. (So if

Re: Few Small Questions Regarding CGI

2010-02-15 Thread Mel
joy99 wrote: Dear Group, I am trying to learn CGI. I was checking Python Docs. There are multiple modules. Which one to start with? Is there any other material or URL for step by step learning of CGI. My next question is: I want to test it. I have a small personal computer. I have

Re: Parsing for email addresses

2010-02-15 Thread Ben Finney
galileo228 mattbar...@gmail.com writes: I'm trying to write python code that will open a textfile and find the email addresses inside it. I then want the code to take just the characters to the left of the @ symbol, and place them in a list. Email addresses can have more than one �...@’

Re: Time out a regular expression in Python 2.6.4?

2010-02-15 Thread Steve Holden
Jonathan Gardner wrote: On Feb 15, 7:59 am, Steve Holden st...@holdenweb.com wrote: pyt...@bdurham.com wrote: Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria. If a user enters a

Re: Time out a regular expression in Python 2.6.4?

2010-02-15 Thread MRAB
Steve Holden wrote: Jonathan Gardner wrote: On Feb 15, 7:59 am, Steve Holden st...@holdenweb.com wrote: pyt...@bdurham.com wrote: Is there any way to time out a regular expression in Python 2.6.4? Motiviation: Our application allows users to enter regular expressions as validation criteria.

Web Service Using XML for input and output

2010-02-15 Thread Shane McIntyre
I'm attempting to use a web service that takes XML as an input and returns an XML output.  I can connect to the service and attempt to pass in the XML but do not get any results. I believe my problem is how to package up the XML and send it in the request.  The XML consists of about 20

Re: listing existing windows services with python

2010-02-15 Thread alex23
News123 news...@free.fr wrote: What is the best way with python to get a list of all windows services. As a start I would be glad to receive only the service names. However it would be nicer if I could get all the properties of a service as well. I highly recommend Tim Golden's fantastic

Re: Web Service Using XML for input and output

2010-02-15 Thread Steve Holden
Shane McIntyre wrote: I'm attempting to use a web service that takes XML as an input and returns an XML output. I can connect to the service and attempt to pass in the XML but do not get any results. I believe my problem is how to package up the XML and send it in the request. The XML

  1   2   >