Re: stderr writting before stdout

2020-05-24 Thread Dylan Evans
Hi, This data is being line buffered, so either a newline or flush is required to get it to actually write to the terminal / file. On Sun, May 24, 2020 at 2:34 PM Souvik Dutta wrote: > Also this code maintains order i.e. writting is displayed before no errors. > Why is that? > > import sys > sys

Re: Python-list Digest, Vol 139, Issue 7

2015-04-06 Thread Dylan Evans
understanding and my apologies once again. I hope my attempt at help was at least readable. (Also sorry if I’m committing another faux pas by clogging up the list but I had to apologise!) — Dylan Evans -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to deliver different source distributions for different Python versions?

2015-04-06 Thread Dylan Evans
y. This will run 2to3 on the code when it installs it. I don’t know whether this is good style but it does work. I got it from the feedparser source code.  --  Dylan Evans On 6 April 2015 at 11:05:47, python-list-requ...@python.org (python-list-requ...@python.org) wrote: Send Python-list mailing

Re: USBLock : lock/unlock your computer with a USB key

2013-04-12 Thread Dylan Evans
On Fri, Apr 12, 2013 at 6:16 AM, Ian Kelly wrote: > On Thu, Apr 11, 2013 at 9:23 AM, Ethan Furman wrote: > > On 04/11/2013 04:13 AM, Sven wrote: > >> > >> Yes, I had the idea to add bluetooth too, removes the whole plugging and > >> unplugging spiel. I might start work on that, > >> and if anyon

Re: USBLock : lock/unlock your computer with a USB key

2013-04-11 Thread Dylan Evans
This looks cool, would actual be pretty useful. I see you did it as a usb project but probably bluetooth would be better so you could just pair it to your phone and know that your PC will lock when you walk away. On Tue, Apr 9, 2013 at 1:21 AM, Sven wrote: > I've been working on a little proje

Re: is "_io.py" missing from 2.7.4 ?

2013-04-08 Thread Dylan Evans
On Mon, Apr 8, 2013 at 11:12 PM, dbv wrote: > In 2.7.4, io.py shows: > > import _io > import abc > > from _io import (DEFAULT_BUFFER_SIZE, BlockingIOError, > UnsupportedOperation, > open, FileIO, BytesIO, StringIO, BufferedReader, > BufferedWriter, BufferedRWPair

Re: subprocess question re waiting

2013-04-08 Thread Dylan Evans
On Mon, Apr 8, 2013 at 10:22 PM, Dave Angel wrote: > On 04/08/2013 08:01 AM, Dylan Evans wrote: > >> On Mon, Apr 8, 2013 at 9:48 PM, Alain Ketterlin < >> al...@dpt-info.u-strasbg.fr >> >>> wrote: >>> >> >> loial writes: >>> >

Re: Can anyone please help me in resolving the error => AttributeError: Array instance has no attribute '__trunc__'

2013-04-08 Thread Dylan Evans
On Mon, Apr 8, 2013 at 8:07 PM, wrote: > I am trying to create 2D arrays without using advanced features like > numpy, for this I have created 2 separate modules arrays.py and array2D.py. > Here's the code for that: > > arrays.py module: > == > import ctypes > > class Array: > > #

Re: subprocess question re waiting

2013-04-08 Thread Dylan Evans
On Mon, Apr 8, 2013 at 9:48 PM, Alain Ketterlin wrote: > loial writes: > > > I want to call a child process to run a shell script and wait for that > > script to finish. Will the code below wait for the script to finish? > > If not then how do I make it wait? > [...] > > process = subprocess.Pop

Re: parse the file

2013-04-07 Thread Dylan Evans
You can read the fantastic manual at http://docs.python.org/2/library/xml.etree.elementtree.html or i'm sure someone will do it for a modest fee. On Sat, Apr 6, 2013 at 3:11 PM, 水静流深 <1248283...@qq.com> wrote: > I have an xml file . http://s.yunio.com/bmCS5h > > It is

Re: I hate you all

2013-04-06 Thread Dylan Evans
pretty happy to adopt a language which defines a sane style. This is a nice flame war you have stirred up. On Sat, Apr 6, 2013 at 3:13 PM, wrote: > On Saturday, April 6, 2013 7:28:55 AM UTC+3, Dylan Evans wrote: > > On Sat, Apr 6, 2013 at 7:41 AM, wrote: > > > > Hell

Re: HTTPserver: how to access variables of a higher class?

2013-04-06 Thread Dylan Evans
On Sun, Apr 7, 2013 at 1:05 AM, Tom P wrote: > On 04/05/2013 02:27 PM, Dylan Evans wrote: > >> On 05/04/2013 9:09 PM, "Tom P" wrote: >> >>> >>> First, here's a sample test program: >>> >>> import sys >>&g

Re: I hate you all

2013-04-05 Thread Dylan Evans
On Sat, Apr 6, 2013 at 7:41 AM, wrote: > Hello > > I just tried python 3.3 with some simple script meant for unit test. > > How can python authors be so arrogant to impose their tabs and spaces > options on me ? It should be my choice if I want to use tabs or not ! > > Don't like it? Use ruby.

Re: Trying to understand working with dicts

2013-04-05 Thread Dylan Evans
On Fri, Apr 5, 2013 at 10:34 PM, inshu chauhan wrote: > Hello everyone, > > Here in my part of the code where cc is a dictionary. I want to understand > what actually cc.iterkeys() and cc[k] actually doing. > I am already reading > http://docs.python.org/2/library/stdtypes.html#dict.items > and ht

Re: Run python script with ./

2013-04-05 Thread Dylan Evans
On Sat, Apr 6, 2013 at 1:04 AM, LubanWorks wrote: > > > > My question is: > > Why when I use #!/home/luban/Linux/Python/2.7.3/bin/python at the > beginning of myscript.py, *./*myscript.py can work, > > but if I use the wrapper #!/home/luban/bin/python in my python script, use > *./* to run the s

Re: HTTPserver: how to access variables of a higher class?

2013-04-05 Thread Dylan Evans
On 05/04/2013 9:09 PM, "Tom P" wrote: > > First, here's a sample test program: > > import sys > from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler > > class MyRequestHandler(BaseHTTPRequestHandler, object): > def do_GET(self): > top_self = super(MyRequestHandler, self) # tr

Re: Aborting Python from C code

2011-04-30 Thread Dylan Evans
I think i see what you are trying to do but it depends on the environment and your goals. Generally i think you need to separate your code by forking (or perhaps you have already done that?), then you can run a check to see if the process died as expected. I don't know though, this not much inform

Re: Mail Merge from python data

2010-11-03 Thread Dylan Evans
On Wed, Nov 3, 2010 at 3:20 PM, Tim Harig wrote: > This page didn't make it to through to my nntp server so I appologize if I > miss something that was covered. > > On 2010-11-03, Dennis Lee Bieber wrote: > > On Tue, 2 Nov 2010 20:32:13 +1000, Dylan Evans > &g

Mail Merge from python data

2010-11-02 Thread Dylan Evans
I'm setting up a database for an organisation who want to do mail merges in office 2010. I know i can use the MySQL ODBC driver for the mail merge but i have set up the database with lots of relations and many-to-many links which i'm sure will lead to a huge amount of confusion (I think, i don't re