rror prone) it would have been had
there been some pre-existing crossplatform module.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Frederik's
examples
Peter
--
http://mail.python.org/mailman/listinfo/python-list
that isp
subscription about a year ago. But the email I cite there has been
abandoned to spam now.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
t petulant - not intended, but I
am genuinely perplexed as to why this is such a show stopper.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
the Linux messages
spurious, and if so how can I suppress them and ensure they do not
slow the running of the code?
Grateful for any help - preferably not too technical.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
F, for example):
> webbrowser.open(r'file://' + fileName)
> starts Acrobat Reader with the document read in. I have no idea why,
> because Acrobat Reader sure ain't my browser;)
>
> Maybe someone could try this out on Linux.
>
> Cheers,
> Jussi
Works on Ubuntu -- this opens a tab in my browser and then launches
Document Viewer to view the PDF.
[EMAIL PROTECTED]:~$ python
Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02)
[GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.open(r'file:///home/peter/appa.pdf')
>>>
--
http://mail.python.org/mailman/listinfo/python-list
colleagues, and that in places the
documentation
is too sparse to be of much help.
Any thoughts? Is my experience typical?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
different computers; Win95,
Win98, WinXP, Mac, Linux.
So, would python be a good choice for this, and how should I go about it?
I'm not a programmer and have only done a few little python scripts that
run from the command line.
TIA
Peter
--
http://mail.python.org/mailman/listinfo/python-list
suggest another language or approach?
TIA
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Serge Orlov wrote:
> Peter wrote:
>> A webapp isn't feasible as most of the users are on dial up (this is in
>> New Zealand and broadband isn't available for lots of people).
>
> I don't see connection here, why it's not feasible?
Our volunteers won'
error messages to assist in diagnosing the
problem. At times I have been reduced to writing new code a line at a
time!
I'm sure there is an easy solution to this problem, but googling has
yet to reveal it. Can anyone help?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
> import sys
> sys.stdout = open("stdout.log","w")
> sys.stderr = open("stderr.log","w")
> print "This goes to stdout"
> print >>sys.stderr, "This goes to stderr"
>
This did the trick. Thanks
Peter
--
http://mail.python.org/mailman/listinfo/python-list
implement this with the
python interpreter.
I am hoping to be proven wrong
Thanks in advance
Greets
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ools that create embedded python
applications could better document this issue, so that people using
embedded applications will know that they have to install the proper run
time libraries. It's also possible that Microsoft will someday install
these new Visual Studio 2008 run time libraries via their update service
or a future service pack.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
aware of the problems of using datetime and timestamps)
Could some kind soul please enlighten me?
peter.
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 25, 3:46 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> peter wrote:
> >>>> import datetime
> >>>> class ts(datetime.datetime):
> > ... foo = 'bar'
> > ... def __new__(cls, s):
> > ... c = super(ts, cls
On Nov 25, 4:39 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> peter wrote:
> > On Nov 25, 3:46 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> >> peter wrote:
> >> >>>> import datetime
> >> >>>> class ts(datetime
On Nov 25, 4:44 pm, [EMAIL PROTECTED] wrote:
> I want my productivity back.
>
> In Python 2.x, I could easily write things like -- print "f" / print
> "add" / print "done" -- to a lot of different places in my code, which
> allowed me to find bugs that I could not track otherwise. When I found
> ou
On Nov 25, 5:16 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> peter wrote:
> >> >>> from datetime import *
> >> >>> class TS(datetime):
>
> >> ... def __new__(cls, ts):
> >> ... return datetime.fromtimesta
On 15 Maj, 19:37, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-05-15, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I have a small but rather annoying problem withpyserial. I want to
> > open a file on disk for reading and then open a com-port, write lines
> > from the file to the port a
AFAIK pdb only can do postmortem debugging if fed a Python stack
trace. Is there any way to obtain such a stack trace if all you've got
is a core dump?
Or, put another way: can I do post-mortem debugging from a core dump?
Thanks,
peter.
--
http://mail.python.org/mailman/listinfo/python-list
Bump
Has noone ever needed this?
On Jun 9, 10:58 am, peter <[EMAIL PROTECTED]> wrote:
> AFAIK pdb only can do postmortem debugging if fed a Python stack
> trace. Is there any way to obtain such a stack trace if all you've got
> is a core dump?
>
> Or, put another
I'm wondering if someone can tell me whether the following set of
regex substitutions is possible. I want to convert parallel legal
citations into single citations. What I mean is, I want to change, e.g.:
"Doremus v. Board of Education of Hawthorne, 342 U.S. 429, 434, 72
S. Ct. 394, 397, 96 L.E
Tim Chase wrote:
>> What I mean is, I want to change, e.g.:
[snip regular expressions lesson]
>
Whoa. That is super-duper extra cool. Thank you *very* much.
--
http://mail.python.org/mailman/listinfo/python-list
ython2.6/optparse.py", line 1578, in error
self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
File "/usr/local/python2.6/lib/python2.6/optparse.py", line 1568, in exit
sys.exit(status)
SystemExit: 2
>> begin captured stdout <<
r-man's Singleton Logger class ( see Python Cookbook 2nd edition
p.275), so I rebind 'logger' to the only instance of its class.
What's the problem ?
Thanks
Peter
--
http://mail.python.org/mailman/listinfo/python-list
What's the problem ?
Please provide the config file "logging.cfg" to ease debugging.
Peter
Here it is, thanks for having a look
Peter
# supports no whitespace !!!
[DEFAULT]
logdir=/tmp
logfile=python
logging_server=localhost
[loggers]
keys=root,module,class,data
you want external help please
(1) make sure that you provide all necessary files needed to reproduce the
error
(2) remove as much of the code as possible that does not contribute to the
problem. (This is also an effective debugging technique)
Peter
(1), (2): That is sometimes easier said than
On 12/21/2009 08:35 AM, Gabriel Genellina wrote:
En Sat, 19 Dec 2009 00:18:26 -0300, Peter escribió:
This was somehow unexpected for me, since in a module using
logger.py, I could use either import:
from mylogger import logger # without package name
or
from of.mylogger import logger
be prefered for new projects ?
thanks
peter
--
http://mail.python.org/mailman/listinfo/python-list
for myself, I am using python coded configuration
files, but: we all worship python in the team and thus are familiar
with it.
so do I.
JM
So what is the "worshipped" approach, when you need more than name=value
pairs ?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
a
rather large opensource library for natural language processing ( sorry
forgot the exact name,but easy to find on the net)
All these book make you feel warm and confortable if you have ever tried
to do these things in Perl, C++ or Java
Peter
--
http://mail.python.org/mailman/listinfo/python-list
have additional .ini files,
,possibily several in different locations, for simpler options in
name,value format.
Has anybody experiences with other tools that use this approach ?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
What editor do people out there use to edit .rst files for sphinx-python
documentation ?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
turned out that the point is not "scripting versus not
scripting" or "static versus dynamic typing" but having automatic
unittests or not having automatic unittests. My most important module is
"nose" for running unittests the easy way.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On 01/08/2010 03:57 PM, r0g wrote:
Chris Rebert wrote:
On Thu, Jan 7, 2010 at 10:19 AM, Peter wrote:
The .ini file is the simpliest solution, at least from the user point of
view, no need to learn any python syntax.
I am speaking from the point of view of a python
On 01/09/2010 03:32 AM, Florian Diesch wrote:
Peter writes:
What editor do people out there use to edit .rst files for
sphinx-python documentation ?
Emacs with ReST mode and YASnippet
Florian
Great, works very well and thanks for mentionning YASnippets ( useful
for many
ducing GUIs
using Python and Tkinter - so it still does an excellent job for that
even though I have abandoned the GUI application framework that John
provides in his book (I used it once for my first GUI, but these days
use Pmw more for my GUIs).
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 15, 6:24 am, Mark Roseman wrote:
> Peter wrote:
> > Besides, the book is mainly about using Python with Tkinter - and
> > Tkinter hasn't changed that much since 2000, so I believe it is just
> > as relevant today as it was back then.
>
> I'd say t
prior to exit. After
the join() just read the results from the queue.
Using a queue or pipe is just a suggestion, the multiprocessing module
offers numerous ways to communicate between tasks, have a read and
pick whatever mechanism seems appropriate for your situation.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 15, 9:12 am, Kevin Walzer wrote:
> On 1/14/10 3:39 PM, Peter wrote:
>
>
>
>
>
> > On Jan 15, 6:24 am, Mark Roseman wrote:
> >> Peter wrote:
> >>> Besides, the book is mainly about using Python with Tkinter - and
> >>> Tkinter has
uld be to run everything in a loop i.e. place
all the commands into a list and create a loop that ran each command
in the list.
Almost all editors support macros - most editors support some form of
language sensitive editing (NOT the prompt call parameters style but
rather help with the syntax via a 'form' style of fill-in) that will
allow you to reduce typing effort. But macros would be the first and
easiest choice for this activity.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
e (x, y):
return x / y
The programmer obviously assumed that y will never be 0 - so with one
simple example you teach two points:
1. how an assert can be used
2. when programming look for unconscious assumptions
Peter
P.S. You also raise an interesting issue in my mind when quoting Knuth
and sit
this list so they can
propose something else.
They can also grade the submissions against the code kept in this area
- exact copies could receive an "F" (for example :-))
Peter
--
http://mail.python.org/mailman/listinfo/python-list
hout any problems and used the advanced compile option.
Is anyone else having trouble with the 2.6.5 Windows x86 installer?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
:\bin\Python26\Lib"
So it appears that the Windows XP shell is interpreting the "|"
characters within the -x option's args as pipe characters and trys to
pipe the "multiple commands" together. The simple work around is to not
use the Advanced compiling option.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ed it for the zipfiles by using
zipfile.getinfo to read the original date then os.utime to rewrite
it. It seems rather messy - have I missed something simple like a
flag setting within zipfile?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ely readable forever, and to be that
> they need to be in a widely used, open format.
I agree, but if a file is only available as a rar archive I would like
to be able to extract it without using another 3rd party application.
peter
--
http://mail.python.org/mailman/listinfo/python-list
X():
execfile('test-data.py')
print data
where test-data.py is:
data = [1,2,3,4]
I checked help on execfile and could only find the following
(mystifying) sentence:
"execfile() cannot be used reliably to modify a function’s locals."
Thanks
Peter
--
http://mail.python.org/mailman/listinfo/python-list
This one seems to do the trick - thanks! :-)
On Jun 16, 10:12 am, Inyeol Lee wrote:
> On Jun 15, 3:22 pm, Peter wrote:
>
>
>
>
>
> > I am puzzled by what appears to be a scope issue - obviously I have
> > something wrong :-)
>
> > Why does this work:
>
de to work with. One day when I have run out of other
(programming) things to do I might investigate this :-)
Anybody else now of any better ideas or whatever? Now that I think
about it, I wouldn't mind using folding mode if I could make it
"easier" to use myself! :-)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 16, 6:40 am, Nonpython wrote:
> 1: Try to learn lambda calculus
> 2: Fail to learn lambda calculus
> 3: Sit in corner rocking
> 4: Consider suicide.
You forgot:
5: (quietly) drooling
But then that might be part of the advanced course? I really can't
remember, my PHD in 'lambda calculus'
out getting a MemoryError
This seems like a bug in pickle?
Any ideas (other than the obvious - don't save all of these files
contents into a list! Although that is the only "answer" I can see at
the moment :-)).
Thanks
Peter
--
http://mail.python.org/mailman/listinfo/python-list
n't
seem to know any better, but then the signs of the breakdown of
society surround us on a daily basis and I guess C++ is just another
signpost on the way...
Peter
--
http://mail.python.org/mailman/listinfo/python-list
from the very beginning - something that
many programmers find an abhorrence for :-) But I always used to tell
people - by the time I got a program to compile then I figured 99% of
the bugs were already discovered! Try that with C/C++ or almost any
other language you care to name :-)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 9, 6:49 am, Terry Reedy wrote:
> On 8/7/2010 7:53 AM, Peter Otten wrote:
>
>
>
> > You mean you'd go for the candidate who took the conservative approach and
> > got it right:
>
> > print 1
> > print 2
> > print 'Fizz'
> >
On Aug 9, 10:39 am, Steven D'Aprano wrote:
> On Sun, 08 Aug 2010 17:28:59 -0700, Peter wrote:
> > On Aug 9, 6:49 am, Terry Reedy wrote:
> >> On 8/7/2010 7:53 AM, Peter Otten wrote:
>
> >> > You mean you'd go for the candidate who took the co
id not match.
This was one of the many reasons why I decided on a career change and
went back to being a dumb and happy programmer! That was 14 years ago
now and I haven't regretted the decision one single day of that
time :-)
Peter
On Aug 11, 6:44 am, J Kenneth King wrote:
> James Mill
tform
compatibility may not be such a big deal.
I would strongly recommend reading the Python Wiki page on GUI
programming: http://wiki.python.org/moin/GuiProgramming
Peter
--
http://mail.python.org/mailman/listinfo/python-list
g them for you - big investment for zero return.
So I would recommend to anybody that they attempt to maintain a stable
work history in this respect. For example, my personal work history is
8, 7.5, 8.5, 0.5, 3, 3, 8 (years that is). My current company is
extremely stable, I enjoy the work, so I don't see any reason why I
won't be here until I retire (or die at my desk - whichever comes
first :-)).
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Just got a new computer and I'm trying to download my favourite
applications. All's well until I get to PIL, and here pythonware and
effbot both return a 502 Proxy error.
Is this just a temporary glitch, or something more serious? And if
it's the latter, is there any alternative
Whilst this is an interesting discussion about installers, I'm still
trying to find a copy of PIL. Any ideas?
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for this - looks promising. But I've just tried pythonware
again and it's back up - so it was just a glitch after all.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
o even start on this one.
Thanks for any help/pointers
Peter
--
http://mail.python.org/mailman/listinfo/python-list
tup = good combination! :-)
Hope this helps
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Hi experts,
i want to ask you if somebody knows how can I determine, with a help
of xlrd, what kind of decimal separator (. or ,) does the user have.
Thx in advance.
Rg,
Peter
--
http://mail.python.org/mailman/listinfo/python-list
this?
Also, John Shipman's Tkinter reference shows the Radiobutton drawn as
a diamond and yet when I create one in Windows I get a circle - again,
how and where do I need to look to change this behaviour?
Thanks
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 28, 12:31 pm, Steven D'Aprano wrote:
> On Mon, 27 Sep 2010 15:28:34 -0700, Eduardo Ribeiro wrote:
> > But it doesn't work.
>
> What do you mean "doesn't work"?
>
> - It crashes the operating system;
> - You get a core dump;
> - You get an exception;
> - It hangs forever, never doing anythin
2, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ConfigParser import ConfigParser
>>> p = ConfigParser()
>>> p.read("~/tmp.config")
[]
>>> import os
>>> p.read(os.path.expanduser("~/tmp.config"))
['/home/peter/tmp.config']
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith wrote:
> In article ,
> Sudheer Joseph wrote:
>
>> Dear members,
>> I need to print few arrays in a tabular form for example
>> below array IL has 25 elements, is there an easy way to print
>> this as 5x5 comma separated table? in python
>>
>> IL=[
On Mon, 13 May 2013 10:59:33 -0500, Jonathan Hayward wrote:
> --e89a8f3b9db145cbab04dc9b9a23
> Content-Type: text/plain; charset=windows-1252
> Content-Transfer-Encoding: quoted-printable
>
[snipped many lines of quoted-printable muck]
> My code is below. What should I be doing differently to be,
Olive wrote:
> One feature that seems to be missing in the re module (or any tools that I
> know for searching text) is "diacretical incensitive search". I would like
> to have a match for something like this:
>
> re.match("franc", "français")
>
> in about the same whay we can have a case incens
Jurgens de Bruin wrote:
> This is my first script where I want to use the python threading module. I
> have a large dataset which is a list of dict this can be as much as 200
> dictionaries in the list. The final goal is a histogram for each dict 16
> histograms on a page ( 4x4 ) - this already w
Jurgens de Bruin wrote:
> I will post code - the entire scripts is 1000 lines of code - can I post
> the threading functions only?
Try to condense it to the relevant parts, but make sure that it can be run
by us.
As a general note, when you add new stuff to an existing longish script it
is alw
Dan Stromberg wrote:
> I'm getting the error in the subject, from the following code:
> def add(self, key):
> """
> Adds a node containing I{key} to the subtree
> rooted at I{self}, returning the added node.
> """
> node = self.find(key)
> if not
Dan Stromberg wrote:
> python 2.x, python 3.x and pypy all give this same error, though jython
> errors out at a different point in the same method.
By the way, 3.x doesn't have unbound methods, so that should work.
--
http://mail.python.org/mailman/listinfo/python-list
Cameron Simpson wrote:
> TL;DR: I think I want to modify an int value "in place".
>
> Yesterday I was thinking about various "flag set" objects I have
> floating around which are essentially bare "object"s whose attributes
> I access, for example:
>
> flags = object()
> flags.this = True
>
Absalom K. wrote:
> Hi, I am working on Linux; a friend of mine sends to me python files from
> his Windows release. He uses the editor coming with the release; he runs
> his code from the editor by using a menu (or some F5 key I think).
>
> He doesn't declare any encoding in his source file; whe
Alex Naumov wrote:
> I'm trying to call new process with some parameters. The problem is that
> the last parameter is a "string" that has a lot of spaces and different
> symbols like slash and so on. I can save it in file and use name of this
> file as parameter, but my question is: how to make it
lokeshkopp...@gmail.com wrote:
> i had written the following code i am unable to create the instance of the
> class "Node" in the method "number_to_LinkedList" can any one help me how
> to do ?? and what is the error??
>
>
> class Node:
> def __init__(self, value=None):
> self.valu
What is the easiest way to reorder a sequence pseudo-randomly?
That is, for a sequence 1,2,3,4 to produce an arbitrary ordering (eg
2,1,4,3) that is different each time.
I'm writing a simulation and would like to visit all the nodes in a
different order at each iteration of the simulation to remo
I'm designing a system that should allow different views to different
audiences. I understand that I can use application logic to control
the access security, but it seems to me that it'd make more sense to
have this documented in the data-stream so that it's data-driven.
I was wondering if there
Thank you all for those most helpful suggestions! random.shuffle does
precisely the job that I need quickly. Thank you for introducing me to
itertools, though, I should have remembered APL did this in a symbol
or two and I'm sure that itertools will come in handy in future.
Thanks for the warnings
On May 24, 5:00 pm, Carlos Nepomuceno
wrote:
>
>
> I don't know what "spurious evidence of correlation" is. Can you give a
> mathematical definition?
>
If I run the simulation with the same sequence, then, because event E1
always comes before event E2, somebody might believe that there is a
causa
On May 24, 6:42 pm, Michael Torrie wrote:
> On 05/24/2013 02:18 AM, Peter Brooks wrote:
>
> > I'm designing a system that should allow different views to different
> > audiences. I understand that I can use application logic to control
> > the access security, but
On May 24, 6:13 pm, Carlos Nepomuceno
wrote:
> Not exactly what you want but you may consider Google ACL XML[1].
>
> If there aren't any system integration restrictions you can do what you think
> it's best... for now.
>
> [1]https://developers.google.com/storage/docs/accesscontrol#applyacls
>
Th
On May 24, 11:33 pm, Carlos Nepomuceno
wrote:
>
>
>
>
>
>
>
>
>
>
> > Date: Fri, 24 May 2013 12:01:35 -0700
> > Subject: Re: Simple algorithm question - how to reorder a sequence
> > economically
> > From: peter.h.m.bro...@gmail.com
> > To: python-l...@pyt
Νίκος Γκρ33κ wrote:
> Hello this is the following snippet that is causing me the error i mention
> in the Subject:
> print( " color=tomato size=5> %s " ) % (url, url)
Hint (Python 3):
>>> print("a=%s, b=%s") % (1, 2)
a=%s, b=%s
Traceback (most recent call last):
File "", line 1, in
TypeError
Νίκος Γκρ33κ wrote:
> Thank you very much Peter, so as it seems in Python 3.3.1 all
> substitutuons must be nested in print().
Yes; in other words:
In Python 3 print() is a function.
--
http://mail.python.org/mailman/listinfo/python-list
I'm not sure if this'll interest anybody, but I expect that I'm going
to get some mutual recursion in my simulation, so I needed to see how
python handled it. Unfortunately, it falls over once it detects a
certain level of recursion. This is reasonable as, otherwise, the
stack eventually over-fills
Νίκος Γκρ33κ wrote:
> python3 pelatologio.py gives me error in this line:
>
> Traceback (most recent call last):
> File "pelatologio.py", line 283, in
> ''' % (months[key], key) )
> KeyError: 1
>
> The code is:
>
> #populating months into a dropdown menu
> years = ( 2010, 2011,
On May 26, 5:09 pm, Jussi Piitulainen
wrote:
>
> A light-weighter way is to have each task end by assigning the next
> task and returning, instead of calling the next task directly. When a
> task returns, a driver loop will call the assigned task, which again
> does a bounded amount of work, assig
On 26 May, 20:09, Carlos Nepomuceno
wrote:
>
>
>
>
>
>
>
>
>
>
> > Date: Sun, 26 May 2013 10:21:05 -0700
> > Subject: Re: Solving the problem of mutual recursion
> > From: peter.h.m.bro...@gmail.com
> > To: python-l...@python.org
>
> > On May 26, 5:09 pm, J
On 26 May, 20:22, Carlos Nepomuceno
wrote:
>
>
> > Date: Sun, 26 May 2013 11:13:12 -0700
> > Subject: Re: Solving the problem of mutual recursion
> > From: peter.h.m.bro...@gmail.com
> > To: python-l...@python.org
> [...]
> >> How can you get 140% of CPU? I
On May 27, 12:16 am, Chris Angelico wrote:
> On Mon, May 27, 2013 at 5:35 AM, Ian Kelly wrote:
> > I'm pretty sure that CPython uses the GIL regardless of platform. And
> > yes you can have multiple OS-level threads, but because of the GIL
> > only one will actually be running at a time. Other
JackM wrote:
> Having a problem getting a py script to execute. Got this error:
>
> File "/scripts/blockIPv4.py", line 19
> ip = line.split(';')[0]
> ^
> IndentationError: expected an indented block
>
>
> I'm perplexed because the code that the error refers to *is* indented:
>
>
>
Chris Angelico wrote:
> On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote:
>> Solution: configure your editor to use four spaces for indentation.
>
> ITYM eight spaces.
I meant: one hit of the Tab key should add spaces up to the next multiple of
four.
Luca Cerone wrote:
>>
>> That's because stdin/stdout/stderr take file descriptors or file
>>
>> objects, not path strings.
>>
>
> Thanks Chris, how do I set the file descriptor to /dev/null then?
For example:
with open(os.devnull, "wb") as stderr:
p = subprocess.Popen(..., stderr=stderr)
Serhiy Storchaka wrote:
> 30.05.13 23:46, Skip Montanaro написав(ла):
>> Am I missing something about how io.StringIO works? I thought it was
>> a more-or-less drop-in replacement for StringIO.StringIO.
>
> io.StringIO was backported from Python 3. It is a text (unicode) stream.
> cStringIO.Stri
Chris Angelico wrote:
> On Tue, Jun 4, 2013 at 5:57 PM, John Ladasky
> wrote:
>> On Tuesday, June 4, 2013 12:45:38 AM UTC-7, Anssi Saari wrote:
>>
>>> BTW, did I get the logic correctly, the end result is random?
>>
>> You're right! I'm guessing that's not what the OP wants?
>
> I'm guessing th
101 - 200 of 9315 matches
Mail list logo