On Jan 8, 2:08 pm, "Russ P." <[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...
>
> Good point. I didn't think of that. It could als
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.2.6
>2. Installed Python 2.5.1
>3. Installed mod_python 3.3.1
>
>I t
Hi there,
I'm an experience Java developer trying to learn Python. I just
finished the Python tutorial on python.org and I'm currently reading
the "Learning Python" book. However, if I could find something like a
simple web app with some best practices, such as those famous "Java
Pet Store" apps,
Hello group i need to make a web service to work between python and
c# . Where python would server as backend (server) preferebly cherrypy
(turbogears) and client would be on a c# appln.
I have developed a webservice using TGWebServices package which runs
on top of turbogears.
but have no idea on
On Jan 7, 9:41 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Mon, 7 Jan 2008 20:10:58 -0800 (PST), "Russ P."
> <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
> > for file0 in files:
>
> > lnum = 0 # line number
>
> > for line in file(file0):
> > lnum += 1
Hi Guys,
Is there a python user group in the bay area?
Cheers,
George
--
http://mail.python.org/mailman/listinfo/python-list
> 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...
Good point. I didn't think of that. It could also be done as follows:
for fileN in files:
lnum = 0 # line
I am trying to call a function in a third party dll that spawns
anr 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 imp
>print 'lookahead2(initial=3.14159, last=42)'
>for this, next in lookahead2([1,2,3,4,5],
>initial=3.14159, last=42):
> print this, next
No, actually. But my mistake.
[ a.b() or _previous_ for a in c ]
means
1 or 2 or 3 or 4 or 5
where c= [ 1, 2, 3, 4, 5].
The mistake: thi
On Jan 7, 7:15 pm, jo3c <[EMAIL PROTECTED]> wrote:
> hi everybody
> im a newbie in python
> i need to read line 4 from a header file
> using linecache will crash my computer due to memory loading, because
> i am working on 2000 files each is 8mb
>
> fileinput don't load the file into memory first
>
On Jan 4, 5:25 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> jo3c wrote:
> > i have a 2000 files with header and data
> > i need to get the date information from the header
> > then insert it into my database
> > i am doing it in batch so i use glob.glob('/mydata/*/*/*.txt')
> > to get the date on
On Jan 7, 10:55 am, [EMAIL PROTECTED] wrote:
> Seehttp://www.tiobe.com/index.htm?tiobe_index.
>
> Marc
ohloh "Monthly Commits by Language"
also shows Python open-source work being healthy:
http://tinyurl.com/2wcadu
If you remove C/C++ the other languages can be more easily compared.
(C/C++ I see
hi everybody
im a newbie in python
i need to read line 4 from a header file
using linecache will crash my computer due to memory loading, because
i am working on 2000 files each is 8mb
fileinput don't load the file into memory first
how do i use fileinput module to read a specific line from a file
To all,
Just requesting Python Help - currently taking online courses for Computer
Science degree. Is anyone willing to help on some issues. Please let me
know, thank you.
Donald Bozeman
--
http://mail.python.org/mailman/listinfo/python-list
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 framework to get it running as a
service
def SvcDoRun(self):
On Jan 7, 11:25 am, [EMAIL PROTECTED] wrote:
> There's a lot of dumb stuff out there. "Algorithms should be coded
> efficiently ..." Thanks, I'll keep that in mind.
>
> van Rossum's guidelines tend toward "pick something and stick to it"
> which is OK if you have enough experience to pick something
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 ['messages', 'recipients', 'viruses']:
filename = os.path.join(Host_Path, outfile)
outfile = open(file
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| >From the manual:
|
| "code objects are immutable and contain no references (directly or
| indirectly) to mutable objects" (3.2)
|
| I thought my code worked with both mutable and immutable objects.
| Whassup?
Consider the following:
On Jan 7, 9:09 pm, [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
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 me to a downloadable open source English dictionary
> > > suitable for programma
> Tk itself has a stubs mechanism that allows libraries compiled against
> earlier versions to be used with later versions. It's different than
> Python in this respect. A pure-Tk library (such as Img or TkPNG) built
> against Tk 8.4 would not require re-compilation to be used with 8.5.
> Since PIL
On Mon, 07 Jan 2008 05:21:42 -0800, Mike wrote:
> I want to do something like the following (let's pretend that this is in
> file 'driver.py'):
>
> #!/bin/env python
>
> import sys
>
> def foo():
> print 'foo'
>
> def bar(arg):
> print 'bar with %r' % arg
>
> def main():
> getattr
Kevin Walzer wrote:
>
> Tk itself has a stubs mechanism that allows libraries compiled against
> earlier versions to be used with later versions. It's different than
> Python in this respect. A pure-Tk library (such as Img or TkPNG) built
> against Tk 8.4 would not require re-compilation to be
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".
--
http://mail.python.org/mailman/listinfo/python-list
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
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 changes.
I love this feature
On Jan 7, 5:10 pm, dgoldsmith_89 <[EMAIL PROTECTED]> wrote:
>
> Sorry for my ignorance: I can query an Access DB w/ standard SQL
> queries (and this is how I would access it w/ Python)?
>
> DG
If you are running on a Mac, just use sqlite, it's built-in to Python
as of v2.5 and you will find more h
On Jan 7, 2008 8:09 AM, <[EMAIL PROTECTED]> wrote:
> The best thing about Python is ___.
it's mailing list.
--
http://mail.python.org/mailman/listinfo/python-list
Martin v. Löwis wrote:
> OTOH, it's more likely that the PIL binaries you are using conflict with
> your Tk installation - if the binaries were for Tk 8.4 (which isn't
> quite clear to me whether that's indeed the case), then they can't work
> with Tk 8.5, as Tk doesn't provide that kind of binary
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 me to a downloadable open source English dictionary
> > suitable for programmatic use with python: I'm programming a puzzle
> > generator, and I nee
On Jan 7, 2:47 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> 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
> Since Python itself is the same version number (2.5.1), the only thing I
> can find to account for the crash is the different version of Tk--could
> this be making a difference, or am I doing something wrong?
Yes, Tk 8.5 isn't quite compatible with existing Tkinter code; there
have been a lot of
> Thanks, I'll then use sys.getfilesystemencoding() to decode _file__
> and re-encode into utf-8, which is the default encoding of all strings
> in our software, as we deal a bit with Chinese terms.
>
> Windows-1252 on my box. I just created a directory containing Chinese
> characters (on Vista),
C Martin wrote:
> What am I doing wrong in this code? The callback doesn't work from the Entry
> widget.
>
> ##start code
> import Tkinter
>
> tk = Tkinter.Tk()
> var = Tkinter.StringVar()
> print var._name
>
> def cb(name, index, mode):
> print "callback called with name=%r, index=%r, mod
On Jan 7, 4:37 pm, dgoldsmith_89 <[EMAIL PROTECTED]> 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, alp
On Jan 7, 2:46 pm, Rick Dooling <[EMAIL PROTECTED]> wrote:
> On Jan 7, 4:37 pm, dgoldsmith_89 <[EMAIL PROTECTED]> 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
On Jan 7, 4:37 pm, dgoldsmith_89 <[EMAIL PROTECTED]> 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, alp
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
here's one:
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
--
http://mail.python.org/mailman/listinfo/
On 7 Jan., 23:06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > can someone quickly tell me what the encoding of __file__ is? I can't
> > find it in the documentation.
>
> > BTW, I'm using Python 2.5.1 on WIndows XP and Vista.
>
> It's platform-specific - the same encoding that is used for file
I'm using a build of Python 2.5.1 on OS X 10.5.1 that links to Tk 8.5.
Trying to test PIL with this new build, Python barfs when trying to
display an image in a Tkinter Label. Here is my sample code:
---
from Tkinter import *
import Image, ImageTk
root = Tk()
im = Image.open('/Users/kevin/Desk
What am I doing wrong in this code? The callback doesn't work from the Entry
widget.
##start code
import Tkinter
tk = Tkinter.Tk()
var = Tkinter.StringVar()
print var._name
def cb(name, index, mode):
print "callback called with name=%r, index=%r, mode=%r" % (name, index, mode)
varValue =
> can someone quickly tell me what the encoding of __file__ is? I can't
> find it in the documentation.
>
> BTW, I'm using Python 2.5.1 on WIndows XP and Vista.
It's platform-specific - the same encoding that is used for file names
(i.e. sys.getfilesystemencoding()). On Windows, it will be "mbcs"
Dear all,
can someone quickly tell me what the encoding of __file__ is? I can't
find it in the documentation.
BTW, I'm using Python 2.5.1 on WIndows XP and Vista.
Kind regards,
Sebastian
--
http://mail.python.org/mailman/listinfo/python-list
Just Another Vague Acronym = (Java)
On Jan 7, 2008 10:32 PM, Ben Finney <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] writes:
>
> > The best thing about Python is ___.
>
> The best thing about Python is its elegance.
>
> --
> \"Like the creators of sitcoms or junk food or package to
[EMAIL PROTECTED] writes:
> The best thing about Python is ___.
The best thing about Python is its elegance.
--
\"Like the creators of sitcoms or junk food or package tours, |
`\ Java's designers were consciously designing a product for |
_o__)people n
John Machin lexicon.net> writes:
> If you execute that stuff inside a function (see below) instead of in
> global scope, do you get the same effect?
Thanks for your reply.
No, running it inside a function means I can't rely on python to garbage
collect, so there will be widgets left over whethe
Fredrik Lundh pythonware.com> writes:
> So what you're concerned about is the lack of cleanup during interpreter
> shutdown, not a true leak (which would result in "Max widgets" growing
> towards infinity).
Yes, sorry about my sloppy terminology.
> The problem here is that you're relying on Py
Henry Chang wrote:
> On Jan 7, 2008 5:41 AM, alain <[EMAIL PROTECTED]> wrote:
>> Paraphrasing Steve Jobs but in this context:
>> PYTHON = a bycycle for the mind
> What exactly does it mean "a bycycle for the mind"??
Ask the Dutch guy near you.
Stefan
--
http://mail.python.org/mailman/listinfo/py
Dustan wrote:
> On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote:
>
>> it's pythonicness.
>>
>
> "it is pythonicness"???
>
Obviously a typo, for "It is pythonic, Ness".
A reference to the well-known Loch Ness Monster, definitely pythonic if
you see some pictures:
http://ima
On Monday 07 January 2008 21:25 Dustan wrote:
> On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote:
>> it's pythonicness.
>
> "it is pythonicness"???
not all here are native english speakers, but thanks for the correction.
I'll try to keep it in mind.
--
http://noneisyours.marcher.na
maybe following recipe from activestate may be usefull.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496960
http://sebulba.wikispaces.com/recipe+thread2
--
http://mail.python.org/mailman/listinfo/python-list
Berco Beute wrote:
> What I would like to know is what it was that boosted Python's
> popularity in 2004 (see http://www.tiobe.com/tiobe_index/Python.html).
> Equally interesting is the question why it dropped shortly after.
They explain the discontinuity on the index page in the FAQ.
Richar
Hello Everyone-
I'd like to announce the tutorials sessions for PyCon 2008 (US). As you may
know, this year PyCon is being held in Chicago, Illinois March 14-16 with
the Thursday before (the 13th) being "Tutorial Thursday". We are expecting
nearly 600 Python enthusiasts to meet up for the confer
> The idea is a shorthand for reduce. Here, _next_ meant the next item
> in the iterable c.
You mean like one of these:
def lookahead(iterator):
i = iter(iterator)
x = i.next()
for item in i:
yield x, item
x = item
def lookahead2(iterator, **kwarg):
i = i
On Jan 7, 1:45 pm, [EMAIL PROTECTED] wrote:
> On Jan 7, 1:29 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
>
> The idea is a shorthand for reduce. Here, _next_ meant the next item
> in the iterable c.
'Only' is another known quantifier in logic: 'all and only'. Any
(there exists) and all (for
On Jan 7, 11:40 am, Martin Marcher <[EMAIL PROTECTED]> wrote:
> it's pythonicness.
"it is pythonicness"???
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 8, 6:21 am, Baz Walter <[EMAIL PROTECTED]> wrote:
> Guilherme Polo gmail.com> writes:
>
> > Uhm.. this didn't make much sense. If you say the module is cached,
> > then supposing you did a minor edit, and then supposing because it is
> > cached your application wouldn't detect the change, t
Baz Walter wrote:
> Before changing the name 'mainwindow' to 'mainwidget' it reports:
>
> Widgets left: 0Max widgets: 2
> Widgets left: 0Max widgets: 149 (full program)
>
> Afterwards it reports:
>
> Widgets left: 1Max widgets: 2
> Widgets left: 146Max widgets: 149 (full program
I'm a big fan of Amazon's SQS web services. However, I think their
SQS is simply too expensive. I was doing some tests in python using
SQS and created 1,513 messages in just a few minutes. Then I looked
at my bill. It was $0.15 not counting the S3 fee.
$0.15 seems like a lot to me for the appl
Diez B. Roggisch a écrit :
> Berco Beute schrieb:
>
>> Cool! We knew it would happen one day :)
>> What could be the reason? Python 3? Jython 2.2? Java's loss of
>> sexiness?
>
>
> I'd say Java was never sexy, but dressed up in expensive lingerie by
> marketing maniacs...
+2 QOTW
> Diez
--
h
On Jan 7, 9:53 am, Berco Beute <[EMAIL PROTECTED]> wrote:
> Cool! We knew it would happen one day :)
> What could be the reason? Python 3? Jython 2.2? Java's loss of
> sexiness?
>
> What I would like to know is what it was that boosted Python's
> popularity in 2004 (seehttp://www.tiobe.com/tiobe_in
On Jan 7, 7:26 pm, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:python-
> > [EMAIL PROTECTED] On Behalf Of Paddy
> > Sent: Monday, January 07, 2008 12:52 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: dictionary/hash and '1' versus 1
Fredrik Lundh pythonware.com> writes:
>
> Baz Walter wrote:
>
> > It's hard to supply an example for this, since it is local to the machine I
am
> > using. The startup module would look something like this:
>
> would look, or does look? if it doesn't look like this, what else does
> it con
On Jan 7, 1:29 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote:
> 2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> > > You are too late, any and all are built-in into python 2.5
>
> > Hi, excellent. Now how about something more generic, possibly:
>
> > [ x.y() for x or _next_ in c ]
>
> > where
Baz Walter wrote:
> It's hard to supply an example for this, since it is local to the machine I
> am
> using. The startup module would look something like this:
would look, or does look? if it doesn't look like this, what else does
it contain?
> #!/usr/local/bin/python
>
> if __name__ == '_
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > You are too late, any and all are built-in into python 2.5
>
> Hi, excellent. Now how about something more generic, possibly:
>
> [ x.y() for x or _next_ in c ]
>
> where the context of _next_ is limited in complexity, and/or can only
> occur in
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Paddy
> Sent: Monday, January 07, 2008 12:52 PM
> To: python-list@python.org
> Subject: Re: dictionary/hash and '1' versus 1
>
> Or how using different operators for similar operations on differ
PostgreSQL Conference East is being held on the weekend of March 29th
and 30th, 2008 in College Park, Maryland. The conference will have a
series of talks, mini-tutorials and tutorials and we are now accepting
submissions!
If you are a third pary vendor, PostgreSQL developer, PostgreSQL
consultant
Guilherme Polo gmail.com> writes:
> Uhm.. this didn't make much sense. If you say the module is cached,
> then supposing you did a minor edit, and then supposing because it is
> cached your application wouldn't detect the change, then I don't see
> the connection with memory leak.
>
> Bring some
On Jan 7, 12:30 pm, Baz Walter <[EMAIL PROTECTED]> wrote:
> Hello
>
> I remember reading somewhere (probably this list) that python may cache the
> module that starts a program (e.g. 'main.py'). I'm asking because I have found
> that this can sometimes cause problems when making small edits to the
> You are too late, any and all are built-in into python 2.5
Hi, excellent. Now how about something more generic, possibly:
[ x.y() for x or _next_ in c ]
where the context of _next_ is limited in complexity, and/or can only
occur in a generator?
--
http://mail.python.org/mailman/listinfo/pyth
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> any( iterab ) and all( iterab )
>
> as shorthand for reduce( operator.or_, iterab ) and
> reduce( operator.and_, iterab ).
>
> What do you think?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You are too late, any and all are built-
2008/1/7, Baz Walter <[EMAIL PROTECTED]>:
> Hello
>
> I remember reading somewhere (probably this list) that python may cache the
> module that starts a program (e.g. 'main.py').
Something like mod_python will do caching.
> I'm asking because I have found
> that this can sometimes cause problems
any( iterab ) and all( iterab )
as shorthand for reduce( operator.or_, iterab ) and
reduce( operator.and_, iterab ).
What do you think?
--
http://mail.python.org/mailman/listinfo/python-list
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-ti
Hello
I remember reading somewhere (probably this list) that python may cache the
module that starts a program (e.g. 'main.py'). I'm asking because I have found
that this can sometimes cause problems when making small edits to the module.
For instance, in my current module I changed the name of
On Jan 7, 12:26 pm, [EMAIL PROTECTED] wrote:
> Guilherme Polo wrote:
> > foo = [
> > 'too long',
> > 'too long too',
> > ...
> > ]
>
> OK, I'll put it there too, and it will be easy for us to read each
> other's code (at least in this particular).
While not required by any means, y
Guilherme Polo wrote:
> foo = [
> 'too long',
> 'too long too',
> ...
> ]
OK, I'll put it there too, and it will be easy for us to read each
other's code (at least in this particular).
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 7, 9:27 am, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> On Jan 7, 12:53 pm, Berco Beute <[EMAIL PROTECTED]> wrote:
>
> > Cool! We knew it would happen one day :)
> > What could be the reason? Python 3? Jython 2.2? Java's loss of
> > sexiness?
>
> Python eats Perls lunch as a scripting languag
On Jan 7, 1:09 pm, [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
On Jan 7, 5:09 pm, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote:
> Bingo. Perl has specific operators to establish intent:
> > Perl -e "'1' + 1"
> > 2
> > Perl -e "'1' . 1"
> > 11
> '+' is the operator for addition
> '.' is the operator for string concatenation
>
>
[EMAIL PROTECTED] wrote:
> The best thing about Python is ___.
it's pythonicness.
--
http://noneisyours.marcher.name
http://feeds.feedburner.com/NoneIsYours
You are not free to read this message,
by doing so, you have violated my licence
and are required to urinate publicly. Thank you.
--
What exactly does it mean "a bycycle for the mind"??
(assuming s/bycycle/bicycle)
On Jan 7, 2008 5:41 AM, alain <[EMAIL PROTECTED]> wrote:
> On Jan 7, 2:09pm, [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
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of Steven D'Aprano
> Sent: Saturday, January 05, 2008 7:01 PM
> To: python-list@python.org
> Subject: Re: dictionary/hash and '1' versus 1
>
> The problem with automatic conversions between strin
<[EMAIL PROTECTED]> wrote:
>In Java you can add the number 1 to a string, and have it
>automatically converted to string before the string join... What do
>you think of that feature?
"-%s" % 1
--
\S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards pe
On Jan 6, 7:48 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> tarun wrote:
> > Can anyone help me with a simple code through which the main thread can
> > kill the worker thread it started.
>
> it cannot. threads cannot be killed from the "outside".
>
>
The only way to "kill" a thread is to have
mpho raborife wrote:
> Please help me get this syntax right:
>
> os.system("HCopy -T 1 -C" 'os.path.join(conf_dir, "/hcopy.conf")' "-S"
> 'os.path.join(list_dir, "hcopy_list.txt")')
instead of attempting to get your program working by random trial and
error process, maybe you should spend an
2008/1/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Thank you both.
>
> Stupid me, went to Python.org and found Style Guidelines and thought
> that was the last word. Oh well.
>
> PEP 8 reminds me a lot of Sun's Java conventions, in ways I wish it
> didn't. The overall structure seems like a random
[EMAIL PROTECTED] wrote:
> Here's just one of my questions:
>
> foo = [
> 'some item, quite long',
> 'more items, all demanding there own line as they are not short',
> ...
>
> Where would you put the closing ']'?
on a line by itself, indented as your favourite Python editor indents
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
Thank you both.
Stupid me, went to Python.org and found Style Guidelines and thought
that was the last word. Oh well.
PEP 8 reminds me a lot of Sun's Java conventions, in ways I wish it
didn't. The overall structure seems like a random list of topics and
it omits a lot. For Java I went from Sun t
I am looking for an E-Book or some tutorial in which a good explanation
about PostgreSQL/MySQL database, then about interacting with them using
Python is explained.
I want to start RDBMS, i have no idea about them. I have been doing Python,
willing to do some good project in RDBMS.
Thanks in advanc
Tom Brown wrote:
>On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote:
>
>
>>2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>:
>>
>>
>>>Hi all. Im trying to read a binary data from an postgres WAL archive.
>>>If i make a
>>>xfile = open('filename', 'rb').xreadlines()
>>>line = xfile.next()
>
Alex K wrote:
Please don't top-post.
> On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote:
>> Alex K wrote:
>>
>> > What would be the simplest way of enumerating all methods and members
>> > (including inherited) of a given object? Thank you.
>>
>> inspect.getmembers()
> Nice thank you. But an
2008/1/7, Alex K <[EMAIL PROTECTED]>:
> Nice thank you. But anyway to make it look pretty?
>
pprint.pprint(inspect.getmembers(someobject))
> On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote:
> > Alex K wrote:
> >
> > > What would be the simplest way of enumerating all methods and members
> >
On Mon, 2008-01-07 at 11:57 -0200, Guilherme Polo wrote:
> 2008/1/7, Gerardo Herzig <[EMAIL PROTECTED]>:
> > Hi all. Im trying to read a binary data from an postgres WAL archive.
> > If i make a
> > xfile = open('filename', 'rb').xreadlines()
> > line = xfile.next()
> >
> > i see this sort of thing
I am trying to call a funtinon in a third party dll that spawns
another 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
Mike wrote:
> Is there any way around this? Can I somehow scope the 'current
> module' and give getattr(...) an object that will (at run time) have
> the appropriate bindings?
globals() for the current name space
import sys
sys.modules[__name__] gets you the module object
Christian
--
http://
Nice thank you. But anyway to make it look pretty?
On 07/01/2008, Peter Otten <[EMAIL PROTECTED]> wrote:
> Alex K wrote:
>
> > What would be the simplest way of enumerating all methods and members
> > (including inherited) of a given object? Thank you.
>
> inspect.getmembers()
>
> Peter
> --
> htt
1 - 100 of 149 matches
Mail list logo