Philippe Martin wrote:
> Janto Dreijer wrote:
>
> > I'm writing a Linux filemanager using wxPython. I'd like to embed a
> > bash console inside it. I have found the Logilab pyqonsole
> > (http://www.logilab.org/projects/pyqonsole), but it uses PyQT.
> >
> > Does anyone know how to do this from wx?
Hi Python Gurus I have a python script that is supposed to check to see if a folder exists in a computer on a network, but python always seems to return false. for example: 1) folder_path = shared-dir\\packages\\hwmanager\\4.00.1.16 if os.path.isdir(folder_path):
Diez B. Roggisch wrote:
>> No, the list comprehension lets you write an expression directly
>> avoiding a function call, and it also allows you to add in a
>> condition which can be used to filer the sequence. Your proposal adds
>> nothing.
>
> It does. Consider this:
>
> whatever = [x for x in
"Janto Dreijer" <[EMAIL PROTECTED]> wrote:
|
| Janto Dreijer wrote:
| > John Henry wrote:
| > > Simon Forman wrote:
| > > > >
| > > > > False not in logflags
| > > > >
| > > >
| > > > Or, if your values aren't already bools
| > > >
| > > > False not in (bool(n) for n in logflags)
| > >
| > > Ve
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote:
| On Sat, 5 Aug 2006 11:20:59 +0200, "H J van Rooyen"
| <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
|
| >
| > no such luck - reality will probably be Linux for server, and a horrible mix
of
| > windoze machines on the client sid
Slawomir Nowaczyk wrote:
> #> No, the list comprehension lets you write an expression directly
> #> avoiding a function call, and it also allows you to add in a
> #> condition which can be used to filer the sequence.
>
> I am not sure if I understand you correctly, but... Does it?
>
a = [0
Dave Potts wrote:
> Hi,
>
> I'm just starting a development project in Python having spent time in
> the Java world. I was wondering what tool advice you could give me
> about setting up a continuous integration environment for the python
> code: get the latest source, run all the tests, package u
Harry George wrote:
> [snip stuff about how to set emacs up as your IDE]
Not sure which post you read, but the OP of this thread was asking
about continuous integration, not integrated development environments.
i.e. tools to *automatically* check out code when the repository has
changed, build it
"Bruno Desthuilliers" <[EMAIL PROTECTED]>
H J van Rooyen a écrit :
> "Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote:
>
(snip)
> | If you go the web application route, each "login" would use a cookie
> | to control session, so the application server can determine what
> | functions to present to
Terry Reedy wrote:
> "heavydada" <[EMAIL PROTECTED]> wrote in message
>> I just need some way of
>> being able to read from the file what function the program needs to
>> call next. Any help is appreciated.
>
> Suppose you have a file actions.py with some action functions:
> def hop(self): ...
>
Hello,
what is the best /easest way how to get number of hours and minutes
from a timedelta object?
Let's say we have
aa=datetime.datetime(2006, 7, 29, 16, 13, 56, 609000)
bb=datetime.datetime(2006, 8, 3, 17, 59, 36, 46000)
so
c=bb-aa
will be
datetime.timedelta(5, 6339, 437000)
I can easily get d
Lad wrote:
> Hello,
> what is the best /easest way how to get number of hours and minutes
> from a timedelta object?
> Let's say we have
> aa=datetime.datetime(2006, 7, 29, 16, 13, 56, 609000)
> bb=datetime.datetime(2006, 8, 3, 17, 59, 36, 46000)
> so
> c=bb-aa
> will be
> datetime.timedelta(5, 63
HiI want to convert a .py file into .exe with py2exe(I use Pyparallel(import parallel) in that program)after running setup.py py2exe this massage appear:"The following modules appear to be missing: ['parallelioctl' , 'paralleljava'] " how I can remove this Problem?thanks
See the all-new, red
On 2006-08-07, Rochester <[EMAIL PROTECTED]> wrote:
> Thanks Alex, now I think I understand much better the fifo/pipe mechanism
> and how Python treats them.
>
> For those who are interested, I would like to restate the problem I was
> tring to solve and a working solution (inspired by Alex Mar
Hi
I try to regularly extract recent news from some newsgroups.
If News is an NNTP object I try
(Response,Articles)= News.xover(str(int(Last)+1),'1000')
where 'Last' is the (previously saved) number of the last
article read.
If there are no new articles I get an Exception
Traceback (most rece
John Machin wrote:
> Lad wrote:
> > Hello,
> > what is the best /easest way how to get number of hours and minutes
> > from a timedelta object?
...
> >>> diff.days
> 0
> >>> diff.seconds
> 52662
> >>> diff.microseconds
> 922000
> >>> minutes = (diff.seconds + diff.microseconds / 100.0) / 60.0
Hi Helmut,
I guess it simply raises an exception in case there are no articles;
this may not be what you expected, but it would seem that this is the
way it operates. You should try catching the exception to plan out a
course of action in case no articles are present.
Michiel
Op 7-aug-2006
Duncan Booth <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> Diez B. Roggisch wrote:
>
>>> No, the list comprehension lets you write an expression directly
>>> avoiding a function call, and it also allows you to add in a
>>> condition which can be used to filer the sequence. Your proposal
mg schrieb:
> I know the incompatibility problem to have Python compiled with one
> compiler and packages with another one. Nevertheless, in my case, Python
> is well compiled with VisualStudio2005 thank to project files provided
> by Mr Python himself. So, Python is not yet ready to support comple
Jarek Zgoda schrieb:
> Sure, but what if I succesfully compile Python with VS 2005? Hier ist
> der Hund begraben, distutils cann't handle this compiler so I'll be
> unable to compile any extension for my home-baken Python.
It sure can. Just open a "Visual Studio Command Prompt" (or whatever
its na
Fabian Braennstroem schrieb:
> Thanks, but unfortunately the administrative policy does not
> allow such installation, but could it work, when I do such a
> installation in my home directory, copy everything to a
> cdrom/dvd and mount it in proper place?
Yes, that should work as well. Python won't
[EMAIL PROTECTED] schrieb:
> I am trying to create a subclass of a python class, defined in python,
> in C++, but I am having some problems.
Is the base class a classic class or a new-style class? Depending on
the answer, the code you should write varies significantly.
To create a new type, it mi
I am trying to get a regex that will match \r\n in a string.
ultimately i am trying to replace all \r\n with somethign else, say
BLAH.
For example:
This is a message
on a new line
would become:
This is a messageBLAHon a new line.
any ideas? i tried
re.compile('\r\n').match("This is a message"
[EMAIL PROTECTED] schrieb:
> The trick is finding the right . Has someone attempted this
> before, or am I stuck writing my own solution?
In this specific example, there is a different approach, using
the Unicode character database:
def strip_combining(s):
import unicodedata
# Expand
abcd wrote:
> [...]
> ultimately i am trying to replace all \r\n with somethign else, say
> BLAH.
>
> For example:
> This is a message
> on a new line
>
> would become:
> This is a messageBLAHon a new line.
Concluding from your question I think you might be happy with a simple
string `.replace`:
Martin v. Löwis napisał(a):
>>Sure, but what if I succesfully compile Python with VS 2005? Hier ist
>>der Hund begraben, distutils cann't handle this compiler so I'll be
>>unable to compile any extension for my home-baken Python.
>
> It sure can. Just open a "Visual Studio Command Prompt" (or wha
Michiel Sikma wrote:
> Hi Helmut,
>
> I guess it simply raises an exception in case there are no articles;
> this may not be what you expected, but it would seem that this is the
> way it operates. You should try catching the exception to plan out a
> course of action in case no articles are pr
I'll be out of the office until approximately August 20th. If you have any
questions, please email [EMAIL PROTECTED]
-- David Wahler
--
http://mail.python.org/mailman/listinfo/python-list
Ant wrote:
> John Machin wrote:
> > Lad wrote:
> > > Hello,
> > > what is the best /easest way how to get number of hours and minutes
> > > from a timedelta object?
> ...
> > >>> diff.days
> > 0
> > >>> diff.seconds
> > 52662
> > >>> diff.microseconds
> > 922000
> > >>> minutes = (diff.seconds +
Hi there,
is it possible to put the methods of a class in different files? I just
want to order them and try to keep the files small.
Regards
Martin
--
http://mail.python.org/mailman/listinfo/python-list
Hi Martin,
I don't think that's possible, since a file is executed when it is
imported. If you load a file which contains a "partial" class, you
will get an error because the indentation is incorrect, or the
methods will be loaded in the wrong namespace.
Regards,
Michiel
Op 7-aug-2006, om
Martin Höfling wrote:
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
No, its not possible. What you can do is to create several classes and one
that inherits from all of them.
Better yet is to not write huge classe
Good morning.
I have recently begun a project using PyGTK, and part of my planned
interface has a gtk.TreeView showing a portion of the filesystem. Now,
rather than load the entire FS structure into the tree right from the
beginning, I made a lazy tree by adding blank children to rows
representing
Martin Höfling wrote:
> Hi there,
>
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
>
> Regards
> Martin
I ran across pyp the other day. It may be what you're wanting.
http://www.freenet.org.nz/python/pyp/
--
crowell> However, I'd like to see the more sensible "Bela Fleck" instead
crowell> of dropping '\xe9' entirely.
Assuming the data are in latin-1 or can be converted to it, try my latscii
codec:
http://orca.mojam.com/~skip/python/latscii.py
Skip
--
http://mail.python.org/mailman/li
Martin Höfling:
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
Well, you can create one or more modules filled with nude methods, and
you can define a class inside another module, and then add the methods
to this last
Martin Höfling wrote:
> Hi there,
>
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
>
> Regards
> Martin
You could use something like this:
"""
Example usage:
>>> class Person(object):
... def __init__(self
Martin Höfling wrote:
> Hi there,
>
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
Technically, yes - but in a somewhat hackish way.
But you *really* should not have such a need at first. Smells like a
design (or co
John Machin wrote:
...
> 1. If that's what he wanted, it was a very peculiar way of asking. Do
> you suspect that he needs to be shown how to conver 877.7... minutes
> into hours, minutes and seconds???
Chill dude, It wasn't an attack :-)
The datetime class has hour, minute and second attributes
Hi,
AIM: I have a config file that contains configuration under headings
like this:
heading1:
heading2:
...
...
i parse this file to get heading1, heading2, etc and then i want to
call heading1.process(), heading2.process(), etc.
What i am trying to do is: (this is not the exact code, it jus
Martin Höfling wrote:
> Hi there,
>
> is it possible to put the methods of a class in different files? I just
> want to order them and try to keep the files small.
The editor leo (http://webpages.charter.net/edreamleo/front.html) gives
you a way of handling large files in this way without actuall
if i have a number, say the size of a file, is there an easy way to
output it so that it includes commas?
for example:
1890284
would be:
1,890,284
I am looking for something builtin to python, not a third party lib.
thanks
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for your suggestions, precompiling is not an option, cause I
can't introduce extra dependencies from a precompiler.
> Better yet is to not write huge classes and getting rid of strange
> conventions or views that make the problem appear as such. To explain that:
> I've never felt the need
In <[EMAIL PROTECTED]>, abcd wrote:
> if i have a number, say the size of a file, is there an easy way to
> output it so that it includes commas?
>
> for example:
>
> 1890284
>
> would be:
>
> 1,890,284
I think this comes close:
In [23]: import locale
In [24]: locale.setlocale(locale.LC_ALL
(Environment: RedHat Linux recent, Python 2.3.5)
We have a batch processing script that on occasion needs to send out an
email. We have a sendmail running locally.
Sometimes we get a socket timeout on sending that email. Increasing the
timeout to 30sec reduced but did not eliminate it.
It seems
Programming a screensaver in Python, where and/or how di I start ?
Daniel VdB
--
http://mail.python.org/mailman/listinfo/python-list
daniel Van der Borght wrote:
> Programming a screensaver in Python, where and/or how di I start ?
Google for "python screensaver". The first link has a module to use...
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Aug 06, 2006 at 04:15:08PM EDT, Aahz wrote:
> In article <[EMAIL PROTECTED]>,
> Fabian Braennstroem <[EMAIL PROTECTED]> wrote:
> >
> >I am looking for a python email client for the terminal... something like
> >mutt; maybe, so powerfull ;-)
>
> What's wrong with mutt?
Like he says it's n
As a part of my Master Thesis in Cognitive Science at the University of Linköping in Sweden i have created a Squeak-like system in Python called PyMorphic. Project homepage is http://pymorphic.sourceforge.net/
I am about to make a new release with minor changes.There is a tutorial for you in the To
I think you would benefit from looking at the ConfigParser module.
I haven't tried it yet, but it looks like a nice interface for writing
and reading configuration files.
-Uffe.
On 7 Aug 2006 07:30:41 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> AIM: I have a config file that con
are you Chris ? anyway : thank you...
"Ant" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
>
> daniel Van der Borght wrote:
>> Programming a screensaver in Python, where and/or how di I start ?
>
> Google for "python screensaver". The first link has a module to use...
>
--
http:
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Alex Martelli) wrote:
> Donn Cave <[EMAIL PROTECTED]> wrote:
>
> > In article <[EMAIL PROTECTED]>,
> > Rochester <[EMAIL PROTECTED]> wrote:
> >
> > > I just found out that the general open file mechanism doesn't work
> > > for named
daniel Van der Borght wrote:
> are you Chris ? anyway : thank you...
No - I really am Ant. :-)
--
http://mail.python.org/mailman/listinfo/python-list
> getattr(heading, "process")(file_ptr)
...
> Is there an alternatice to getattr() that will solve my problem, or is
> there another way to do it.
How about:
eval("%s.process(%s)" % (heading, file_ptr))
--
http://mail.python.org/mailman/listinfo/python-list
The Apache Software Foundation and The Apache HTTP Server Project are
pleased to announce the 3.2.10 release of mod_python. Mod_python
3.2.10 is considered a stable release, suitable for production use.
Mod_python is an Apache HTTP Server module that embeds the Python
language interpreter within
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> import heading1
> import heading2
> While True:
> heading = get_next_heading(file_ptr) # This func will return
> "heading1", then "heading2"(on next call)
> if heading = "":
> break
> getattr(heading, "process")(file_ptr
I have some classes that trap hook sys.excepthook and log
exceptions prior to the program exiting. This has proven
to be an effective way to log what is going on with many
of my "lights out" processes. I'm doing some testing with
Python 2.5b2 and can't seem to get it to work properly.
Here is a v
abcd wrote:
> if i have a number, say the size of a file, is there an easy way to
> output it so that it includes commas?
>
> for example:
>
> 1890284
>
> would be:
>
> 1,890,284
see also this thread:
http://tinyurl.com/qf6ew
rd
--
http://mail.python.org/mailman/listinfo/python-list
If you go to http://www.python.org/pypi. you see it about in the middle of the
recently updated packages. It's blue, so you can
click it and you're there.
The update page shows only the twenty most recent updates. So they drop
out at the bottom rather fast. If it's gone by the
time you chec
When I use raw_input('Please type something.\n') in the python 2.4
command line windows, it doesn't have any problem. However, when I run
the same command in vim 7 as :py raw_input('Please type something.\n'),
there is an EOFError: EOF when reading a line. Is there a way to use
that command withi
Damjan wrote:
> Yes, but your mod_python programs still run with the privileges of the
> Apache process, as are all the other mod_python programs. This means that
> my mod_python program can (at least) read files belonging to you -
> including your config file holding your database password
I
In article <[EMAIL PROTECTED]>,
Paddy <[EMAIL PROTECTED]> wrote:
.
[substantial thread
with many serious
alternatives]
.
.
>You can do things with function attributes
>
>def foo(x
On 7 Aug 2006 07:55:11 -0700, abcd <[EMAIL PROTECTED]> wrote:
> if i have a number, say the size of a file, is there an easy way to
> output it so that it includes commas?
>
> for example:
>
> 1890284
>
> would be:
>
> 1,890,284
>
I was bored !!
>>> a = 1890284
>>> ','.join([str(a)[::-1][x:x+3] f
Hello everyone. Trying to run idle from a cygwin session on Win2k
(yuk, but I must) I'm getting the following error message. It seems
something more Windoze-driven that Python driven, and I'm not and don't
wanna be an expert on that OS. Since the group has a good mix of users
in different plat
I would like to create a script for Windows 2000 that will create a
Standard TCP/IP printer port and install a printer (I have the
applicable printer drivers needed for the install on a network share).
My plan is to use py2exe and distribute (also via network share) the
script so that administrator
PS: I already tried what suggested in a previous message on the groups
"Python 2.3.2 spawn problem" - Uninstalling and reinstalling python
without luck.
Python 2.4.3 (#1, May 18 2006, 07:40:45)
[GCC 3.3.3 (cygwin special)] on cygwin
Thanks!
jcmendez wrote:
> Hello everyone. Trying to run idle
On Mon, 07 Aug 2006 00:33:33 -0400, Tim Peters wrote:
> ...
>
> [Jon Smirl]
>> I know in advance how many items will be added to the dictionary. Most
>> dictionary implementations I have previously worked with are more
>> efficient if they know ahead of time how big to make their tables.
>
> Ric
Tim Williams wrote:
a = 1890284
','.join([str(a)[::-1][x:x+3] for x in range(len(str(a)))[::3]])[::-1]
> '1,890,284'
>
> Ugly !
>
>>> b = 189028499
>>> ','.join([str(b)[::-1][x:x+3] for x in range(len(str(b)))[::3]])[::-1]
'-,189,028,499'
>>> c = 1890284.1
>>> ','.join([str(c)[::
Yu-Xi Lim wrote:
> >>> b = 189028499
> >>> ','.join([str(b)[::-1][x:x+3] for x in range(len(str(b)))[::3]])[::-1]
>
> '-,189,028,499'
Oops, mis-paste
>>> b = -189028499
>>> ','.join([str(b)[::-1][x:x+3] for x in range(len(str(b)))[::3]])[::-1]
--
http://mail.python.org/mailman/listinfo/pyt
Jon Smirl wrote:
> On Sun, 06 Aug 2006 15:33:30 -0700, John Machin wrote:
[snip..]
> >
> > Do you have an application with a performance problem? If so, what makes
> > you think inserting 1M items into a Python dict is contributing to the
> > problem?
>
> I know in advance how many items will be a
Hi D,
I would suggest that you look here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_7mgj.asp
at AddPort and and AddPrinter. Though I have not tried to use them in
python, I would assume that using win32com
[http://www.python.net/crew/mhammond/win32/Downloads.html
Hi,
Any hint on converting time from ST_CTIME secs into mmdd format?
sorry for one-liner stupid question.. I couldn;t find (or rather figure
out) in docs.
Thank you,
hj
--
http://mail.python.org/mailman/listinfo/python-list
All right I got it. Thank you anyway...
create_date = os.stat(pathname)[ST_CTIME]
print time.strftime("%Y%m%d", time.gmtime(create_date))
Hitesh wrote:
> Hi,
>
> Any hint on converting time from ST_CTIME secs into mmdd format?
> sorry for one-liner stupid question.. I couldn;t find (or rathe
Thanks.
Terry Reedy wrote:
> "The Eternal Squire" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I've been doing some hacking of the Python engine, and I've been
> > looking for
> > where the comprehensive regression tests are kept so that I can
> > determine
> > where I've brok
Ant wrote:
> John Machin wrote:
> ...
> > 1. If that's what he wanted, it was a very peculiar way of asking. Do
> > you suspect that he needs to be shown how to conver 877.7... minutes
> > into hours, minutes and seconds???
>
> Chill dude, It wasn't an attack :-)
I didn't think it was.
>
> The d
I'm having trouble getting the data_files argument of my setup.py to
work with "python setup.py sdist" under Windows XP. Here is the
data_files argument that I pass to setup().
data_files = [\
('res','app.ico'),
('', 'preferences.xml'),
('res', glob.glob
"abcd" <[EMAIL PROTECTED]> writes:
> 1890284
>
> would be:
>
> 1,890,284
"To iterate is human; to recurse, divine":
def commafy(n):
if n < 0: return '-' + commafy(-n)
if n >= 1000: return '%s,%03d' % (commafy(n//1000), n % 1000)
return '%s'% n
I don't like the locale s
Hi,
I have a small script here that goes to inside dir and sorts the file
by create date. I can return the create date but I don't know how to
find the name of that file...
I need file that is not latest but was created before the last file.
Any hints... I am newbiw python dude and still trying t
Hitesh wrote:
> Hi,
>
> I have a small script here that goes to inside dir and sorts the file
> by create date. I can return the create date but I don't know how to
> find the name of that file...
> I need file that is not latest but was created before the last file.
> Any hints... I am newbiw pyt
Paul Rubin wrote:
> "To iterate is human; to recurse, divine":
>
> def commafy(n):
>if n < 0: return '-' + commafy(-n)
>if n >= 1000: return '%s,%03d' % (commafy(n//1000), n % 1000)
>return '%s'% n
>
> I don't like the locale solution because of how messy locales are.
At Saturday 5/8/2006 22:22, Alex Martelli wrote:
> But does anyone know of a complete discussion/analysis of patterns in
> Python? Books, articles, web pages...
Thanks to all of you for your pointers on this subject!
Gabriel Genellina
Softlab SRL
_
Dave Potts wrote:
> Hi,
>
> I'm just starting a development project in Python having spent time in
> the Java world. I was wondering what tool advice you could give me
> about setting up a continuous integration environment for the python
> code: get the latest source, run all the tests, package
Where are they-who-hate-us-for-our-whitespace? Are "they" really that
stupid/petty? Are "they" really out there at all? "They" almost sound
like a mythical caste of tasteless heathens that "we" have invented.
It just sounds like so much trivial nitpickery that it's hard to
believe it's as common
On 7 Aug 2006 13:52:16 -0700, Hitesh <[EMAIL PROTECTED]> wrote:
>
> I have a small script here that goes to inside dir and sorts the file
> by create date. I can return the create date but I don't know how to
> find the name of that file...
> I need file that is not latest but was created before th
Ziga Seilnacht wrote:
> Dave Potts wrote:
> > Hi,
> >
> > I'm just starting a development project in Python having spent time in
> > the Java world. I was wondering what tool advice you could give me
> > about setting up a continuous integration environment for the python
> > code: get the latest
Hitesh wrote:
> Hi,
>
> I have a small script here that goes to inside dir and sorts the file
> by create date. I can return the create date but I don't know how to
> find the name of that file...
> I need file that is not latest but was created before the last file.
> Any hints... I am newbiw pyth
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpickery that it's hard to
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
> It just sounds like so much trivial nitpickery that it's hard to
Hi all
I noticed something strange here while explaining decorators to someone.
Not any real use code, but I think it's worth mentioning.
When I access a class attribute, on a class with a custom metaclass with
a __getattribute__ method, the method is used when acessing some
attribute directly
infidel wrote:
> Where are they-who-hate-us-for-our-whitespace? Are "they" really that
> stupid/petty? Are "they" really out there at all? "They" almost sound
> like a mythical caste of tasteless heathens that "we" have invented.
All societies demonise outsiders to some extent. It's an unfortu
Jason wrote:
> He points out that if some code gets accidentally dedented, it is
> difficult for another programmer to determine which lines were supposed
> to be in the indented block. I pointed out that if someone
> accidentally moves a curly brace, the same problem can occur.
I like significan
manuhack wrote:
> When I use raw_input('Please type something.\n') in the python 2.4
> command line windows, it doesn't have any problem. However, when I run
> the same command in vim 7 as :py raw_input('Please type something.\n'),
> there is an EOFError: EOF when reading a line. Is there a way t
Martin v. Löwis wrote:
> [EMAIL PROTECTED] schrieb:
> > I am trying to create a subclass of a python class, defined in python,
> > in C++, but I am having some problems.
>
> Is the base class a classic class or a new-style class? Depending on
> the answer, the code you should write varies significa
While looking for an elegant implementation of the singleton design pattern I came across the decorator as described in PEP318.Unfortunately, the following does not work, because decorators only work on functions or methods, but not on classes.
def singleton(cls):instances = {}def getinstan
Andre Meyer wrote:
> Am I missing something here? What is the preferred pythonic way of
> implementing singleton elegantly?
The "Open Issues" section of that PEP says the following:
"It's exceedingly unlikely that class decorators will be in Python 2.4"
So it might not be in the current version
"infidel" <[EMAIL PROTECTED]> writes:
> It just sounds like so much trivial nitpickery that it's hard to
> believe it's as common as we've come to believe.
As others have pointed out, these people really do exist, and they
each believe their preconception -- that significant whitespace is
intrins
[EMAIL PROTECTED] wrote:
> Jason wrote:
> > He points out that if some code gets accidentally dedented, it is
> > difficult for another programmer to determine which lines were supposed
> > to be in the indented block. I pointed out that if someone
> > accidentally moves a curly brace, the same pr
Andre Meyer:
> What is the preferred pythonic way of implementing singleton elegantly?
Maybe to just use a module.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
I need to process a HTML form in python. I'm using urllib2 and
HTMLParser to handle the html. There are several steps I need to take
to get to the specific page on the relevant site the first of which is
to log in with a username/password. The html code that processes the
login consists of 2 edit b
Jason wrote:
> But newsgroup managers are certainly an issue.
> For comment thingies online, the preformat tag is your friend, too.
Time ago I used to add a | or something similar at the beginning of
lines, to avoid the leading whitespace stripping done by Google Groups.
Other (silly) solutions ar
1 - 100 of 134 matches
Mail list logo