On Mon, 21 Jul 2008, Christopher Spears wrote:
> By all means, share your script! Even if I don't use it, I can learn
> something from it!
Well, maybe. If nothing else, perhaps you'll learn some new bad habits.
The timestamp on this file shows that I dropped this project in June 2005,
and you
Hello,
I am new to programming with python and sockets.
I would like to determine the status of a socket as it is returned when you do
'netstat -a | grep '. I would like to know if the socket state is
ESTABLISHED, LISTEN , CLOSE_WAIT, etc.
Is there a way to get this information through a socke
"Neven Gorsic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Mon, Jul 21, 2008 at 9:44 AM, Monika Jisswel
<[EMAIL PROTECTED]> wrote:
instead of s='e:\mm tests\1. exp files\5.MOC-1012.exp'
try to use : s = r'e:\mm tests\1. exp files\5.MOC-1012.exp'.replace(
'\\', '')
for m
"Danyelle Gragsone" <[EMAIL PROTECTED]> wrote
I have the first edition of Python Programming for the Absolute
Beginner.
Will this work instead of the 2nd edition?
Python changes little and slowly between versions so the
answer is almost certainly yes. New features are by definition
major and
At 01:42 PM 7/21/2008, Terry Carroll wrote:
On Mon, 21 Jul 2008, Daniel Sarmiento wrote:
> What about the following function?
>
> if x == 0:
> return False
> return True
I don't like it, myself. You have multiple points of exit, and, yes, you
can see that the fallthough is only executed if
"Ruivaldo Neto" <[EMAIL PROTECTED]> wrote
I have a Python app that runs as a Windows Service. Inside this
application, there is a Thread that starts a webservice.
When this webservice is called, this thread displays a simple
Tkinter
window with some entry´s for input.
Thats usually a very ba
By all means, share your script! Even if I don't use it, I can learn something
from it!
Thanks!
--- On Mon, 7/21/08, Terry Carroll <[EMAIL PROTECTED]> wrote:
> From: Terry Carroll <[EMAIL PROTECTED]>
> Subject: Re: [Tutor] adding a watermark to a sequence of images
> To: [EMAIL PROTECTED], tut
> What I use in this situation is the INI config file parser in the
> standard lib. It's easy to use
>
> http://docs.python.org/lib/module-ConfigParser.html
>
Awesome!
Really easy and intuitive.
Thanks a lot
___
Tutor maillist - Tutor@python.org
http:
On Mon, Jul 21, 2008 at 1:59 PM, Ruivaldo Neto <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a Python app that runs as a Windows Service. Inside this
> application, there is a Thread that starts a webservice.
> When this webservice is called, this thread displays a simple Tkinter
> window with some
On Mon, 21 Jul 2008, Daniel Sarmiento wrote:
> What about the following function?
>
> if x == 0:
> return False
> return True
I don't like it, myself. You have multiple points of exit, and, yes, you
can see that the fallthough is only executed if the condition is not met,
but it makes you
On Sun, 20 Jul 2008, Christopher Spears wrote:
> Has anyone used Python to watermark of sequence of images?
There's a recipe for watermarking using PIL here:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362879
I have a half-baked program that goes through a directory of images and
t
Hi,
I have the first edition of Python Programming for the Absolute Beginner.
Will this work instead of the 2nd edition?
thanks,
Danyelle
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Sun, Jul 20, 2008 at 09:17:51PM -0400, bhaaluu wrote:
>
> If you're disciplined enough to shell out $$$ for an online class
> and do the work, why not just do it on your own? The tuition for
> a class will buy you several very nice Python books:
>
> Learning Python. Lutz.
> Programming Python.
> Message: 9
> Date: Mon, 21 Jul 2008 16:08:45 +0200
> From: Daniele <[EMAIL PROTECTED]>
> Subject: [Tutor] Configuration File Pattern
> To: tutor@python.org
> Message-ID:
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=UTF-8
>
> Hi list,
> I've recently developed a basic python
> Thanks,
> I am aware of goodies that raw string offers, but my question was
> how to use it with variable that already contains string. :)
If you really have to, you may use something like this:
# Untested
def kludge(s):
s = 'r"""%s"""' % repr(s)
return eval(s)
Most people would fr
Hi,
I have a Python app that runs as a Windows Service. Inside this
application, there is a Thread that starts a webservice.
When this webservice is called, this thread displays a simple Tkinter
window with some entry´s for input.
But the mainloop simple stays running without presenting any popup
On Mon, Jul 21, 2008 at 10:20 AM, Daniel Sarmiento <[EMAIL PROTECTED]>
wrote:
> What about the following function?
>
> if x == 0:
>return False
> return True
>
>
> I am a beginner, but I think it is more clear (at least to me) what
> the function does. And it is only one line longer than
>
> v
On Mon, Jul 21, 2008 at 10:29 AM, Marc Tompkins <[EMAIL PROTECTED]>
wrote:
>
> How about
>
>> return (x!=0)
>>
> ?
>
> Short and cryptic!
>
Sorry - I had deleted all the old messages in the thread, and only responded
to the latest. My bad - I see now that I've joined in beating a dead horse.
-
What about the following function?
if x == 0:
return False
return True
I am a beginner, but I think it is more clear (at least to me) what
the function does. And it is only one line longer than
value = (x != 0)
return value
___
Tutor maillist -
What I use in this situation is the INI config file parser in the
standard lib. It's easy to use
##CONFIG FILE
[paths]
images=/home/user/Images
##CODE###
import ConfigParser
config=ConfigParser.ConfigParser()
config.readfp(open(conf,'r'))
print config
http://docs.python.org/lib/module-Con
Hi list,
I've recently developed a basic python program which needs to store
some data in a file (e.g. a directory path).
What the program needs is a dictionary containing the data, so I used
the pickle module to store the dictionary in a file and read it back
when the program is launched.
I wanted
BTW, wordwrap issue, all that is on ONE LINE.
Kirk Bailey wrote:
ok, here is the link;
http://www.seaxtradusa.org/
In the footer of all webppages (not in the wiki or in the forum), is a
link so i can edit pages on the site without bothering to use a shell
account or upload pages or anything. I
ok, here is the link;
http://www.seaxtradusa.org/
In the footer of all webppages (not in the wiki or in the
forum), is a link so i can edit pages on the site without
bothering to use a shell account or upload pages or
anything. I just wrote this, and it is password protected.
This is a handy l
2008/7/21 Martin Walsh <[EMAIL PROTECTED]>:
> Neven Goršić wrote:
>> I read from one file plenty of parameters and among them one file name
>> of other file.
>> That file name is 'e:\mm tests\1. exp files\5.MOC-1012.exp' and I hold
>> it in variable s.
>
> As John pointed out, if you're really read
Eli Brosh wrote:
Hello,
Is there a way to get a list of installed python modules and their
versions ?
i.e. I would like to know if matplotlib is installed on my computer and
what version is it.
And so with other modules.
You've got two slightly different requirements there:
1) List all mod
>
> I don't know in advance what the file name will be...
import re
for line in myfile:
if re.search(r'\', line):
line = line.replace('\\', '')
if you have lines that contain a \ in them that you don't want to substitute
then you need another if statement.
___
Neven Goršić wrote:
> I read from one file plenty of parameters and among them one file name
> of other file.
> That file name is 'e:\mm tests\1. exp files\5.MOC-1012.exp' and I hold
> it in variable s.
As John pointed out, if you're really reading this string from a file
(with something like file
Hello,
Is there a way to get a list of installed python modules and their versions ?
i.e. I would like to know if matplotlib is installed on my computer and what
version is it.
And so with other modules.
Thanks
Eli
___
Tutor maillist - Tutor@python.o
On Mon, Jul 21, 2008 at 5:15 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> They want me to do one test runner which runs any test... And ideally it
> should work on any platform
You might want to look at nose or py.test, they both have test
runners. I think you can give nose a directory and it w
>
> Thanks,
> I am aware of goodies that raw string offers, but my question was how to
> use it with variable that already contains string. :)
>
if you are reading the value from a file :
import re
for line in myfile:
if re.search(r'e:\mm tests\1. exp files\5.MOC-1012.exp', line):
l
On Mon, Jul 21, 2008 at 5:15 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> They want me to do one test runner which runs any test... And ideally it
> should work on any platform
>
> When I added something to $PYTHONPATH, they told me to remove it...
>
>
You can set environment variables within p
They want me to do one test runner which runs any test... And ideally it
should work on any platform
When I added something to $PYTHONPATH, they told me to remove it...
On Mon, Jul 21, 2008 at 12:11 PM, arsyed <[EMAIL PROTECTED]> wrote:
> On Mon, Jul 21, 2008 at 4:46 AM, Oleg Oltar <[EMAIL
On Mon, Jul 21, 2008 at 9:44 AM, Monika Jisswel
<[EMAIL PROTECTED]> wrote:
> instead of s='e:\mm tests\1. exp files\5.MOC-1012.exp'
> try to use : s = r'e:\mm tests\1. exp files\5.MOC-1012.exp'.replace(
> '\\', '')
> for me here is what it gives:
>
s = r'e:\mm tests\1. exp files\5.MOC-101
On Mon, Jul 21, 2008 at 3:46 AM, Oleg Oltar <[EMAIL PROTECTED]> wrote:
> If I am adding, __init__.py it still doesn't import anything.
> Do I have add the import (from sampletest import EmailWithoutA) in my init
> file?
>
>
I didn't notice this before, but I don't think python does tilde expansio
If I am adding, __init__.py it still doesn't import anything.
Do I have add the import (from sampletest import EmailWithoutA) in my init
file?
On Mon, Jul 21, 2008 at 1:28 AM, arsyed <[EMAIL PROTECTED]> wrote:
> On Sun, Jul 20, 2008 at 12:46 PM, Oleg Oltar <[EMAIL PROTECTED]>
> wrote:
>
>> Hi
>>
instead of s='e:\mm tests\1. exp files\5.MOC-1012.exp'
try to use : s = r'e:\mm tests\1. exp files\5.MOC-1012.exp'.replace('\\',
'')
for me here is what it gives:
>>> s = r'e:\mm tests\1. exp files\5.MOC-1012.exp'.replace('\\', '')
>>> print s
e:\\mm tests\\1. exp files\\5.MOC-1012.exp
>>
36 matches
Mail list logo