On Feb 16, 12:53 am, "Rhodri James"
wrote:
> On Sun, 14 Feb 2010 10:07:35 -, DANNY 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
joy99 wrote:
>
>I am trying to learn CGI. I was checking Python Docs. There are
>multiple modules. Which one to start with?
Well, it seems to me that the first place to start is the built-in CGI
module, in "cgi.py". I'm not aware of any other CGI-based modules in the
standard library.
--
Tim Ro
Does anyone know where I can find a compiled demo that uses MPL
graphics? I'd like, if possible, a Win version whose size is less than
10M, so that I can send it via e-mail, if necessary. It should use plot,
so that someone can manipulate the plot with the navigation controls. At
this point, I
* alex23:
On Feb 16, 1:28 pm, "Alf P. Steinbach" wrote:
It's probably Very Good, but one Microsoft-thing one should be aware of: using
WMI functionality generally starts up a background WMI service...
"Probably"?
That means that since you say it's fantastic, it's probably very good.
"Proba
On Feb 16, 1:28 pm, "Alf P. Steinbach" wrote:
> It's probably Very Good, but one Microsoft-thing one should be aware of: using
> WMI functionality generally starts up a background WMI service...
"Probably"? You haven't even used the module but you felt the need to
contribute anyway? And I see tha
On Mon, Feb 15, 2010 at 18:17, Alf P. Steinbach wrote:
> * 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
HI All,
I'm fiddling around with Python and I'm trying to get tktable to work
with Python 3.1 on Apple OS X 10.6 (Snow Leopard). Has anyone
successfully accomplished this task, and if so, can you share how that
you got it working? I've got Darwin Ports installed (current version)
and I'm using Pyt
On Mon, Feb 15, 2010 at 18:10, News123 wrote:
> 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 wonde
>From the Cplusplus-sig, I gathered that instead of Boost.Python I
should use ctypes for the following problem. But let me make sure I'm
using it correctly.
I am calling the C Leptonica Image Processing C Library
(http://leptonica.com) from python.
Within its leptprotos.h file are functions like
* alex23:
News123 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 WMI modu
On Feb 15, 3:59 pm, John Yeung wrote:
> It looks to me like you have to do something to make clean_stale_mail
> more robust, rather than focusing on anything in the standard library.
Let me quickly add: ...or fix whatever calls clean_stale_mail, etc.
John
--
http://mail.python.org/mailman/list
In <631b0785-38db-4c12-a82a-7b11e2235...@o16g2000prh.googlegroups.com> joy99
writes:
> Can I use my personal computer as a client as well as a server?
Yes, if you install a web server on your PC. You would then use
"localhost" in your browser instead of a standard web address.
Assuming you'r
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 con
News123 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 WMI module[1
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 tag/value
Steve Holden wrote:
Jonathan Gardner wrote:
On Feb 15, 7:59 am, Steve Holden 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
pa
Jonathan Gardner wrote:
> On Feb 15, 7:59 am, Steve Holden 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 pathologic
galileo228 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 �...@’ character. In fact, t
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 hav
Jonathan Gardner wrote:
On Feb 15, 3:34 pm, galileo228 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 w
On 2/15/2010 6:09 PM, Steven D'Aprano wrote:
On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote:
John Posner 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, o
* 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
Lacrima 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 not sure why you thin
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
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
--
http://mail.python.org/mailman/listinf
On Feb 15, 7:59 am, Steve Holden 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
> > expression
On Feb 15, 2:04 pm, joy99 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 and going with
a more m
On Feb 15, 3:34 pm, galileo228 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 in the file, '
* Steven D'Aprano:
On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote:
John Posner 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 e
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.
On Mon, 15 Feb 2010 21:25:23 +, Arnaud Delobelle wrote:
> John Posner 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 expressio
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
On Sun, 14 Feb 2010 10:07:35 -, DANNY 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 player
I think you're
On Feb 15, 2:27 pm, Jean-Michel Pichavant
wrote:
> Martin wrote:
> > On Feb 15, 2:03 pm, Jean-Michel Pichavant
> > wrote:
>
> >> Martin wrote:
>
> >>> Hi,
>
> >>> I am trying to come up with a more generic scheme to match and replace
> >>> a series ofregex, which look something like this...
>
> >
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 som
On Mon, Feb 15, 2010 at 3:42 PM, MRAB 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' at this poin
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 c
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 by
John Posner 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
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 15, 2:54 pm, BJ Swope 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, '+FLAGS.SILENT', '\
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
repl
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",
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).
i'
> On 15 February 2010 20:04, Chris Rebert wrote:
>> On Mon, Feb 15, 2010 at 6:10 AM, starglider develop
>> 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,
On Mon, Feb 15, 2010 at 6:10 AM, starglider develop
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 is like CPAN for Py
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 co
On Mon, Feb 15, 2010 at 2:47 PM, BJ Swope wrote:
> On Mon, Feb 15, 2010 at 2:31 PM, Stephen Hansen wrote:
>> On Mon, Feb 15, 2010 at 10:53 AM, BJ Swope wrote:
>>>
>>> File "/usr/lib/python2.5/email/_parseaddr.py", line 142, in mktime_tz
>>> if data[9] is None:
>>> TypeError: 'NoneType' objec
On Mon, Feb 15, 2010 at 10:29 AM, Leo Breebaart 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.
>
> I can der
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 ca
On Mon, Feb 15, 2010 at 2:31 PM, Stephen Hansen wrote:
> On Mon, Feb 15, 2010 at 10:53 AM, 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 an
On Mon, Feb 15, 2010 at 10:53 AM, 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.
>
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 man
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 ca
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
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 try/ex
> 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:
>
>
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
On Feb 15, 6:57 pm, Phlip 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
> > * dingus
> >
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 someth
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 = "http://serv
On Mon, Feb 15, 2010 at 12:55 PM, fernando sedano 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 erro
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:
'F:\\Fir
Thanks for the help!
Using while True helps alot!
Paulo Repreza
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 15, 1:07 am, Steve Howell wrote:
> On Feb 14, 11:52 am, Mark Dickinson wrote:
>
>
>
>
>
> > On Feb 14, 4:53 pm, mukesh tiwari
> > wrote:
>
> > > Hello everyone. I am new to python and previously i did programming in
> > > c/c++.Could some one please help me to improve the run time for thi
On Feb 15, 8:15 am, Lacrima 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 for me the late
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 s
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
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
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
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
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(
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 co
Jean-Michel Pichavant 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 randint
>
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 d
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:
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())
>>
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
Jean-Michel Pichavant wrote:
> 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 yo
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:
h
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 py
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
#
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{heig
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
|->logu
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 number
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 u
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
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{hei
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 t
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
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 in
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
Mug 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) # x= 40 y=Non
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 cool'
Martin wrote:
On Feb 15, 2:03 pm, Jean-Michel Pichavant
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
On Feb 15, 2:03 pm, Jean-Michel Pichavant
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, 1.0 !
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).
-
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
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
On Feb 15, 12:20 pm, "Alf P. Steinbach" 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 2.2.1
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
1 - 100 of 113 matches
Mail list logo