George Sakkis wrote:
> One of the few Python constructs that feels less elegant than
> necessary to me is the del statement. For one thing, it is overloaded
> to mean three different things:
> (1) del x: Remove x from the current namespace
> (2) del x[i]: Equivalent to x.__delitem__(i)
> (3) del
Am Mittwoch 07 Mai 2008 22:39:30 schrieb Luis Zarrabeitia:
> There you have it, interfaces are not enough to ensure that the
> implementors actually implement the methods. They are useful for
> warning at compile time if there is a missing method, but nothing
> more.
It's not the fault of the en
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
2. python requires to pass "self" to all instance methods
and I missed ":" often. :)
--
http://mail.python.org
"Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote:
>2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>:
>> Subj is bag?
>>
>> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
>> (Intel)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> f
Hi,
I'm looking for a method of gathering information about the system
hardware and software installed using Python. I would like to do it in
UNIX and in Windows. I think that it would be good in Windows to look
in the registry and be able to parse and search it. Any pointer to
information would be
Am Donnerstag 08 Mai 2008 00:12:26 schrieb
[EMAIL PROTECTED]:
> very often sees do-nothing catch-all try/catch blocks in Java - which
> is way worse than just letting the exception propagate. I find all
> this totally pointless, because there's just no way for a compiler to
> check if your code i
v4vijayakumar wrote:
When I started coding in python, these two things surprised me.
1. my code is inconsistently indented with the combination of tabs and
spaces. Even lines looked intended, but it is not.
Even the standard editor Idle tries to guess the intendation, so this
was never a probl
Hi everyone
The following code:
scriptPath = os.path.dirname(__file__)
(dirpath, dirnames, filenames) = os.walk(scriptPath)
print 'dirpath\n'
print dirpath
print 'dirnames\n'
pprint.pprint(dirnames)
print 'filenames\n'
pprint.pprint(filnames)
Fails on the os.walk call with the following error:
On May 7, 9:35 pm, Max Erickson <[EMAIL PROTECTED]> wrote:
> WolfgangZ <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED] schrieb:
> >> hi All,
> >>http://mail.python.org/mailman/listinfo/python-list
>
> > At least I'm living in a free country and nobody forces me to
> > learn python. So I don't full
On 8 Mai, 02:55, adolfo <[EMAIL PROTECTED]> wrote:
> ...
> 1- The strange thing is that I went to thedislindirectory in the C:
> drive and there was no disli.pyd file anywhere. I found the file in
> the My Documents subdirectory where I had originally unzipped
> thedislinarchived files I download
On Thu, 08 May 2008 15:42:07 +1000, dave <[EMAIL PROTECTED]>
wrote:
This is what i've came up with. My problem is that I can't get them to
properly evaluate.. when comparewords() runs it finds itself... Should
I have the keys of mapdict iterate over itself? Is that possible?
def annaf
Tim Roberts wrote:
> I think that's a perfectly reasonable thing to expect. At the risk of
> over-generalization, there is no good reason why, by this point in time,
> all of the standard library routines that accept strings shouldn't also
> accept Unicode strings.
However, file(fname), open(fnam
2008/5/8 Tim Roberts <[EMAIL PROTECTED]>:
> "Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote:
>
> >2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>:
>
> >> Subj is bag?
> >>
> >> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit
> >> (Intel)] on win32
> >> Type "help", "co
Hi All
I am have written an application that queries a POP mailbox and
downloads messages. When the application tries to connect to the mail
server, but takes too long (eg. longer than 60 seconds) I want to have
it time out.
Something like
try:
pop = poplib.POP3(POPHOST, POPPORT)
except
Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>
>
> George Sakkis wrote:
>> One of the few Python constructs that feels less elegant than
>> necessary to me is the del statement. For one thing, it is overloaded
>> to mean three different things:
>> (1) del x: Remove x from the current namespace
>>
PÃ¥ Thu, 08 May 2008 04:14:35 +0200, skrev Kyle McGivney
<[EMAIL PROTECTED]>:
⢠Module, Block, in Mathematica is in lisp's various âlet*â. The
lisp's keywords âletâ, is based on the English word âletâ. That word
is one of the English word with multitudes of meanings. If you look
[EMAIL PROTECTED] wrote:
> Here is a simple lambda that implements an exclusive or:
>
def XOR(x,y) :
return lambda : ( ( x ) and not ( y ) ) or ( not ( x ) and ( y )
)
>
> (Because of the resemblance to C macros, I have been cautious and
> written the lambda with lots of parentheses
> Â Â Â Â Â | Â PLEASE DO NOT Â | Â Â Â Â Â Â :.:\:\:/:/:.:
> Â Â Â Â Â | Â FEED THE TROLLS Â | Â Â Â Â Â :=.' - Â - '.=:
I don't think Xah is trolling here (contrary to his/her habit)
but posing an interesting matter of discussion.
Don't know to which point it fits, but I w
<[EMAIL PROTECTED]> writes:
> (dirpath, dirnames, filenames) = os.walk(scriptPath)
You're supposed to loop over values in different directories, like
this:
for dirpath, dirnames, filenames in os.walk(scriptPath):
... handle dirpath with dirnames and filenames ...
The loop will be execut
On May 8, 2:14 am, "Florencio Cano" <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm looking for a method of gathering information about the system
> hardware and software installed using Python. I would like to do it in
> UNIX and in Windows. I think that it would be good in Windows to look
> in the registr
Duncan Booth wrote:
> Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > George Sakkis wrote:
> >> One of the few Python constructs that feels less elegant than
> >> necessary to me is the del statement. For one thing, it is overloaded
> >> to mean three different things:
> >> (1) del x: R
Hi,
While looking around for Python API's to do SNMP, found the following link
with a high level comparison --
http://urchin.earth.li/~twic/SNMP_in_Python.html
i.e. options seems to be: PySNMP (complete SNMP impl.), SNMPy, yapSNMP
(Net-SNMP bindings).
Of those, yapSNMP seems to be most promising
"Roger Upole" <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Sizer wrote:
>> It's just a little weird that I
>> can't just drag and drop file names onto .pyw or .py files. Am I
>> missing something here?
>>
>> Thanks for any help.
>
> You can register a DropHandler for the Python file cla
Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>
>
> Duncan Booth wrote:
>> Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
>>
>> >
>> >
>> > George Sakkis wrote:
>> >> One of the few Python constructs that feels less elegant than
>> >> necessary to me is the del statement. For one thing, it is
overlo
En Wed, 07 May 2008 23:29:58 -0300, <[EMAIL PROTECTED]> escribió:
> On 5月7日, 上午9时45分, Justin Ezequiel <[EMAIL PROTECTED]>
> wrote:
>> On May 6, 5:19 pm, [EMAIL PROTECTED] wrote:
>>
>> > p1 = Popen(['netstat', '-an'], stdout = PIPE)
>> > p2 = Popen(['find', '"445"'], stdin = p1.stdout, stdout = PI
[EMAIL PROTECTED] ha scritto:
On 7 mai, 16:17, pistacchio <[EMAIL PROTECTED]> wrote:
George Sakkis ha scritto:
(snip)
What does it matter if it's a single file or a dozen under a package ?
"Installation" for pure Python packages can be as simple as copying
the package under any directory in yo
> From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> the importance of naming of functions.
I agree, that's a useful consideration in the design of any system
based on keywords, such as names of functions or operators.
(I'm not using "keyword" in the sense of a symbol in the KEYWORD package.)
> the
[EMAIL PROTECTED] wrote:
> I'm wondering if anyone can help with a workaround for a problem I
> currently have. I'm trying to set up a prefork tcp server.
> Specifically, I'm setting up a server that forks children and has them
> listen on pipes created with os.pipe(). The parent process for the
[EMAIL PROTECTED] wrote:
| PLEASE DO NOT |:.:\:\:/:/:.:
| FEED THE TROLLS | :=.' - - '.=:
I don't think Xah is trolling here (contrary to his/her habit)
but posing an interesting matter of discussion.
Interesting is in the eye of the beholder.
Robert Maas, http://tinyurl.com/uh3t wrote:
I have my own gripe against regular expressions ("regex" for short).
I hate the extremely terse format, with horrible concoctions of
escape and anti-escape magic characters, to fit within Unix's
255-character limit on command lines, compared to a nicely
On 2008-05-08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i was reading/learning some hello world program in python.
> I think its very simillar to Java/C++/C#. What's different (except
> syntax) ?
Yes, and all programs that people write typically look like the hello world
program.
Loo
On Thu, 2008-05-08 at 09:12 +0200, Daniel Marcel Eichler wrote:
> Am Mittwoch 07 Mai 2008 21:48:56 schrieben Sie:
>
> > > That's the point. Interfaces garantee that a duck is a duck, an not
> > > only a chicken that quack.
> > Which, in spite of your rhetorical flourish, is the exact opposite of
>
-On [20080507 15:06], Mike Driscoll ([EMAIL PROTECTED]) wrote:
>http://genshi.edgewall.org/
>http://www.kid-templating.org/
>http://www.cheetahtemplate.org/
>http://turbogears.org/
Add the following to that list:
http://jinja.pocoo.org/
http://www.makotemplates.org/
I think Jinja and Mako are cu
On May 8, 5:25 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> i was reading/learning some hello world program in python.
> I think its very simillar to Java/C++/C#. What's different (except
> syntax) ?
>
> what can i do easily with python which is not easy in c++/java !?
>
Are you a
Hi,This is regarding an opening for software Engineer(Open Source
Technologies)
The opening is with our client for their Noida branch.They are working
on various platforms like Microsoft,Open Source Technology.
The designation will be of software engineer/senior software engineer.
Skillset Required
[EMAIL PROTECTED] ha scritto:
Hi,
i was reading/learning some hello world program in python.
I think its very simillar to Java/C++/C#. What's different (except
syntax) ?
well, it's similar in the sense that it is a programming language. So
you can say that assembly is similar to BASIC, but t
This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specified, find 'python' from the
PATH environment, I don't really know.
Brian Vanderburg II
--
http://mail.python
Hi Raxit,
One of the the tempting features of Python is that it is fun to code
in Python. If you are really trying to learn python, you should read
Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an
introductory book on Python programming for school children by Mr.
Pramode CE.
I
For me, the difference is #!python doesn't work for me. I get a bad
interpreter error.
On Thu, May 8, 2008 at 6:31 AM, Brian Vanderburg II <
[EMAIL PROTECTED]> wrote:
> This is sort of related, but I'm wondering what is different between
> "#!/usr/bin/env python" and "#!python". Wouldn't the se
pls dont learn it
Move on
The world is full enough of 9 to 5 coders
Mark> From: [EMAIL PROTECTED]> Subject: Newbie to python --- why should i learn
!> Date: Thu, 8 May 2008 03:25:17 -0700> To: python-list@python.org> > Hi,> > i
was reading/learning some hello world program in python.> I th
Castironpi,
> Do you want send and throw in it too?
If its not too much trouble, I would love to see how you add these.
> formatter.NullFormatter.format_counter
> formatter.NullFormatter.format_letter
> formatter.NullFormatter.format_roman
I'm not sure what you mean by the above lines ... ...
Hello,
I just had to install an older version of python for a particular
app. Afterward, I had some necessary clean-up so that my normal work
python would work, but I noticed something odd about the
installation. Python is installed on the Mac in the directory
/Library/Frameworks/Python
C#
using System;
namespace HelloWorld
{
Class HelloWorld
{
static void Main(String[] args)
{
Console.WriteLine("Hello World");
}
}
}
--
http://mail.python.org/mailman/listinfo/python-list
Does python have an equivalent to Perl's inplace-edit variable $^I?
For example, the following perl code below changes mike to dave in a file
that is passed as an argument.
#!/usr/bin/env perl
#chgit script
$^I = '';
while(<>) {
s/mike/dave/g;
print;
}
The script would be used as below:
chgit
hello,
I have programmed co insidentally in all the 3 languages.
so out of my experience of 10 + years, I got my personal share of
reasons to prefer python over the other 2 namely c++ and java.
firstly as every one has already explained, python is easy, fun to
learn and can do many things much prod
M�ta-MCI (MVP) wrote:
> Hi!
>
>> I don't often feel like using this word
>
> Look at languages like OCAML or F #
The point being? Yes, shockingly enough other languages have other syntax &
semantics.
Diez
--
http://mail.python.org/mailman/listinfo/python-list
Hi All
I have written an application that queries a POP mailbox and
downloads messages. When the application tries to connect to the mail
server, but takes too long (eg. longer than 60 seconds) I want to have
it time out.
Something like
try:
pop = poplib.POP3(POPHOST, POPPORT)
except some
En Fri, 02 May 2008 16:13:41 -0300, Simon Pickles <[EMAIL PROTECTED]> escribió:
> I'm sorry if this has been asked a thousand (million) times.
>
> Is there a nifty pythonesque way to produce a string representing an
> elapsed time period, in terms of years, months, days, hours, mins, seconds?
>
>
On Thu, 08 May 2008 07:31:17 -0400
Brian Vanderburg II <[EMAIL PROTECTED]> wrote:
> This is sort of related, but I'm wondering what is different between
> "#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
> thing, since an absolute path is not specified, find 'python' from
> #!/usr/bin/env perl
> #chgit script
> $^I = '';
> while(<>) {
> s/mike/dave/g;
> print;
> }
>
#!/usr/bin/python
import sys
lines = open(sys.argv[1]).readlines()
open(sys.argv[1], 'w').writelines([line.replace('mike', 'dave') for
line in lines])
--
http://mail.python.org/mailman/listinfo/pyth
En Thu, 08 May 2008 09:11:56 -0300, Michael Mabin <[EMAIL PROTECTED]> escribió:
> Does python have an equivalent to Perl's inplace-edit variable $^I?
> For example, the following perl code below changes mike to dave in a file
> that is passed as an argument.
>
> #!/usr/bin/env perl
> #chgit script
Yves Dorfsman wrote:
So would it be a worthy addition to python, to add it right in the core
of the language, and hopefully in an efficient manner ?
Note that the s[0,2:6] syntax is currently allowed because of the distinct
semantics that the Numeric module and its successors numarray and
Hrvoje Niksic wrote:
<[EMAIL PROTECTED]> writes:
(dirpath, dirnames, filenames) = os.walk(scriptPath)
You're supposed to loop over values in different directories, like
this:
for dirpath, dirnames, filenames in os.walk(scriptPath):
... handle dirpath with dirnames and filenames ...
On Thu, May 8, 2008 at 2:11 PM, Michael Mabin <[EMAIL PROTECTED]> wrote:
> Does python have an equivalent to Perl's inplace-edit variable $^I?
>
I misread your question.
No, Python eschews magic characters and symbols. They make code ugly
and harder to read and maintain.
The first 3 lines of the
Aspersieman wrote:
I have written an application that queries a POP mailbox and ...
> I want to have it time out
I know that in python 2.5 I could pass an additional timeout parameter
to the above statement ( ie: pop = poplib.POP3(POPHOST, POPPORT,
TIMEOUTINSECONDS), but I am using python
En Thu, 08 May 2008 09:24:37 -0300, Aspersieman <[EMAIL PROTECTED]> escribió:
> I have written an application that queries a POP mailbox and
> downloads messages. When the application tries to connect to the mail
> server, but takes too long (eg. longer than 60 seconds) I want to have
> it time ou
D'Arcy J.M. Cain wrote:
On Thu, 08 May 2008 07:31:17 -0400
Brian Vanderburg II <[EMAIL PROTECTED]> wrote:
This is sort of related, but I'm wondering what is different between
"#!/usr/bin/env python" and "#!python". Wouldn't the second do the same
thing, since an absolute path is not specifi
On Thu, May 8, 2008 at 7:25 AM, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> i was reading/learning some hello world program in python.
> I think its very simillar to Java/C++/C#. What's different (except
> syntax) ?
>
> what can i do easily with python which is not easy in c++/java !
Hi
I have a python script that parses email headers to extract information
from them. I need to get the _last_ messageid in the 'References' field
(http://cr.yp.to/immhf/thread.html) to create a threaded view of these
emails (these messageid's are stored in a database).
Now, I can easily acc
The readme.txt has:
All you need to do is open the workspace
"pcbuild.sln" in Visual Studio,
select the desired combination of
configuration and platform and eventually
build the solution. Unless you are going
to debug a problem in the core or
you are going to create an optimized
build you w
Hello,
is it possibble listening on TCP port by python and how? I am trying
chilkat but poorly :(.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
Use socket.setdefaulttimeout(timeout_in_seconds) before you create the POP3
object; this value will be used by the initial connect. Once it is connected,
you can set a different timeout for retrieving mail using
pop.sock.settimeout(...)
Note that setdefaulttimeout appl
On Thu, May 8, 2008 at 2:53 PM, Aspersieman <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a python script that parses email headers to extract information
> from them. I need to get the _last_ messageid in the 'References' field
> (http://cr.yp.to/immhf/thread.html) to create a threaded view of these
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
> Are you a newbie to Python, or to programming in general? I'll assume
> you are a newbie to programming in general because of that last
> question you asked. Things in Python are easier than in almost any
> other programming language. Here are th
On Wed, May 7, 2008 at 11:22 PM, Jive Dadson <[EMAIL PROTECTED]> wrote:
> I wonder why it does not work with
>
> http://stockcharts.com/webcgi/wb.exe?Data.web+SLW
It looks like that is a subscription site. That makes things more
complicated, because it means you'll need to figure out how to log
Re-launch of The Gadgets Forum
Re-launch of "The Gadgets Forum - gadgets.pk" with new and stunning
categories, now you can find latest news and reviews about the
following:
1) Audio/Video Gadgets = MP3 Players, iPods, Speakers, Audio/Video
Systems,
En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]>
escribió:
> The readme.txt has:
>
> All you need to do is open the workspace
> "pcbuild.sln" in Visual Studio,
> select the desired combination of
> configuration and platform and eventually
> build the solution. Unless you
>
> "<.*>(<.*?>)"
>
Doesn't work if there is only one e-mail address:
Here's another one:
"<[^<]+>$"
--
http://mail.python.org/mailman/listinfo/python-list
Colin J. Williams wrote:
The readme.txt has:
All you need to do is open the workspace "pcbuild.sln" in Visual Studio,
select the desired combination of configuration and platform and eventually
build the solution. Unless you are going to debug a problem in the core or
you are going to create an
On Thu, 2008-05-08 at 14:53 +0200, Aspersieman wrote:
> Hi
>
> I have a python script that parses email headers to extract information
> from them. I need to get the _last_ messageid in the 'References' field
> (http://cr.yp.to/immhf/thread.html) to create a threaded view of these
> emails (the
Marc 'BlackJack' Rintsch ha scritto:
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
Are you a newbie to Python, or to programming in general? I'll assume
you are a newbie to programming in general because of that last
question you asked. Things in Python are easier than in almost any
other p
Hello,
How could I "prove" to someone that python accepts this syntax using
the documentation (I couldn't find it anywhere):
classname.functionname(objectname)
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2008-05-08 at 05:56 -0700, [EMAIL PROTECTED] wrote:
> Hello,
> is it possibble listening on TCP port by python and how? I am trying
> chilkat but poorly :(.
>
> Thanks
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You just asked this exact same question yesterday, and got
On May 8, 2:58 am, Arnaud Delobelle <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > One of the few Python constructs that feels less elegant than
> > necessary to me is the del statement. For one thing, it is overloaded
> > to mean three different things:
> > (1) del x: Remove x from the curr
Gabriel Genellina wrote:
En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]>
escribió:
The readme.txt has:
All you need to do is open the workspace
"pcbuild.sln" in Visual Studio,
select the desired combination of
configuration and platform and eventually
build the solut
I'm somewhat new to Python... and programming in general. I know enough to be
dangerous for sure. I have a feeling the solution to this is simple. I'm
having trouble getting 'self' to initialize or work in a class application. I
keep getting the message:
LogFile = self.BasicSummary (
Hi,
I would be interested in your opinion about what technology you
considear the ideal technology for implementing in Python an agent
that should comunicate information to a web server. I have read about
SOAP but I'm now sure if this will be the right one.
The aim of the agent is gather inventory
I've uploaded a new version of my PyWeek 6 game, Assembly Line.
http://media.pyweek.org/dl/6/gregpw6/AssemblyLine-0.5.zip
As a potential Pyggy entry, I'm keen to get some testing and feedback on it.
This version is greatly expanded. Some of the new features include:
* More machine types
> classname.functionname(objectname)
Do you mean something like this?
class myclass:
@staticmethod
def myfunction(myobject): pass
myobject = None
myclass.myfunction(myobject)
If so, then you want to check the staticmethod decorator, described here:
http://docs.python.org/lib/built-in-
Gabriel Genellina wrote:
En Thu, 08 May 2008 09:55:36 -0300, Colin J. Williams <[EMAIL PROTECTED]>
escribió:
The readme.txt has:
All you need to do is open the workspace
"pcbuild.sln" in Visual Studio,
select the desired combination of
configuration and platform and eventually
build the solut
Lucas Prado Melo wrote:
How could I "prove" to someone that python accepts this syntax using
the documentation (I couldn't find it anywhere):
classname.functionname(objectname)
TUtorial 9.3.4, method objects
What exactly happens when a method is called? You may have noticed that
x.f() was ca
I miswrote my question. But I still completely understand. What I really
wanted to know was whether there was something equivalent to how perl can
perform inplace edits of a file with something like the magic $^I variable.
I see from Gabriel that you can use the fileinput module to achieve thi
On Thu, 08 May 2008 15:49:01 +0200, pistacchio wrote:
> Marc 'BlackJack' Rintsch ha scritto:
>> On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
>>
>>> Are you a newbie to Python, or to programming in general? I'll assume
>>> you are a newbie to programming in general because of that last
>>> qu
I have two questions about the "observer pattern" in Python.
This is question #1. (I'll put the other is a separate post.)
Here is a standard example of the observer pattern in Python:
http://en.wikipedia.org/wiki/Observer_pattern
Contrast with this rather standard discussion:
http:/
Is there a program (free, payware, whatever) like polystyle for
linux/python?
http://www.polystyle.com/features/python-beautifier.jsp
I've never used it, but the example is quite clear.
I just need it for python -- but it should not force me to use PEP8.
--
http://mail.python.org/mailman/lis
Dennis,
> I was a touch bored in the last hour at work today so...
Thank you!!
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
I have two questions about the "observer pattern" in Python.
This is question #2. (I'll put the other is a separate post.)
Consider this standard example of the observer pattern in Python:
http://en.wikipedia.org/wiki/Observer_pattern>
Now suppose I have a variant.
(I am not a programm
Alan Isaac <[EMAIL PROTECTED]> writes:
> Is anything lost by not maintaining this reference (other
>
> than error checking ...)? If I feel the observer needs
>
> access to the subject, what is wrong with just having the
>
> subject pass itself as part of the notification?
It reduces the number
[EMAIL PROTECTED] writes:
>> Â Â Â Â Â | Â PLEASE DO NOT Â | Â Â Â Â Â Â :.:\:\:/:/:.:
>> Â Â Â Â Â | Â FEED THE TROLLS Â | Â Â Â Â Â :=.' - Â - '.=:
>
> I don't think Xah is trolling here (contrary to his/her habit)
> but posing an interesting matter of discussion.
It might
[EMAIL PROTECTED] wrote:
Hi,
i was reading/learning some hello world program in python.
I think its very simillar to Java/C++/C#. What's different (except
syntax) ?
what can i do easily with python which is not easy in c++/java !?
With Python, you can program with a smile on your face.
(Tr
Hello.
I am running Fedora Linux and KDE, using the Konsole command line.
When coding Python, I regularly make a bug causing my program to not
terminate. But how do I kill the non-terminating Python interpreter
without killing the entire Konsole?
The default way of killing the current process on
Okay, trying this again with everything working and no ValueError or any
other errors, here we go:
Load this code. Unless you use a similar login() script, you will want to
edit your own values into the user, passwd, db and host:
#!/usr/bin/python
import MySQLdb
import sys,os
sys.path.append(os
On Thu, 8 May 2008 08:29:33 -0700 (PDT), [EMAIL PROTECTED] wrote:
Hello.
I am running Fedora Linux and KDE, using the Konsole command line.
When coding Python, I regularly make a bug causing my program to not
terminate. But how do I kill the non-terminating Python interpreter
without killing th
[EMAIL PROTECTED] wrote:
> Hello.
>
> I am running Fedora Linux and KDE, using the Konsole command line.
>
> When coding Python, I regularly make a bug causing my program to not
> terminate. But how do I kill the non-terminating Python interpreter
> without killing the entire Konsole?
>
> The d
[EMAIL PROTECTED] wrote:
The default way of killing the current process on the command line is
Ctrl+C, but that doesn't work with Python.
It should work.
Do you have a bare except: which intercepts SystemExit as well?
If so, be as specific as possible in what you intercept, or at least
catc
On May 8, 5:48 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I'm wondering if anyone can help with a workaround for a problem I
> > currently have. I'm trying to set up a prefork tcp server.
> > Specifically, I'm setting up a server that forks children and has th
I was wondering if you know how can I run a python code once every five
minutes for a period of time either using python or some other program like
a bash script.
I have asked this question before and some of you answered me but I still
have problem. Most of the answers was to use cron and crontab
write a bash script(to run your program at intervals) and run the bash
script with nohup
- [EMAIL PROTECTED]
On Thu, May 8, 2008 at 9:02 AM, Maryam Saeedi <[EMAIL PROTECTED]> wrote:
> I was wondering if you know how can I run a python code once every five
> minutes for a period of time either us
On 2008-05-08 14:31, Gabriel Genellina wrote:
En Fri, 02 May 2008 16:13:41 -0300, Simon Pickles <[EMAIL PROTECTED]> escribió:
I'm sorry if this has been asked a thousand (million) times.
Is there a nifty pythonesque way to produce a string representing an
elapsed time period, in terms of years
Can you please explain it a little more? I do not have that much experience!
I really appreciate it if you can share a sample code if you have one.
Thanks
On Thu, May 8, 2008 at 11:07 AM, Amitabh Saikia <[EMAIL PROTECTED]>
wrote:
> write a bash script(to run your program at intervals) and run th
1 - 100 of 225 matches
Mail list logo