Terry Jones wrote:
> I think you should revisit this decision. Something like Fredrik's code is
> the way to go.
He used my suggestion, just for a few more files than he had in his
original post.
Seriously, for a limited number of files, the dictionary approach is
mostly pointless; you end up
I'm just getting started with Python, and I want to do a bit of color
tracking using VideoCapture. However, I've never worked with video or
images, so I'm a little at a loss. How would I use VideoCapture to
track a specified color, and its coordinates?
--
http://mail.python.org/mailman/listinfo/
2008/1/9, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Date: Tue, 8 Jan 2008 17:11:18 -0800 (PST)
> Subject: ctypes
1. please make your title more specific
> >>> from ctypes import *
> >>> cdecl =
> cdll.LoadLibrary("c:\projects\python\geinterface.dll")
2. are you sure '\' is ok?
cdll.LoadLibrary(r"c:
On Jan 9, 2:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Greetings Pythoneers --
>
> Some of us over on edu-sig, one of the community actives,
> have been brainstorming around this Rich Data Structures
> idea, by which we mean Python data structures already
> populated with non-trivial d
-On [20080108 19:36], George Maggessy ([EMAIL PROTECTED]) wrote:
>Yeap. It is. I'm looking for something like that app. Smth that I
>could base my future developments on.
If you want to go the Ruby on Rails-like road then you have Django, Pylons,
TurboGears, Zope, to name four of the
It looks a bit like an add for Coverity, but under all that, they seem
to have picked Python as one of the OS projects to test with their
improved testing software because our developers were so good at
working on any "bugs" reported by their earlier tool.
Good job guys.
http://scan.coverity.com
On Jan 8, 2008 7:32 PM, George Maggessy <[EMAIL PROTECTED]> wrote:
> Yeap. It is. I'm looking for something like that app. Smth that I
> could base my future developments on.
>
> On Jan 8, 1:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> > On Mon, 07 Jan 2008 22:21:53 -0800, George M
On Jan 9, 2008 5:29 AM, Beema shafreen <[EMAIL PROTECTED]> wrote:
> Hi I am beginner in python. and I am not able to understand the Pickle
> concept in python can. some body explain me about the use of this module,
> few examples. which will help me a lot.
>
> regards
> shafreen
>
> --
> http://m
On Jan 8, 11:33 pm, Tommy Nordgren <[EMAIL PROTECTED]> wrote:
> > I still have a "/Library/Python/2.3" and a "/Library/Python/2.5".
>
> > Thanks.
>
> > Stephen
> Leopard INCLUDES Python 2.5, there is no need to install it.
Thanks -- that made the decision easy. I didn't need all those
MacP
On Jan 8, 2008 9:34 PM, Terry Jones <[EMAIL PROTECTED]> wrote:
>
> I think you should revisit this decision. Something like Fredrik's code
> is
> the way to go. It has multiple advantages:
>
> - It's much shorter.
> - It's arguably easier to add/remove to/from.
> - It has less risk of error (
thanx guys for the replies
need a little clarification
srcarray=array([1.2,2.3,3.4,4.5,5.6])
destarray=array(srcarray,copy=False)
then
srcarray[2]=99.9
will cause the change to be reflected in both src and dest.
doesn't that mean data is shared between both arrays?
but if i do
destarray=array(sr
On 9 jan 2008, at 04.43, Stephen_B wrote:
> I've installed the latest 2.5 python today from python.org, and I
> think it ended up in "/Applications/MacPython 2.5".
>
> I also have a "/Applications/MacPython 2.4" and a "/Applications/
> MacPython-2.4". Can I delete these, or did one of them come w
On Dec 28 2007, 7:07 pm, [EMAIL PROTECTED] wrote:
> form = cgi.FieldStorage()
> if not form.has_key("pass"):
>print "Enter password"
>
> filename = "test.gpg"
> pass = form.getvalue("pass").strip()
> os.system("gpg --version > gpg.out")
> os.system("echo %s | gpg --batch --password-fd 0 --decr
yes the link is broken and hence i sent it in
since it is a conf file for svn pre-commit hook
so pyflakes is run of your tree and it emits an error if python files have
any error preventing bad commits poisoning svn tree so dev can fix the bug
and recommit
On Jan 8, 2008 8:08 PM, Kent Johnson <[EM
Hi I am beginner in python. and I am not able to understand the Pickle
concept in python can. some body explain me about the use of this module,
few examples. which will help me a lot.
regards
shafreen
--
http://mail.python.org/mailman/listinfo/python-list
I've installed the latest 2.5 python today from python.org, and I
think it ended up in "/Applications/MacPython 2.5".
I also have a "/Applications/MacPython 2.4" and a "/Applications/
MacPython-2.4". Can I delete these, or did one of them come with
Leopard?
I still have a "/Library/Python/2.3" an
http://tarekziade.wordpress.com/2006/11/01/protecting-a-python-svn-code-base-with-the-pre-commit-hook/
Is it possible to check code in python before committing to svn
using pyflakes, pythontidy
Pyflakes and Subversion
Pyflakes is a
nice little utility that checks your Python code for err
Robert Hicks <[EMAIL PROTECTED]> writes:
> [EMAIL PROTECTED] wrote:
> > my friend uses vim
> > and i use xemacs
> > so our shared python code is a mix of tabs and spaces and it is hard
> > for him to edit it in vim
> > any idea on how to make it clean
> > convert it all to 4 spaces?
> > Thanks
>
On Jan 7, 8:09 am, [EMAIL PROTECTED] wrote:
> I'm a Java guy who's been doing Python for a month now and I'm
> convinced that
>
> 1) a multi-paradigm language is inherently better than a mono-paradigm
> language
>
> 2) Python writes like a talented figure skater skates.
>
> Would you Python old-tim
[EMAIL PROTECTED] wrote:
> my friend uses vim
> and i use xemacs
> so our shared python code is a mix of tabs and spaces and it is hard for
> him to edit it in vim
>
> any idea on how to make it clean
> convert it all to 4 spaces?
>
> Thanks
>
:set ts=4
:retab!
:h retab
--
http://mail.pyt
> I decided that I was just trying to be "too smooth by 1/2" so I fell back to
>
> messages = open(os.path.join(host_path,'messages.txt'), 'wb')
> deliveries = open(os.path.join(host_path,'deliveries.txt'), 'wb')
> actions = open(os.path.join(host_path,'actions.txt'), 'wb')
> parts = open(os.path.
Hi BJ
> > Fredrik Lundh <[EMAIL PROTECTED]> writes:
> > Or in a dict:
> >
> > open_files = {}
> > for fn in ['messages', 'recipients', 'viruses']:
> >open_files[fn] = open(getfilename(fn), 'w')
>
> I decided that I was just trying to be "too smooth by 1/2" so I fell back
> to ...
>
> message
Greetings Pythoneers --
Some of us over on edu-sig, one of the community actives,
have been brainstorming around this Rich Data Structures
idea, by which we mean Python data structures already
populated with non-trivial data about various topics such
as: periodic table (proton, neutron counts);
On Jan 8, 2008, at 7:49 PM, Bill Campbell wrote:
> On Tue, Jan 08, 2008, [EMAIL PROTECTED] wrote:
>>
>> my friend uses vim
Small editors for small minds;)
>>
>> and i use xemacs
>>
>> so our shared python code is a mix of tabs and spaces and it is
>> hard
>> for him to edit it in vim
>
On Jan 8, 2008 7:22 AM, Hrvoje Niksic <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh <[EMAIL PROTECTED]> writes:
>
> > BJ Swope wrote:
> >
> >> the code looks ok. please define "not working".
> >>
> >> Yep, defining "not working" is always helpful! :)
> >>
> >> I want to have all 3 files open at
"Daniel Fetchinson" <[EMAIL PROTECTED]> writes:
> I'm guessing this feature is needed so often in so many projects that
> it has been implemented already by several people. Does anyone know of
> such a stand alone module?
The 'python-dateutil' library allows easy *programmatic* manipulation
of re
hello, i would like to advertise a few sites their all pretty healthy
t make improvements to your life! one of them is
www.bigleagueplayersclub.com/3clicks/published/67153/196170 thanks
check it ut thers more verious things to see
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> my friend uses vim
> and i use xemacs
> so our shared python code is a mix of tabs and spaces and it is hard for
> him to edit it in vim
>
> any idea on how to make it clean
> convert it all to 4 spaces?
>
> Thanks
>
Take a look at reindent.py. This script lives in
Many times a more user friendly date format is convenient than the
pure date and time.
For example for a date that is yesterday I would like to see
"yesterday" instead of the date itself. And for a date that was 2 days
ago I would like to see "2 days ago" but for something that was 4 days
ago I wou
Hi,
On Jan 8, 2008 7:24 AM, Tobiah <[EMAIL PROTECTED]> wrote:
> I have a class that I call Borg that starts like this:
>
> class Borg(dict):
>
> static_state = {}
> def __init__(self):
> self.__dict__ = self.static_state
>
>
> so that I can access the same data from
I am trying to call a function in a third party dll that spawns
an exe and I am using ctypes. Python does not complain at all
but the other process does not get spawned. It appears that I am
gaining access to the functions but with no results. Any ideas?
Thanks in advance.
>>> from ctypes impo
On Tue, Jan 08, 2008, [EMAIL PROTECTED] wrote:
>
> my friend uses vim
>
> and i use xemacs
>
> so our shared python code is a mix of tabs and spaces and it is hard
> for him to edit it in vim
>
> any idea on how to make it clean
>
> convert it all to 4 spaces?
Do that, and in his ~/.vi
On Jan 8, 1:20 am, Robert Latest <[EMAIL PROTECTED]> wrote:
> Hello,
>
> look at this function:
>
> --
> def test():
> child = os.popen('./slow')
> for line in child:
> print line
> -
>
> The program "slow" just writes the numbers 0 through 9 on stdout, one l
I'm working on a simple GTK+ wrapper around the flash Pandora Radio
player (Pandora.com).
It's very basic right now but I've got it almost working.
I'm using gtkmozembed to fetch and use the player and dbus to detect
multimedia keys.
The only problem I'm having is that the mozembed widget doesn't
my friend uses vim
and i use xemacs
so our shared python code is a mix of tabs and spaces and it is hard for him
to edit it in vim
any idea on how to make it clean
convert it all to 4 spaces?
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
I have a class that I call Borg that starts like this:
class Borg(dict):
static_state = {}
def __init__(self):
self.__dict__ = self.static_state
so that I can access the same data from anywhere within
any module or function just by instantiating one.
This is use
dgoldsmith_89 wrote:
> Can anyone point me to a downloadable open source English dictionary
> suitable for programmatic use with python: I'm programming a puzzle
> generator, and I need to be able to generate more or less complete
> lists of English words, alphabetized. Thanks! DG
If all you wan
Spring Python (http://springpython.python-hosting.com) version 0.3.2
was released yesterday.
It contains a patch to an error discovered 12/19/2007 in
XmlApplicationContext, that broke when PROTOTYPE scoping was used.
Test cases have been updated to detect this bug, and in turn the
correction was m
On Jan 8, 5:31 pm, Tim Roberts <[EMAIL PROTECTED]> wrote:
> Gowri <[EMAIL PROTECTED]> wrote:
>
> >I am new to Python and am trying to setup Apache to serve Python using
> >mod_python. I'm using a Windows XP box. here is a list of steps i
> >followed for the installation:
>
> >1. Installed Apache 2.
On Jan 8, 7:34 am, "Giampaolo Rodola'" <[EMAIL PROTECTED]> wrote:
> I was wondering...
> To flush a list it is better doing "del mylist[:]" or "mylist = []"?
> Is there a preferred way? If yes, why?
To empty an existing list without replacing it, the choices
are "del mylist[:]" and "mylist[:] = [
A new release of matplotlib is posted to the sourceforge download
site.
You can read the release notes with links at
http://matplotlib.sourceforge.net/whats_new.html
Download: Downloads:
http://sourceforge.net/project/showfiles.php?group_id=80706
Homepage: http://matplotlib.sourceforge.net
On Jan 8, 3:31 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> > Basically, I have created a program using tkinter without using any class
> > structure, simply creating widgets and functions (and finding ways around
> > passing variables from function to function, using global variables etc).
On Jan 8, 2:24 pm, Torsten Bronger <[EMAIL PROTECTED]>
wrote:
> Hallöchen!
>
> [EMAIL PROTECTED] writes:
> > I am all about using the right tool for the right purposes, [...]
>
> Which purpose?
>
> > I dug up one article from Google that talked about comparison but
> > that was about it.
>
> >http:
Chris Leary wrote:
> As I understand it, the appeal of properties (and descriptors in
> general) in new-style classes is that they provide a way to
> "intercept" direct attribute accesses. This lets us write more clear
> and concise code that accesses members directly without fear of future
> API c
On Jan 8, 5:27 am, Gnarlodious <[EMAIL PROTECTED]> wrote:
> I am trying to install mod_python on OSX 10.5, Intel version.
>
> sudo apachectl configtest tells me this:
>
> httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf:
> Cannot load /usr/libexec/apache2/mod_python.so into server
I am trying to install mod_python on OSX 10.5, Intel version.
sudo apachectl configtest tells me this:
httpd: Syntax error on line 114 of /private/etc/apache2/httpd.conf:
Cannot load /usr/libexec/apache2/mod_python.so into server:
dlopen(/usr/libexec/apache2/mod_python.so, 10): no suitable imag
> Basically, I have created a program using tkinter without using any class
> structure, simply creating widgets and functions (and finding ways around
> passing variables from function to function, using global variables etc).
> The program has become rather large ( lines?) I am trying to now put
<[EMAIL PROTECTED]> wrote:
> A quick look (thorough analysis still required) shows that OLPC and
> PyPy are, indeed, extensive standards.
> one-laptop-per-child.html
> (olpc),74.3,,http://wiki.laptop.org/go/Python_Style_Guide
I think that's mostly PEP 8, with some notes added.
-M-
--
http://m
Paul McGuire <[EMAIL PROTECTED]> wrote:
> While not required by any means, you will also find it handy to follow
> *every* entry in the list with a comma, even the last one in the list
> (this is legal Python). That is, in your example:
>
> foo =3D [
> 'too long',
> 'too long too',
>
On 8 jan, 03:19, Horacius ReX <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have to search for a string on a big file. Once this string is
> found, I would need to get the number of the line in which the string
> is located on the file. Do you know how if this is possible to do in
> python ?
>
> Thanks
h
hello,
is there any Javascript (not just JSON) parser for Python? I saw
http://wwwsearch.sourceforge.net/python-spidermonkey/ which seems to be
from 2003 and unmaintained and seems to be quite complicated to get to
work anyway :(
Using Rhino from Jython is not really an option as I'd like to wo
On Jan 8, 1:57 pm, "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote:
> Torsten Bronger wrote:
> > Hallöchen!
>
> > [EMAIL PROTECTED] writes:
>
> >> I am all about using the right tool for the right purposes, [...]
>
> > Which purpose?
>
> >> I dug up one article from Google that talked about compariso
I am successfully using ZSI to create a web service for our internal use. A
request containing a username and password will respond with user
information.
Sample Request:
Jough
joughspassword
Response for Sample Request:
http://www.w3.org/2001/XMLSch
We have such nice names so the word Python will be something people like and
not something people fear (A massive 12 foot snake) and Pythonic is a
behavior pattern we should all follow! In layman's terms it means we should
all act like snakes a little more!
On Jan 8, 2008 5:13 PM, Carl Banks <[EMA
Torsten Bronger wrote:
> Hallöchen!
>
> [EMAIL PROTECTED] writes:
>
>> I am all about using the right tool for the right purposes, [...]
>
> Which purpose?
>
>> I dug up one article from Google that talked about comparison but
>> that was about it.
>>
>> http://www.simple-talk.com/sql/database-
Look at the old source code of the Bittorrent client for ideas!
On Jan 8, 2008 8:51 PM, Dom Rout <[EMAIL PROTECTED]> wrote:
> Hello.
> Well, this is my first post on any USENET group anywhere, so I hope I
> get it right. Basically, I just want to get some opinions on a plan of
> mine for a new pr
Hello.
Well, this is my first post on any USENET group anywhere, so I hope I
get it right. Basically, I just want to get some opinions on a plan of
mine for a new project.
I want to produce a small, peer to peer, file sharing network for the
use of myself and some of my friends. The purpose of thi
Hello all
Basically, I have created a program using tkinter without using any class
structure, simply creating widgets and functions (and finding ways around
passing variables from function to function, using global variables etc).
The program has become rather large ( lines?) I am trying to now p
Hallöchen!
[EMAIL PROTECTED] writes:
> I am all about using the right tool for the right purposes, [...]
Which purpose?
> I dug up one article from Google that talked about comparison but
> that was about it.
>
> http://www.simple-talk.com/sql/database-administration/comparing-python-and-powers
On 8 Jan, 11:04, Teja <[EMAIL PROTECTED]> wrote:
> On Jan 8, 3:33 pm, Teja <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi All,
>
> > I have a Python COM server. I need to deploy it on various sytems.
> > When I run the COM server from
> > python its showing an output " Registered : sample.lib"
>
> > If I
On 8 Gen, 16:45, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Giampaolo Rodola' wrote:
> > To flush a list it is better doing "del mylist[:]" or "mylist = []"?
> > Is there a preferred way? If yes, why?
>
> The latter creates a new list object, the former modifies an existing
> list in place.
>
> The
I am all about using the right tool for the right purposes, which is
why I have started reading the GettingStarted guide to PowerShell. I
am curious if any other pythoneers have ventured into the world of
PowerShell. Mostly, I am interested in grabbing perspectives on the
differences noticed fro
Yeap. It is. I'm looking for something like that app. Smth that I
could base my future developments on.
On Jan 8, 1:47 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Mon, 07 Jan 2008 22:21:53 -0800, George Maggessy wrote:
> > I'm an experience Java developer trying to learn Python. I
On Jan 7, 3:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Jan 7, 5:10 pm, dgoldsmith_89 <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jan 7, 2:54 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > > On Jan 7, 4:37 pm, dgoldsmith_89 <[EMAIL PROTECTED]> wrote:
>
> > > > Can anyone point
I am new to python and everything related to it, and it so happens
that I just went through the numpy tutorial last night, it is in
http://www.scipy.org/Tentative_NumPy_Tutorial
and the answer to your question is in section 3.7
Basically, if you want to make a (deep) copy of it:
destarray = src
On Jan 8, 2008 12:35 PM, Martin Vilcans <[EMAIL PROTECTED]> wrote:
> On 1/7/08, Guilherme Polo <[EMAIL PROTECTED]> wrote:
> > 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > > Anything written somewhere that's thorough? Any code body that should
> > > serve as a reference?
> >
> > PEP 8
> > ht
Martin Vilcans wrote:
> On 1/7/08, Guilherme Polo <[EMAIL PROTECTED]> wrote:
>> 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>>> Anything written somewhere that's thorough? Any code body that should
>>> serve as a reference?
>> PEP 8
>> http://www.python.org/dev/peps/pep-0008/
>
> The problem
On 1/7/08, Guilherme Polo <[EMAIL PROTECTED]> wrote:
> 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > Anything written somewhere that's thorough? Any code body that should
> > serve as a reference?
>
> PEP 8
> http://www.python.org/dev/peps/pep-0008/
The problem with PEP 8 is that even code
On Jan 8, 2008 4:32 PM, jimgardener <[EMAIL PROTECTED]> wrote:
> hi,
> (i posted this to numpy discussion grp couple of days back ..but it
> fails to appear..)since it is needed for my work i would appreciate if
> anyone can help me with this question
>
>
> i have two ndarrays of 1000 elements each
That's a great list, grflanagan! Thanks.
I looked at each and copied to my disk either as a .txt (cut/paste
from the browser) for a page or less or as .html (view source, chop
off head and non-guideline stuff, save). This is the list plus PEP 8
minus the software. (No disrespect for the software,
On Jan 7, 6:29 pm, MRAB <[EMAIL PROTECTED]> wrote:
> On Jan 7, 5:40 pm, Martin Marcher <[EMAIL PROTECTED]> wrote:> [EMAIL
> PROTECTED] wrote:
> > > The best thing about Python is ___.
>
> > it's pythonicness.
>
> I think it sounds better as "its pythonicity".
Mixing Greek and Latin suffixes u
> To flush a list it is better doing "del mylist[:]" or "mylist = []"?
> Is there a preferred way? If yes, why?
It depends on what you want. The former modifies the list
in-place while the latter just reassigns the name "mylist" to
point to a new list within the local scope as demonstrated by thi
On Jan 6, 11:36 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Sun, 06 Jan 2008 00:31:13 -0800, Soviut wrote:
> > I figured that an append would be treated as a set since I'm adding to
> > the list. But what you say makes sense, although I can't say I'm happy
> > with the behaviour. Is there any
Giampaolo Rodola' wrote:
> To flush a list it is better doing "del mylist[:]" or "mylist = []"?
> Is there a preferred way? If yes, why?
The latter creates a new list object, the former modifies an existing
list in place.
The latter is shorter, reads better, and is probably a bit faster in
mos
I was wondering...
To flush a list it is better doing "del mylist[:]" or "mylist = []"?
Is there a preferred way? If yes, why?
--
http://mail.python.org/mailman/listinfo/python-list
> Option 1 - Waterfall
I recommend to google "waterfall". First hit after those beatifull
pictures will be:
http://en.wikipedia.org/wiki/Waterfall_model
Within the first paragraph there is:
"""Ironically, Royce was actually presenting this model as an
example of a flawed, non-working model.(
hi,
(i posted this to numpy discussion grp couple of days back ..but it
fails to appear..)since it is needed for my work i would appreciate if
anyone can help me with this question
i have two ndarrays of 1000 elements each and want to copy all
elements from srcarray to destarray
srcarray=numpy.a
Hi :)
First of all, I must apologize for my poor english :)
I'm starting with python and pygame and for testing (and learning)
purposes I wrote an small "Map Editor" for a small game project I'm
going to start next month.
The tilemap editor is working fine, but reading Guido's Van Rossum
PY
Fredrik Lundh <[EMAIL PROTECTED]> writes:
> From what I can tell, Java's GC automatically closes file streams,
> so Jython will behave pretty much like CPython in most cases.
The finalizer does close the reclaimed streams, but since it is
triggered by GC, you have to wait for GC to occur for the
Hi, thanks for the help. Then I got running the following code;
#!/usr/bin/env python
import os, sys, re, string, array, linecache, math
nlach = 12532
lach_list = sys.argv[1]
lach_list_file = open(lach_list,"r")
lach_mol2 = sys.argv[2] # name of the lachand mol2 file
lach_mol2_file = open(lach_
On 8 Jan, 09:46, Antoine Pitrou <[EMAIL PROTECTED]> wrote:
> One question : why does the exception() method call Logger.error() rather than
> Logger.exception() ?
exception() is a convenience method which adds the keyword argument
exc_info=1 to append traceback information to the log. Both
excepti
Fredrik Lundh wrote:
> Martin Marcher wrote:
>
>>> i need to read line 4 from a header file
>>
>> http://docs.python.org/lib/module-linecache.html
>
> I guess you missed the "using linecache will crash my computer due to
> memory loading, because i am working on 2000 files each is 8mb" part.
o
On Jan 7, 6:42 pm, Michael Chesterton <[EMAIL PROTECTED]> wrote:
> I'm trying to get a program that uses M2Crypto ThreadingSSLServer to
> run in windows as a service. I have a few problem, it doesn't listen
> on its port and I don't know how to debug it.
>
> I used the pipeservice example as a fram
Hot clips,great clips:
http://groups.google.com/group/greatclips/web/great-clips
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> Python guarantees[1] that files will be closed, but doesn't specify when
> they will be closed. I understand that Jython doesn't automatically close
> files until the program terminates, so even if you could rely on the ref
> counter to close the files in CPython, it wo
Russ P. wrote:
> On Jan 7, 9:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>> Given that the OP is talking 2000 files to be processed, I think I'd
>> recommend explicit open() and close() calls to avoid having lots of I/O
>> structures floating around...
>>
[effectively]
>> for fid in
>> I have to search for a string on a big file. Once this string
>> is found, I would need to get the number of the line in which
>> the string is located on the file. Do you know how if this is
>> possible to do in python ?
>
> This should be reasonable:
>
for num, line in enumerate(open
On Mon, 07 Jan 2008 22:16:56 -0800, Russ P. wrote:
> One second thought, I wonder if the reference counting mechanism would
> be "smart" enough to automatically close the previous file on each
> iteration of the outer loop. If so, the files don't need to be
> explicitly closed.
Python guarantees[
Fredrik Lundh <[EMAIL PROTECTED]> writes:
> BJ Swope wrote:
>
>> the code looks ok. please define "not working".
>>
>> Yep, defining "not working" is always helpful! :)
>>
>> I want to have all 3 files open at the same time. I will write to
>> each of the files later in my script but just th
I have often used the analogy of building a bridge to explain to
business colleagues the difference between Rapid Application
Development (RAD) and Waterfall.
Let's say that we are in the middle ages and the Mayor of Kingston-
upon-Thames is evaluating whether or not to build a bridge over the
riv
-On [20080108 12:59], Wildemar Wildenburger ([EMAIL PROTECTED]) wrote:
>Style note:
>May I suggest enumerate (I find the explicit counting somewhat clunky)
>and maybe turning it into a generator (I like generators):
Sure, I still have a lot to discover myself with Python.
I'
BJ Swope wrote:
> the code looks ok. please define "not working".
>
> Yep, defining "not working" is always helpful! :)
>
> I want to have all 3 files open at the same time. I will write to each
> of the files later in my script but just the last file is open for writing.
to keep more th
On Jan 8, 2008 6:54 AM, BJ Swope <[EMAIL PROTECTED]> wrote:
> > > given a list such as
> > >
> > > ['messages', 'recipients', 'viruses']
> > >
> > > how would I iterate over the list and use the values as variables and
> > > open the variable names a files?
> > >
> > > I tried
> > >
> > > for outfi
BJ Swope wrote:
> On Jan 8, 2008 6:03 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
>
>> BJ Swope wrote:
>>
>> > given a list such as
>> >
>> > ['messages', 'recipients', 'viruses']
>> >
>> > how would I iterate over the list and use the values as variables and
>> > open the variable names a files
On Jan 8, 1:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> BJ Swope wrote:
> > given a list such as
>
> > ['messages', 'recipients', 'viruses']
>
> > how would I iterate over the list and use the values as variables and
> > open the variable names a files?
>
> > I tried
>
> > for outfile in ['me
Robert Latest <[EMAIL PROTECTED]> writes:
>> If you see lines one by one, you are in luck, and you can fix things
>> on the Python level simply by avoiding buffering in popen. If not,
>> you will need to resort to more advanced hackery (e.g. fixing stdio
>> using LD_PRELOAD).
>
> Do I really? Aft
Jeroen Ruigrok van der Werven wrote:
> line_nr = 0
> for line in big_file:
> line_nr += 1
> has_match = line.find('my-string')
> if has_match > 0:
> print 'Found in line %d' % (line_nr)
>
Style note:
May I suggest enumerate (I find the explicit counting somewhat clunky)
and ma
On Jan 8, 2008 6:03 AM, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> BJ Swope wrote:
>
> > given a list such as
> >
> > ['messages', 'recipients', 'viruses']
> >
> > how would I iterate over the list and use the values as variables and
> > open the variable names a files?
> >
> > I tried
> >
> > for
On Jan 8, 10:03 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> BJ Swope wrote:
> > given a list such as
>
> > ['messages', 'recipients', 'viruses']
>
> > how would I iterate over the list and use the values as variables and
> > open the variable names a files?
>
> > I tried
>
> > for outfile in ['m
Hi Vinay,
> I would welcome your views on whether the LoggerAdapter class is
> suitable for adding to the logging package in Python 2.6/3.0. Does it
> do what might reasonably be expected out of the box?
I think it's quite suited to the problem, yes.
One question : why does the exception() meth
1 - 100 of 139 matches
Mail list logo