inaf wrote:
I have been following this group for quite some time and I figured
(after searching enough on google --and on this group-- and not
finding anything useful) I could pose this question here. Can anyone
shed some light on python's performance on Solaris?
Note that multithreaded com
>
> Any ideas? comments on code welcome also.
Here's something that I would probably do, there may be better ways.
This only works on python2.6 for the terminate() method.
import signal
import subprocess
def timeout_handler(signum, frame):
print "About to kill process"
p.terminate()
fo
Hi, I'm querying a list of network servers for processes belonging to a
specific user. The problem is that when I try to read the stdout from the
subprocess it sometimes hangs. Not always though.
I thought maybe I needed to set unbufferered to true, so at the beginning of
the code I set
os.envi
En Wed, 14 Oct 2009 23:08:53 -0300, Allen Fowler
escribió:
I've been using "data.encode('ascii','replace')" to force an ASCII
string out of Unicode data, with "?" in the place of non-ASCII letters.
However, now I want to use a blank space (or maybe a dash) instead of a
question mark.
U
"Allen Fowler" wrote in message
news:59796.73163...@web45608.mail.sp1.yahoo.com...
Hello,
I've been using "data.encode('ascii','replace')" to force an ASCII string
out of Unicode data, with "?" in the place of non-ASCII letters.
However, now I want to use a blank space (or maybe a dash) in
Tim Chase wrote:
CPython has the option to cache frequently used items, and does so for a
small range of ints. It's not guaranteed behavior (or a guaranteed
range) so you shouldn't rely on it, but it's an efficiency thing. In my
current version, it looks like it's ints from -5 to 256. YMMV
En Wed, 14 Oct 2009 22:08:09 -0300, prasanna
escribió:
Out of curiosity--one more thing I haven't yet figured out, is there a
xmlrpc command I can send that stops or restarts the server?
If you're using Python 2.6, the easiest way is to register its shutdown()
method. Note that it *must*
Peng Yu wrote:
> I actually wanted to ask what return code should be returned in this
> case when the arguments are not right. Thank you1
The BSD world attempted to standardize the codes so you may as well use
their definitions. You can see them in /usr/include/sysexits.h on your
nearest Linux/Un
> It's believable if id({}) does the following:
>
> 1. Construct an empty dict
> 2. Take the id of the dict
> 3. Reduce the reference-count on the now-unneeded dict.
>
> It's not too hard for the second empty dict to get allocated in the same
> memory that the first one (now dereferenced and de
Chris Rebert wrote:
> Although I have no idea how it is that `id({}) == id({})` as a prior
> posted showed; FWIW, I can't manage to reproduce that outcome.
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more informa
Hello,
I've been using "data.encode('ascii','replace')" to force an ASCII string out
of Unicode data, with "?" in the place of non-ASCII letters.
However, now I want to use a blank space (or maybe a dash) instead of a
question mark.
How do I do this?
Thank you,
:)
--
http://mail.py
On Oct 14, 12:07�pm, Ethan Furman wrote:
> Mensanator wrote:
> > On Oct 14, 2:19 am, Dennis Lee Bieber wrote:
>
> >>On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
> >> declaimed the following in
> >>gmane.comp.python.general:
>
> >>>You're not getting away that easy.
>
> >>>What's YOUR opin
On 14Oct2009 19:58, Peng Yu wrote:
| On Wed, Oct 14, 2009 at 7:57 PM, Joe Riopel wrote:
| > On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu wrote:
| >> I have the following python code snippet. I'm wondering what command I
| >> should use to terminate the program if the arguments are not right.
| >
| >
On Thu, Oct 15, 2009 at 10:58 AM, Peng Yu wrote:
> I actually wanted to ask what return code should be returned in this
> case when the arguments are not right. Thank you1
>
>
I think that depends on the design of the program. Is there a return value
that would make sense to be returned by defaul
On Oct 13, 1:22 pm, "Gabriel Genellina"
wrote:
> En Tue, 13 Oct 2009 16:55:09 -0300, Falcolas escribió:
>
>
>
>
>
> > On Oct 13, 12:47 pm,prasanna wrote:
> >> In using Python's XMLRPC, there is a statement that gets printed on
> >> stdout of the form:
> >> localhost - - [12/Oct/2
On Oct 14, 6:08�pm, Steven D'Aprano wrote:
> On Wed, 14 Oct 2009 09:34:28 -0700, Mensanator wrote:
> > On Oct 14, 2:19 am, Dennis Lee Bieber wrote:
> >> On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
> >> declaimed the following in
> >> gmane.comp.python.general:
>
> >> > You're not gettin
On Wed, Oct 14, 2009 at 7:57 PM, Joe Riopel wrote:
> On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu wrote:
>> I have the following python code snippet. I'm wondering what command I
>> should use to terminate the program if the arguments are not right.
>
> I usually use sys.exit.
I actually wanted to a
On Wed, Oct 14, 2009 at 8:53 PM, Peng Yu wrote:
> I have the following python code snippet. I'm wondering what command I
> should use to terminate the program if the arguments are not right.
I usually use sys.exit.
--
http://mail.python.org/mailman/listinfo/python-list
I have the following python code snippet. I'm wondering what command I
should use to terminate the program if the arguments are not right.
#!/usr/bin/env python
import sys
import os
if len(sys.argv) <= 1:
print "usage:", os.path.basename(sys.argv[0]), ''
return ## what command should be used
Steven D'Aprano writes:
> Why should Python make that guarantee about this hypothetical "loop
> forever" construct?
It doesn't make much sense for Python as normally practiced.
Termination proofs (aka proofs of progress) are used in formal
verification systems to make sure that the verification
On Wed, Oct 14, 2009 at 4:19 PM, Chris Rebert wrote:
> Although I have no idea how it is that `id({}) == id({})` as a prior
> posted showed; FWIW, I can't manage to reproduce that outcome.
>
With Python 2.5.1 on MacOS X, I can; it looks like there's an optimization
in there where its 'saving' di
Chris Rebert wrote:
> The built-ins aren't mutable, and the singletons are each immutable
> and/or unique; so in no case do objects that are both different and
> mutable have the same ID.
Correct, the fact allows you to write code like "type(egg) is str" to
check if an object *is* an instance of s
On Wed, Oct 14, 2009 at 1:37 PM, Laszlo Nagy wrote:
>
> Andre Engels schrieb:
>>
>>>
>>> None, True, False, NotImplemented are guaranteed to be singletons, all
>> builtin types and exceptions can be considered as singletons, too.
>>
>>
> I thought that different mutable objects always have differ
On Wed, Oct 14, 2009 at 1:37 PM, Laszlo Nagy wrote:
>> Andre Engels schrieb:
>>> What is going on is that a few objects that are often used, in
>>> particular the small (how small is small depends on the
>>> implementation) integers, are 'preloaded'. When one of these is then
>>> referred to, a ne
On Wed, 14 Oct 2009 20:17:40 +, Jorgen Grahn wrote:
>> But we have exceptions. And I know somebody, in other languages, thinks
>> it's a Best Practice to avoid using exceptions for flow control.
>
> A lot of C++ programmers think so, and Stroustrup himself says
> "exceptions are for exception
On Wed, 14 Oct 2009 18:30:06 +0100, Tim Rowe wrote:
> 2009/10/14 Dennis Lee Bieber :
>
>> If anything -- I'd suggest a proposal to add a plain loop
>> as a
>> keyword in Python, whose effect is equivalent to a "while True", but a
>> break must be used to exit said loop (wel
On Wed, 14 Oct 2009 09:34:28 -0700, Mensanator wrote:
> On Oct 14, 2:19�am, Dennis Lee Bieber wrote:
>> On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
>> declaimed the following in
>> gmane.comp.python.general:
>>
>> > You're not getting away that easy.
>>
>> > What's YOUR opinion of "whil
Andre Engels schrieb:
What is going on is that a few objects that are often used, in
particular the small (how small is small depends on the
implementation) integers, are 'preloaded'. When one of these is then
referred to, a new object is not created, but the pre-defined object
is used. 10 i
On Wed, 14 Oct 2009 02:26:17 +0100, Mensanator wrote:
On Oct 13, 5:38�pm, "Rhodri James"
wrote:
On Tue, 13 Oct 2009 22:59:04 +0100, Mensanator
wrote:
> And I'm not saying John nor the OP should stop
> using what works for them. But there are certainly
> valid reasons for "don't use while T
Janto Dreijer wrote:
On Oct 13, 7:37 pm, Ethan Furman wrote:
Janto Dreijer wrote:
I'm looking for code that will calculate the running median of a
sequence, efficiently. (I'm trying to subtract the running median from
a signal to correct for gradual drift).
My naive attempt (taking the me
2009/10/12 RDrewD :
> I was a bit surprised that nobody in this discussion so far bantered
> around the phrase "loop invariant", but then I looked in
> http://en.wikipedia.org/wiki/Loop_invariant and found it was draped in
> so much formalism that it's sure to put off all but the most dedicated
> o
kj wrote:
I'm coaching a group of biologists on basic Python scripting. One
of my charges mentioned that he had come across the advice never
to use loops beginning with "while True". Of course, that's one
way to start an infinite loop, but this seems hardly a sufficient
reason to avoid the con
On Oct 14, 9:48 pm, Kazimir Majorinc wrote:
> Do you think
> it would be better if I asked that? That result would
> be significantly different?
>
Not really. The eval, exec, and compile builtins are more or less
related and serve similar purposes, but don't seem to be highly used
in Python. Ther
On Wed, Oct 14, 2009 at 10:30 AM, Zero Piraeus wrote:
> '(?:etc)' instead of '(etc)' are non-grouping parentheses (since you
> apparently don't care about that bit).
Ah yes, thanks.
> '[^\]]' instead of '[\w\s]' matches "everything except a closing bracket".
I originally had just '[^\]', and I
On Oct 14, 4:53 pm, Peter Otten <__pete...@web.de> wrote:
> Some numbers:
>
> 10.197 seconds for running_median_scipy_medfilt
> 25.043 seconds for running_median_python
> 13.040 seconds for running_median_python_msort
> 14.280 seconds for running_median_python_scipy_median
> 4.024 seconds for runni
On 14.10.2009 17:55, TerryP wrote:
And what about exec?
(note: exec in python is more in spirit of eval then C-style exec
functions)
I thought about that, but decided not to ask about it
in poll, because I wanted to compare opinions on eval
specifically, not on all similar features. Do you t
I've made enough progress to get my setup working! I attempted to apply the
patch and recompile the packages that complained but got in too deep while
compiling matplotlib on windows (I don't have admin privileges and can't
install the prereqs) so I dug deeper.
I found this: http://blog.kalmbachne
On Oct 14, 7:15 am, Antoine Pitrou wrote:
> inaf gmail.com> writes:
>
>
>
> > Good point. I failed to compare the CPU power on these machines.. 32
> > bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I
> > guess that explains :) Thank you for the tip..
>
> You have to compare no
Hi everyone,
We're looking for an expert in Python, Django, Git and Unix. We have
multiple projects needed paid on hourly basis.
Do you have a strong confidence in all of these?
If so, please provide a resume and a little bit about yourself in
regards to these.
Thank you,
Chris
--
http://mail.
Raymond Hettinger writes:
> IIRC, the C++ admonition against using exceptions for flow control
> was rooted in performance concerns specific to that language and
> its compilers. It was not stylistic advice and did not deny that
> flow control exceptions could provide elegant solutions to some
>
On Wed, 2009-10-14, Igor Mikushkin wrote:
> Hello all!
>
> Could anyone please say me what is the right way to handle broken
> pipes in Python?
> I can wrap all my print statements with try/except blocks but it looks
> like overkill for me.
>
> I'm using my Python script this way: my_script | less
> And I know somebody, in other languages, thinks
> it's a Best Practice to avoid using exceptions for flow control.
Ah, now we have two code prions in just one thread.
I hope no newbie or supervisor reads this thread and latches
on to those two counter-productive ideas.
ISTM, both ideas are dang
On Wed, 2009-10-14, Marco Mariani wrote:
> Dennis Lee Bieber wrote:
>
>> One thing to note is that "break" ONLY exits the innermost loop --
>> Ada adds the confusion that one could define a label on the loops, and
>> have the innermost use
>> exit outer_label [when condition]
>>
>>
>>
Hello all!
Could anyone please say me what is the right way to handle broken
pipes in Python?
I can wrap all my print statements with try/except blocks but it looks
like overkill for me.
I'm using my Python script this way: my_script | less
The script produces a lot of data.
So usually when I fin
Hypo Nt:
Been a while, now I'm back, and the first helpless question is...
When I google (including codesearch) for assertMatch, I get a mishmash of
opinions. Am I missing the One True assertMatch(), or isn't there one and I
gotta write it? or copy and use one of the pretenders?
Distractingl
On Mon, 2009-10-12, Grant Edwards wrote:
> On 2009-10-12, Gabriel Genellina wrote:
>
>>> my_prissy_little_indicator_variable = true
>>> while (my_prissy_little_indicator_variable){
>>>
>>> }
>>> isn't satisfying because it doesn't guard the with any
>>> assurance that the loop invariant will
On Mon, 2009-10-12, RDrewD wrote:
...
> I was a bit surprised that nobody in this discussion so far bantered
> around the phrase "loop invariant", but then I looked in
> http://en.wikipedia.org/wiki/Loop_invariant and found it was draped in
> so much formalism that it's sure to put off all but the
I use python in almost the same environment. I use it on Joyent and on the
Rackspace cloud. Joyent is faster for a few reasons (cpu bursting and faster
disks) but these aren't real benchmarks until they are on the same machines.
James
On Wed, Oct 14, 2009 at 9:59 AM, Jorgen Grahn
> wrote:
> On
This posting just made my day!
On Wed, Oct 14, 2009 at 2:59 PM, Dotan Cohen wrote:
> > ;-)
> >
>
> Be careful, that looks dangerously close to PHP:
> function();
>
>
> --
> Dotan Cohen
>
> http://what-is-what.com
> http://gibberish.co.il
> --
> http://mail.python.org/mailman/listinfo/python-list
> ;-)
>
Be careful, that looks dangerously close to PHP:
function();
--
Dotan Cohen
http://what-is-what.com
http://gibberish.co.il
--
http://mail.python.org/mailman/listinfo/python-list
-- Forwarded message --
From: Dave Angel
To: Threader Slash
Date: Wed, 14 Oct 2009 07:04:21 -0400
Subject: Re: win32com.client import problem
Threader Slash wrote:
> Hi Everybody,
>
> I have 2 imports:
>
> import pythoncom
> from win32com.client import Dispatch
>
> if I run it on
Mensanator wrote:
On Oct 14, 2:19�am, Dennis Lee Bieber wrote:
On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
declaimed the following in
gmane.comp.python.general:
You're not getting away that easy.
What's YOUR opinion of "whilr True"?
� � � � Uhm... that it isn't valid in any l
On Oct 4, 10:27 am, dpapathanasiou
wrote:
> I'm using python to access an email account via POP, then for each
> incoming message, save any attachments.
>
> This is the function which scans the message for attachments:
>
> def save_attachments (local_folder, msg_text):
> """Scan the email mess
On Oct 13, 10:18 pm, TerryP wrote:
> On Oct 14, 2:13 am, Peng Yu wrote:
>
> > Bash is easy to use on manipulating files and directories (like change
> > name or create links, etc) and on calling external programs. For
> > simple functions, bash along is enough. However, bash does not support
> >
On Oct 14, 3:42 am, Jean-Michel Pichavant
wrote:
> Peng Yu wrote:
> > Bash is easy to use
>
> +JOTW
>
> :)
>
> JM
why choose.. http://shython.sourceforge.net/
I don't think this is the most recent I would also try the package
index
--
http://mail.python.org/mailman/listinfo/python-list
2009/10/14 Dennis Lee Bieber :
> If anything -- I'd suggest a proposal to add a plain loop as a
> keyword in Python, whose effect is equivalent to a "while True", but a
> break must be used to exit said loop (well, we'll ignore raising an
> exception )
And with enough static analy
I never got a response back from this, but I'm noticing even more odd
behavior, see inline:
On Wed, Sep 30, 2009 at 4:38 PM, Max Lynch wrote:
> Hi.
> I have a RotatingFileHandler for my logging system. I have it set to
> rotate once the file becomes 5MB in size. Here is the conf line I have in
Ronn Ross wrote:
Does anyone know where I can download a copy of PyUSB 1.0? I can only
find 0.x versions on sourceforge. I'm following a tutorial that requires
1.0. Thanks
Googling "pyusb" gives me loads of hits and the newer versions appear to
be on about the 3rd link down...
Chris
--
Sim
Zac Burns wrote:
There are 10741 occurences of ): or :( in our source code and only 2
occurrences of :) or (:. Not what you would expect from a language
named after a comedian.
def ...(...):
...
class ...(...):
...
etc
;-)
Chris
--
Simplistix - Content Management, Batch Processing & Py
-- Forwarded message --
> From: "Gabriel Genellina"
> To: python-list@python.org
> Date: Wed, 14 Oct 2009 00:52:13 -0300
> Subject: Re: XML-RPC(using SimpleXMLRPCServer) slow on the first call
> En Mon, 12 Oct 2009 18:58:45 -0300, Mahi Haile
> escribió:
>
> Hello all,I have an xm
Dennis Lee Bieber wrote:
On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
declaimed the following in
gmane.comp.python.general:
You're not getting away that easy.
What's YOUR opinion of "whilr True"?
Uhm... that it isn't valid in any language having English influence
upon it's k
There are 10741 occurences of ): or :( in our source code and only 2
occurrences of :) or (:. Not what you would expect from a language
named after a comedian.
--
Zachary Burns
(407)590-4814
Aim - Zac256FL
Production Engineer (Digital Overlord)
Zindagi Games
--
http://mail.python.org/mailman/list
Does anyone know where I can download a copy of PyUSB 1.0? I can only find
0.x versions on sourceforge. I'm following a tutorial that requires 1.0.
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 14, 2:19�am, Dennis Lee Bieber wrote:
> On Tue, 13 Oct 2009 15:02:09 -0700 (PDT), Mensanator
> declaimed the following in
> gmane.comp.python.general:
>
> > You're not getting away that easy.
>
> > What's YOUR opinion of "whilr True"?
>
> � � � � Uhm... that it isn't valid in any language
When all is said and done, is not all looping *basically* equivalent
to something like this?
begin_loop:
unless TEST
goto end_loop
;; loop body here
if TEST
goto begin_loop
end_loop:
Which could likely be used to implement something like:
while TEST:
# loop body
On Sat, 2009-10-10, TerryP wrote:
> Does anyone know of any modules for dealing with the IRC protocol,
> that will work with Python 3.1? It doens't have to be super great,
> just less time consuming then playing with sockets directly (and obv.
> stable). The only module in my systems package manage
On Thu, 2009-10-08, oripel wrote:
> Testoob is the advanced Python test runner and testing framework that
> spices up any existing unittest test suite.
>
> Home: http://code.google.com/p/testoob
But this sentence on the home page
The documentation is sadly outdated, but may be
a starting
2009/10/14 Marco Mariani :
> Dennis Lee Bieber wrote:
>
>> One thing to note is that "break" ONLY exits the innermost loop --
>> Ada adds the confusion that one could define a label on the loops, and
>> have the innermost use
>> exit outer_label [when condition]
>>
>>
>> THAT I
:
2009/10/14 Timur Tabi :
> Never mind ... I figured it out. The middle block should have been [\w
> \s/]*
This is fragile - you'll have to keep adding extra characters to match
if the input turns out to contain them.
-[]z.
--
http://mail.python.org/mailman/listinfo/python-list
:
2009/10/14 Timur Tabi :
> I'm having trouble creating a regex pattern that matches a string that
> has an optional substring in it. What I'm looking for is a pattern
> that matches both of these strings:
>
> Subject: [PATCH 08/18] This is the patch name
> Subject: This is the patch name
>
> Wha
En Wed, 14 Oct 2009 09:55:15 -0300, Ronn Ross
escribió:
I'm new to Python and would like to capture mouse movements. I envision
writing a script that will just write out the mouse movements in the
term.
Is this possible? Can someone point me in the right direction?
Capture mouse movement
On Oct 14, 9:51 am, Timur Tabi wrote:
> I'm having trouble creating a regex pattern that matches a string that
> has an optional substring in it. What I'm looking for is a pattern
> that matches both of these strings:
>
> Subject: [PATCH 08/18] This is the patch name
> Subject: This is the patch
On Oct 14, 2:39 pm, Benedict Verheyen
wrote:
> Hi,
>
> I'm trying to come up with a decent interface for my email class.
> Basically, i have one email function but it has many (too many?) variables:
>
> send_mail(self, send_from, send_to, send_cc, subject, text,
> separate_emails = False, fil
Janto Dreijer wrote:
> On Oct 13, 6:12 pm, Peter Otten <__pete...@web.de> wrote:
>> Janto Dreijer wrote:
>> > I'm looking for code that will calculate the running median of a
>> > sequence, efficiently. (I'm trying to subtract the running median from
>> > a signal to correct for gradual drift).
>>
I'm having trouble creating a regex pattern that matches a string that
has an optional substring in it. What I'm looking for is a pattern
that matches both of these strings:
Subject: [PATCH 08/18] This is the patch name
Subject: This is the patch name
What I want is to extract the "This is the p
I'm running Python 2.6 on windows. I'm install Pyusb and I'm having trouble
including the library in my script. Can someone point me in the right
direction to get this working or know of a good tutorial to help me out.
Best regards
--
http://mail.python.org/mailman/listinfo/python-list
In article ,
J wrote:
>On Tue, Oct 13, 2009 at 20:05, Aahz wrote:
Mensanator:
>
>There's no point in trying to reason with a Muslim.
That's not funny, and if you were being serious, that was incredibly
rude.
>>>
>>>Not as much as posting in comp.lang.python.
>>
>> What
En Wed, 14 Oct 2009 05:19:06 -0300, Ulrich Eckhardt
escribió:
Gabriel Genellina wrote:
#ifdef _DEBUG
#undef _DEBUG
#include
#define _DEBUG
#else
#include
#endif
[...to keep Python from linking against non-existant debug libraries.]
No, don't do that. Just compile your application in relea
On Wed, Oct 14, 2009 at 8:39 AM, Benedict Verheyen
wrote:
> This kind of problems seems to happen sometimes: i need to fix something
> quickly,
> build a script for it, and then i realise that the code i've written is not
> the best in
> terms of reusability and has some "not so great" functions
vicky wrote:
> On Oct 14, 5:52 pm, "Diez B. Roggisch" wrote:
>> vicky wrote:
>> > Hello All,
>>
>> > I am a new Python user and don't know much about it.
>>
>> > I just want to know that, due to any reason if a script exits, is
>> > their some way to release all the resources acquired by the scri
On Wed, 2009-10-14, Antoine Pitrou wrote:
> inaf gmail.com> writes:
>>
>> Good point. I failed to compare the CPU power on these machines.. 32
>> bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I
>> guess that explains :) Thank you for the tip..
>
> You have to compare not only
On Oct 14, 5:52 pm, "Diez B. Roggisch" wrote:
> vicky wrote:
> > Hello All,
>
> > I am a new Python user and don't know much about it.
>
> > I just want to know that, due to any reason if a script exits, is
> > their some way to release all the resources acquired by the script
> > during execution
Marco Mariani wrote:
> Benedict Verheyen wrote:
>
>> Any ideas are welcome.
>
> easy_install turbomail
>
> :)
>
Looks good but i'm still interested in how one would
make a clean class interface for this type of problem.
Having said that, turbomail looks quite good :)
Thanks
--
http://mail.
On Thu, 2009-10-08, Diez B. Roggisch wrote:
> cEd wrote:
>
>> Hello,
>>
>> I'm wondering how to compile python to get good performance.
>> Because when I compare this ugly code which find prime number:
...
>> between :
>> - the python distributed with my ubuntu
>> #time python prime_number.py
vicky schrieb:
> Actually In my system I want to execute some piece of code at the time
> of script exit (expected or unexpected) to ensure the release of all
> the resources. I don't know how to do that :(
You maybe want to use a context manager. Look for 'with statement' and
'contextlib' in your
On Wednesday 14 October 2009 14:23:11 vicky wrote:
> I just want to know that, due to any reason if a script exits, is
> their some way to release all the resources acquired by the script
> during execution ?
Python cleans-up after itself so I would not worry about that until you are an
expert and
I'm new to Python and would like to capture mouse movements. I envision
writing a script that will just write out the mouse movements in the term.
Is this possible? Can someone point me in the right direction?
--
http://mail.python.org/mailman/listinfo/python-list
> bbarb...@inescporto.pt (b) wrote:
>b> Hi again!
>b> After testing the whole day, I have got my goals from the last email, but
>b> as always, another issues came up! and now that Ive been able to save a
>b> list of list (or multi-arrays) as below :
>b> ['100.mp3\n' '10008.mp3\n' '10005.mp3
vicky wrote:
> Hello All,
>
> I am a new Python user and don't know much about it.
>
> I just want to know that, due to any reason if a script exits, is
> their some way to release all the resources acquired by the script
> during execution ?
>
> Actually In my system I want to execute some pie
Benedict Verheyen wrote:
Any ideas are welcome.
easy_install turbomail
:)
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to come up with a decent interface for my email class.
Basically, i have one email function but it has many (too many?) variables:
send_mail(self, send_from, send_to, send_cc, subject, text, separate_emails
= False, files=[], inline_files=[], server="localhost",
charset="iso-
Hello All,
I am a new Python user and don't know much about it.
I just want to know that, due to any reason if a script exits, is
their some way to release all the resources acquired by the script
during execution ?
Actually In my system I want to execute some piece of code at the time
of script
Andre Engels schrieb:
> What is going on is that a few objects that are often used, in
> particular the small (how small is small depends on the
> implementation) integers, are 'preloaded'. When one of these is then
> referred to, a new object is not created, but the pre-defined object
> is used. 1
But if I chose as a value another number (a big one, let say 1e10) I
get what I will expect also in the case of the chose of the integer 10
showed above:
a=1e10
d=1e10
d is a
False
id(a)
11388984
id(d)
11388920
CPython has the option to cache frequently used items, and does
so for a small
What is going on is that a few objects that are often used, in
particular the small (how small is small depends on the
implementation) integers, are 'preloaded'. When one of these is then
referred to, a new object is not created, but the pre-defined object
is used. 10 is apparently a preloaded cons
raffaele ponzini schrieb:
> Dear all,
> I have a question concerning the output of the id() function.
> In particular since is should:
> ""
> Return the identity of an object. This is guaranteed to be unique among
> simultaneously existing objects. (Hint: it's the object's memory address.)
> ""
>
inaf gmail.com> writes:
>
> Good point. I failed to compare the CPU power on these machines.. 32
> bit linux box I have is 2666 Mhz vs the Solaris zone is 1415 Mhz.. I
> guess that explains :) Thank you for the tip..
You have to compare not only CPU frequencies but the CPU models.
Recently Sun h
Threader Slash wrote:
Hi Everybody,
I have 2 imports:
import pythoncom
from win32com.client import Dispatch
if I run it on my Python 2.6 Console, it works nicely. However, when I go to
Eclipse IDE, open a project, open a main.py file, and try run, it gives the
error:
import pythoncom
ImportEr
Peng Yu wrote:
http://docs.python.org/reference/simple_stmts.html#grammar-token-yield_stmt
The explanation of yield is not clear to me, as I don't know what a
generator is. I see the following example using 'yield'. Could
somebody explain how 'yield' works in this example? Thank you!
def brange
Dear all,
I have a question concerning the output of the id() function.
In particular since is should:
""
Return the identity of an object. This is guaranteed to be unique among
simultaneously existing objects. (Hint: it's the object's memory address.)
""
i expect that for two differnt objects it
1 - 100 of 120 matches
Mail list logo