Re: Parallel port programming on windows XP/2000?

2005-08-03 Thread Neil Benn
you are on about you access ports through the win32 API which is the 'driver' - you could probably bypass this and start playing around with assembly code but there's no point!! Cheers, Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum T

PEP: Generalised String Coercion

2005-08-06 Thread Neil Schemenauer
The title is perhaps a little too grandiose but it's the best I could think of. The change is really not large. Personally, I would be happy enough if only %s was changed and the built-in was not added. Please comment. Neil PEP: 349 Title: Generalised String Coercion Version: $Rev

Re: Python -- (just) a successful experiment?

2005-08-07 Thread Neil Hodgson
rails http://download.rubyonrails.com/ Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: How to determine that if a folder is empty?

2005-08-07 Thread Neil Hodgson
always contain "." and ".." entries so they should be ignored. On other platforms there will be similar low level functions. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: How to determine that if a folder is empty?

2005-08-08 Thread Neil Hodgson
could ildg > so you mean that this is not platform-independent? Your existing code is platform-independent but I think for faster code you will need to write platform-dependent code. FindFirstFile is only available on Windows. Neil -- http://mail.python.org/mailman/listinfo/pyt

Re: Decline and fall of scripting languages ?

2005-08-08 Thread Neil Benn
All you had to do was >find out which stock he was recommending, then short it. > > > Err, that's not what is meant by enterprise, it's a catch all term for large distributed systems, take a look at the link below for an idea of this: http://java.sun.com/j2ee/faq.html

epyDoc Questions

2005-08-08 Thread Neil Benn
27;t in there, they are in the fifth argument to the property method (I can manually do this using sections but is there a tag I can use?) Cheers for your help, Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 47 D-01307 Dresden German

Re: .pth files

2005-08-09 Thread Neil Benn
ing release management easier. However this solution requires more work. * You could copy the java method using zip files with a manifest in the same way Java uses jar files - I say could because I havn't done this but it is the way I distribute Java apps - nice and clea

Re: Recommendations for CVS systems

2005-08-09 Thread Neil Benn
ave the server running in Apache. To work in SVN with eclipse you will need an eclipse plugin : http://subclipse.tigris.org/#subclipse Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 47 D-01307 Dresden Germany Tel : +49 (0)351 4173 154 e-

Re: What are modules really for?

2005-08-10 Thread Neil Benn
f I find >repetitive tasks I can declare functions, but I won't go for a class >immediately. Why do you think putting code into functions is not >encapsulating? > > > >>While you could do all manner >>of nasty hacks in C++ I worked with people who carefu

Re: new python debugger

2005-08-11 Thread Neil Hodgson
WELLSTART notification. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: What are modules really for?

2005-08-11 Thread Neil Benn
of dangerous features of > languages, but more about the way of using imperative object-oriented >languages in a non-object-oriented way. > > well, in languages like C#, Java and eiffel - you shouldn't really be doing that anyways. that is why they are poor choices for hobbies, h

Re: pywin32 from network install

2005-08-12 Thread Neil Benn
addition, there is a registry setting you need to delete which automagically adds to the python path - it's in HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE. That's probably won't solve your problem but it's somethng to be aware of anyways. Neil -- Neil Benn Senior Automat

Re: Windows message pump problems

2005-08-16 Thread Neil Hodgson
/windows/windowreference/windowfunctions/destroywindow.asp """A thread cannot use DestroyWindow to destroy a window created by a different thread.""" Posting WM_CLOSE to the window will probably work. If not, then send an application defined message to the win

Revised PEP 349: Allow str() to return unicode strings

2005-08-22 Thread Neil Schemenauer
applications and report any incompatibilities. PEP: 349 Title: Allow str() to return unicode strings Version: $Revision: 1.3 $ Last-Modified: $Date: 2005/08/22 21:12:08 $ Author: Neil Schemenauer <[EMAIL PROTECTED]> Status: Draft Type: Standards Track Content-Type: text/plain Created: 02-Aug-200

Re: pythonXX.dll size: please split CJK codecs out

2005-08-23 Thread Neil Benn
than is needed, IMHO, even my handy/mobile phone/cell phone can easily cope with 1.8Mb! Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 47 D-01307 Dresden Germany Tel : +49 (0)351 4173 154 e-mail : [EMAIL PROTECTED] Cenix Website : http://www.cenix-bioscience.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Unix diff command under Window.

2005-08-24 Thread Neil Hodgson
eiving patch files that assume one of Windows or Unix (in terms of path names and line end characters) which then fail to apply on the other platform. I would like to have a version I could hack on. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows/win32all, unicode and long filenames

2005-08-27 Thread Neil Hodgson
.GetShortPathName(mypath), > ... > Looking at the pyWin32 sources, it does look like only the ASCII version > of this function exists, which suggests that for now this route is a > dead-end. All APIs can be accessed through ctypes. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: To the python-list moderator

2005-09-02 Thread Neil Schemenauer
ckly"-filter with a manual "okay, > you're whitelisted for another 24 hours" setup, but it seems to block > messages mostly by random. and some messages don't seem to get > through at all. slightly annoying. Hmm, the message should eventually get through since it ends

Re: Pervasive Database Connection

2005-09-06 Thread Neil Hughes
so I can use that through c-types. -- Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode-aware file shortcuts in Windows

2005-09-16 Thread Neil Hodgson
67 bytes 1 Dir(s) 7,014,309,888 bytes free C:\bin>dir "c:\Těší mě čý żółąźćśęŁ" Volume in drive C has no label. Volume Serial Number is A04B-224D Directory of c:\Těší mě čý żółąźćśęŁ 17/09/2005 09:56 AM . 17/09/2005 09:56 AM ..

Re: Windows paths, Java, and command-line arguments, oh my!

2005-09-21 Thread Neil Benn
. Instead of: cmd = r'java -jar sforcedataloader.jar -Dsalesforce.config.dir=c:\config' os.system(cmd) use cmd = r'java -Dsalesforce.config.dir=c:\\config -jar sforcedataloader.jar' os.system(cmd) Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnova

Re: Windows paths, Java, and command-line arguments, oh my!

2005-09-21 Thread Neil Benn
Neil Benn wrote: >Steve M wrote: > > > >>Well, apparently I fried my brain trying to sort this out. There is a >>typo in my example code in the post but not in my real program. (I know >>it is a no-no when asking help on c.l.py but I simplified some details >

Re: Reportlab and Barcodes

2005-02-09 Thread Neil Benn
the Narrow:Width ratio if you're gonna try and scan the barcode after printing it out - try and get hold of a crappy scanner (I got stung by using a good scanner before in the past). Cheers, Neil -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 46 D-0130

Re: Multi-Platform installer generator

2005-02-11 Thread Neil Benn
there isn't a JVM present on the system - common in windows boxes), installing JRE is a minimal effort and can be done silently - you can remove it the same way after if you wish but often Java installers are used to install Java programs so you don't want to bother doing that. Cheer

Re: SCons build tool speed

2005-02-13 Thread Neil Hodgson
oses. One cause of slowness is that it reads the source files, traces include files and checksums them all rather than relying on file times. There are some things you can do to speed it up: http://www.scons.org/cgi-bin/wiki/GoFastButton Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: For American numbers

2005-02-14 Thread Neil Benn
Scott David Daniels wrote: Kind of fun exercise (no good for British English). what's American about it? If anything, it's more French than American ;-) N -- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 46 D-01307 Dresden Germany Tel : +49 (0)35

Re: os.rename() doesn't work w/unicode??

2005-02-15 Thread Neil Hodgson
!", f ... e:\unicode ! [] ! [u'ko.py', u'abc', u'ascii', u'Gr\xfc\xdf-Gott', u'uni.py', u'\u0393\u03b5\u03b9\u03ac-\u03c3\u03b1\u03c2', u'\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435', u'\u05d4\u05e9\u05e7\u05e6\u05e5\u05e1', u'\u306b\u307d\u3093', u'\u66e8\u05e9\u3093\u0434\u0393\xdf', u'\u66e8\u66e9\u66eb', u'unilin.py'] Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - ULTIMATE RECIPE TO RESOLVE ALL ISSUES

2005-02-18 Thread Neil Hodgson
Peter Maas: > Perhaps we will soon see a triumphant publication with the title > "Ilias Lazaridis - the ELIZA of the 21st century. A milestone towards > the perfect Turing test" ;) as laridis Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode encoding usablilty problem

2005-02-18 Thread Neil Hodgson
ld be used when the input failed to convert to string because of a UnicodeError. Something like def stri(x, enc='us-ascii'): try: return str(x) except UnicodeError: return unicode(x).encode(enc) Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: [EVALUATION] - E02 - Support for MinGW Open Source Compiler

2005-02-20 Thread Neil Hodgson
rt. Grammatical errors are often perceived as rudeness. > Perhaps the question was meant rhetoric. Aghhh! He's got you doing it too. Neil -- Aussie ear for the foreign guy -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythonwin: Red squiggley underline and syntax error

2005-02-28 Thread Neil Hodgson
entred dots. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Share your SciTEGlobal.properties pls~~~~

2005-02-28 Thread Neil Hodgson
ciTEFAQ.html#BlackBackground Adding changes to your user options file rather the global options file means that they will survive if you upgrade to a new version of SciTE. There is a SciTE mailing list at http://mailman.lyra.org/mailman/listinfo/scite-interest Neil -- http://mail.python

Re: looking for expertise

2005-03-02 Thread Neil Hodgson
gt; into system encoding before; This can lead to failure on Windows when the true Unicode file name can not be encoded in the current system encoding. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: looking for expertise

2005-03-02 Thread Neil Hodgson
er input that is not representable in the encoding? It is easy for users to input any characters into a Unicode enabled UI either through invoking an input method or by copying and pasting from another application or character chooser applet. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: PythonWin, AutoDoc and german keyboards...

2005-03-03 Thread Neil Hodgson
default.cfg > didn't help. It appears that the bindings are done by key code rather than character. You may be able to patch this up in pythonwin\pywin\scintilla\keycodes.py Neil -- http://mail.python.org/mailman/listinfo/python-list

[Fwd: Re: quick question]

2005-03-08 Thread Neil Benn
-- Neil Benn Senior Automation Engineer Cenix BioScience BioInnovations Zentrum Tatzberg 46 D-01307 Dresden Germany Tel : +49 (0)351 4173 154 e-mail : [EMAIL PROTECTED] Cenix Website : http://www.cenix-bioscience.com --- Begin Message --- Leeds, Mark wrote: I have a string variable say “8023 “ and

Re: PythonWin line spacing

2005-03-09 Thread Neil Hodgson
are talking about the Interactive Window which is spread out a bit. The line height is determined by the tallest font possible in the window. You could go looking through the code to find all the styles set up for that window. Selecting View | Fixed Font *twice* does tighten up the text.

Re: PythonWin

2005-03-12 Thread Neil Hodgson
urce code, change the dialog resource and recompile PythonWin. Another approach would be to manipulate the dialog and control sizes after creation in pythonwin/pywin/mfc/dialog.py GetSimpleInput(). Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter Bitmap Newbie question

2005-03-14 Thread Neil Hodgson
a format supported by that OS: Windows prefers ICO files. > - Does someone know of a nice downloadable collection of standard glyphs > (Bitmaps for Open file, New file, Save file, ...) with a free license? http://sourceforge.net/projects/icon-collection/ Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: survey of modules to be added to stdlib

2005-03-18 Thread Neil Hodgson
Alia Khouri: > ctypes - Thomas Heller I would like this to go in but it won't be added as it allows unsafe code, such as dereferencing bad pointers. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: gridbaglayout

2004-12-20 Thread Neil Benn
Swing tutorial on the Java tutorials site by sun - that can give you some good starters. Cheers, Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Lowest hassle Python web server?

2005-03-21 Thread Neil Benn
re, I dunno?) The GIL thing makes it easier to do threading with Python (there are disadvantages to the GIL but I won't get into that here - if you're interested read through the history on this group) but it's still threading so beware! Cheers, Neil -- Neil Benn Senior Autom

Re: C type buffer copy

2005-03-22 Thread Neil Hodgson
tring, translation: ''.join([chr(x) for x in range(len)]), or if you are modifying an existing sequence or inserting into a sequence. It is also impossible to tell if you should be using a list, array or string for this job. Neil -- http://mail.python.org/mailman/listinfo/python-list

CGI, FieldStorage and Filename

2005-03-30 Thread Neil Benn
ect\tJob\tBarcode\tPlate set ) As you can see, when __str__ is called, the FieldStorage is displaying the name of the client side file - so it knows what it is, however when I call .filename on it, I get None. I don;t get what is happening here - has anyone else seen this and/or knows what

Re: CGI, FieldStorage and Filename

2005-03-30 Thread Neil Benn
Neil Benn wrote: Hello, I'm writing a simple cgi script and want to be able to access the filename in a FieldStorage file instance. I have successfully manmaged to access the file as a 'file-like object' by using the simple code of : Sorry, split the filename on p

Re: Simple thread-safe counter?

2005-04-02 Thread Neil Benn
Why psuedo code - this is similar to python code I know but it means I'm not posting untested python code!! Cheers, Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: I've broken PythonWin2.4 - Dialogs don't pop up!

2005-04-06 Thread Neil Hodgson
ting? PythonWin can be upset by another non- responding application. A simple thing to try is to remove and reinstall in case you have modified one of the files in Pythonwin. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: I've broken PythonWin2.4 - Dialogs don't pop up!

2005-04-11 Thread Neil Hodgson
n32ui.pyd on the system path? Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: terminate exectutioin in PythonWin

2005-04-13 Thread Neil Hodgson
Jim, > 1.Could someone tell me how to terminate execution in PythonWin? Use the "Break into running code" command on the context menu of the PythonWin icon in the bottom right of the taskbar. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: terminate exectutioin in PythonWin

2005-04-13 Thread Neil Hodgson
debug), > step etc. No, I use PythonWin just as a console and prefer HAP Debugger although it hasn't been updated for Python 2.4. http://hapdebugger.sourceforge.net/ Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser

2005-04-14 Thread Neil Hodgson
d read or destroy your files. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser/security hole

2005-04-15 Thread Neil Hodgson
ermission from Java but it looked complex to me and I doubt many browsers will cooperate. They have often locked security down to prevent this sort of access. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python from a browser/security hole

2005-04-15 Thread Neil Hodgson
y may not have permission to do so. Often they won't know how to allow this so you will have to write up detailed instructions after exploring the area thoroughly yourself. Neil -- http://mail.python.org/mailman/listinfo/python-list

Dr Dobbs "with" keyword

2005-04-15 Thread Neil Hodgson
much experience. While publishing a correction in a future issue would not be very helpful, adding a correction to online and CD-ROM versions would be. If anyone understands the technical review process at DDJ, could they give them a little prod. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: To decode the Subject =?iso-8859-2?Q?=... in email in python

2005-04-20 Thread Neil Hodgson
eader(email.Header.decode_header(sub)) Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: PyGTK vs. wxPython

2005-04-25 Thread Neil Benn
: Hello, Guess he's talking about windows : http://www.dropline.net/gtk/ You will already have a windowing toolkit on windows - mfc/win32. BTW, I cheated and saw a windows related question from above also same poster ;-) Cheers, Neil -- Neil Benn Senior Automation Engineer

Re: win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

2005-04-27 Thread Neil Hodgson
e to fail over to a working place. Neil -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a function for a directory

2013-11-12 Thread Neil Cerutti
create the data file manually, race conditions seem unlikely. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: pypy and ctypes

2013-11-14 Thread Neil Cerutti
de runs and how clever you are at using cython. PyPy isn't designed to speed up programs that run for a few hundred milliseconds and then complete, though it might sometimes work for that. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Automation

2013-11-15 Thread Neil Cerutti
or oats. Also "far too arrogant". I just learned about this kind of error yesterday while browsing the programming reddit! http://en.wikipedia.org/wiki/Muphry's_law -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.3 repr

2013-11-15 Thread Neil Cerutti
hing is utf-8, right? RIGHT?!?" It also has the interesting behavior that indexing strings retrieves bytes, while iterating over them results in a sequence of runes. It comes with support for no encodings save utf-8 (natively) and utf-16 (if you work at it). Is that really enough? -- Neil Cerutti

Re: Automation

2013-11-18 Thread Neil Cerutti
udgeon and maybe overly sensitive, > but I felt a need to vent a bit. The cases where written and spoken English diverge are hotbets of word usage problems. I'm glad the issue doesn't exist for programming languages, which thankfully don't really have a colloquial or spoken v

Re: KeyboardInterrupt close failed in file object destructor: sys.excepthook is missing lost sys.stderr

2013-11-19 Thread Neil Cerutti
thm. Can you show sample input and output? Can you describe the algorithm in plain English? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie - Trying to Help a Friend

2013-11-19 Thread Neil Cerutti
. (13006517)" > > Any help would be appreciated What has A Friend written so far? Where are you stuck? -- Neil Cerutti On Tue, Nov 19, 2013 at 1:40 PM, wrote: > Hi, > > A Friend is doing maths in University and has had some coursework to do with > python. > > The que

Fwd: parsing RSS XML feed for item value

2013-11-20 Thread Neil Cerutti
Larry Wilson itd...@gmail.com via python.org 10:39 PM (10 hours ago) wrote: > > Wanting to parse out the the temperature value in the > " ElementTree or xml.sax. Since you aren't building up a complex data structure, xml.sax will be an OK choice. Here's a quick and dirty job: import io import xm

Re: Using try-catch to handle multiple possible file types?

2013-11-20 Thread Neil Cerutti
ases where entering context is optional, and so also works for this use case. with contextlib.ExitStack() as stack: try: f = gzip.open('blah.txt', 'rb') except IOError: f = open('blah.txt', 'rb') stack.enter_context(f) for line in

Re: Newbie - Trying to Help a Friend

2013-11-21 Thread Neil Cerutti
ies of British children's literature, The Wombles, and a British TV show, Steptoe and Son, but the characters work fine on their own. But even so, I agree that a footnote is a good idea. And I haven't always lived up to that ideal, myself. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: parsing nested unbounded XML fields with ElementTree

2013-11-26 Thread Neil Cerutti
ef process(self, name): print("Node {} Nest {}".format(name, '/'.join(self.names))) # Do your stuff. def endElement(self, name): self.names.pop() print(sys.version_info) handler = NodeHandler() parser = sax.parse(io.StringIO(the_xml), handler) Output: sys.version_info

Re: Wrapping around a list

2013-11-27 Thread Neil Cerutti
nations(s, i+1): print(comb) Output: ('L',) ('E',) ('Q',) ('N',) ('L', 'E') ('L', 'Q') ('L', 'N') ('E', 'Q') ('E', 'N') ('Q', 'N') ('L', 'E', 'Q') ('L', 'E', 'N') ('L', 'Q', 'N') ('E', 'Q', 'N') ('L', 'E', 'Q', 'N') For some reason I've got more 2-character combinations than you, though. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python and PEP8 - Recommendations on breaking up long lines?

2013-11-27 Thread Neil Cerutti
e them. with contextlib.ExitStack() as stack: input = stack.enter_context(open(self.full_path, 'r')) writer = csv.writer(stack.enter_context(open(self.output_csv))) When working with a csv file I like how it removes the output temporary file object variable, though if you needed

Re: Managing Google Groups headaches

2013-12-02 Thread Neil Cerutti
lar, into a low opinion of Google. The crappy usenet portal is poor marketing. I wish they'd never bought dejanews. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Managing Google Groups headaches

2013-12-02 Thread Neil Cerutti
On 2013-12-02, Roy Smith wrote: > In article , > Neil Cerutti wrote: > >> On 2013-11-28, Roy Smith wrote: >> > In article , >> > Alister wrote: >> >> Perhaps the best option is for everybody to bombard Google >> >> with bug repor

Re: Python Unicode handling wins again -- mostly

2013-12-03 Thread Neil Cerutti
point sequence into one, and normalizing can lose or mangle information. There are good examples here: http://unicode.org/reports/tr15/ > Thanks for this excellent post. Agreed. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
> else: > SystemExit > > The input and output is as wanted, but my answer keep rejected, > here is my source code http://txt.do/1smv No, your program outputs nothing. That's bound to fail. ;) How is your program supposed to work, in your own words? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: The input and output is as wanted, but why error?

2013-12-03 Thread Neil Cerutti
On 2013-12-03, geezl...@gmail.com wrote: >> x = input() Your first problem is that input() returns text only up the a newline, and then stops. So you are reading the initial number line, but never reading the rest of the lines. -- Neil Cerutti -- https://mail.python.org/mailman/li

Re: [OT] Managing Google Groups headaches

2013-12-04 Thread Neil Cerutti
cost of switching isn't zero, but it's much easier than emmigrating from a police state. Moreover, I'll always feel that I deserve more than I actually do deserve. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Unicode handling wins again -- mostly

2013-12-04 Thread Neil Cerutti
On 2013-12-04, wxjmfa...@gmail.com wrote: > Yon intuitively pointed a very important feature of "unicode". > However, it is not necessary, this is exactly what unicode does > (when used properly). Unicode only provides character sets. It's not a natural language par

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-04 Thread Neil Cerutti
ntifiers as attributes is generally a bad idea, not something to do commonly. Your proposed syntax leaves the distinction between valid and invalid identifiers a problem the programmer has to deal with. It doesn't unify access to attributes the way the getattr and setattr do. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is there no natural syntax for accessing attributes with names not being valid identifiers?

2013-12-06 Thread Neil Cerutti
On 2013-12-04, Piotr Dobrogost wrote: > On Wednesday, December 4, 2013 10:41:49 PM UTC+1, Neil Cerutti > wrote: >> not something to do commonly. Your proposed syntax leaves the >> distinction between valid and invalid identifiers a problem >> the programmer has to dea

Re: Does Python optimize low-power functions?

2013-12-06 Thread Neil Cerutti
ization of the style I think your describing that I can see is it quickly returns zero when modulus is one. I'm not a skilled or experienced CPython source reader, though. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: One liners

2013-12-09 Thread Neil Cerutti
h a fish. A new Python programmer can generally just get her code working in a fairly comfortable way, then possibly rewrite it once her first few programs become horrifying years later. I haven't found time to rewrite all of mine yet. I still have a program I use almost every day with an

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-11 Thread Neil Cerutti
make them use rocks to bang nails >>in, because it will make them better carpenters in the long >>run. > > NAILS > > Nails were verboten in my high school wood working class... > > We used dowels and glue; chisels to carve dove-tails; etc. ...

Re: Tree library - multiple children

2013-12-12 Thread Neil Cerutti
on makes it very easy to manipulate such a structure. It isn't clear that you need more than that yet. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-17 Thread Neil Cerutti
written in C. I can't think of a reference, but I to recall that bugs-per-line-of-code is nearly constant; it is not language dependent. So, unscientifically, the more work you can get done in a line of code, then the fewer bugs you'll have per amount of work done. -- Neil Cerutti

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-18 Thread Neil Cerutti
wo ints being what Py3 does). Why > adorn pointer usage? Indeed. Golang allows . to do member lookup for both structs and pointers to structs. The -> syntax perhaps was needful in the days before function prototypes. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-19 Thread Neil Cerutti
rain-damage, writing C code is no problem; in fact, it feels darn good. And another thing: How many other languages have their very own calling convention? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Python glob and raw string

2014-01-16 Thread Neil Cerutti
n(path, '*')): if os.path.isdir(fname): self.descend(fname) else: self.process(fname) def process(self, path): # Do what I want done with an actual file path. # This is where I add to the data. In your case you m

Re: Python glob and raw string

2014-01-16 Thread Neil Cerutti
e a convenient place to hang the functions. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: regex multiple patterns in order

2014-01-20 Thread Neil Cerutti
ssions regularly, for example, when editing text with gvim. But when I want to use them in Python I have to contend with the re module. I've never become comfortable with it. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: regex multiple patterns in order

2014-01-20 Thread Neil Cerutti
On 2014-01-20, Devin Jeanpierre wrote: > On Mon, Jan 20, 2014 at 8:16 AM, Mark Lawrence > wrote: >> On 20/01/2014 16:04, Neil Cerutti wrote: >>> I use regular expressions regularly, for example, when >>> editing text with gvim. But when I want to use them in Python

Re: Can post a code but afraid of plagiarism

2014-01-22 Thread Neil Cerutti
m, how > can judge the OP's reaction to it? Obvious copying of another person's program, nearly verbatim, is most likely to be detected. Well, that and submitting one of the entrapment-purposed answers that are sometimes made availalbe here and elsewhere. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Early retirement project?

2014-01-22 Thread Neil Cerutti
On 2014-01-22, wxjmfa...@gmail.com wrote: > In fact, Python just becomes the last tool I (would) > recommend, especially for non-ascii users. Have a care, jmf. People unfamiliar with your opinions might take that seriously. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/

Re: Elementree and insert new element if it is not present - FIXED

2014-01-24 Thread Neil Cerutti
maybe I'm just naive. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: buggy python interpretter or am I missing something here?

2014-01-27 Thread Neil Cerutti
ely, just like the responsible adults that we are. Isn't that right, Mr... Poopy-Pants? -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Another surprise from the datetime module

2014-01-30 Thread Neil Cerutti
case was wanting to print a timedelta without > the fractions of seconds. The most straight-forward is: > > print td.replace(microseconds=0) That would be nice. In the meantime, this works for your use case: td -= td % timedelta(seconds=1) -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with some python homework...

2014-01-31 Thread Neil Cerutti
answer to test your program's answer with. 2. A general idea of how to solve the problem. It's often a mistake to start writing code. Eventually you'll be able to go directly from problem to code more often, but it will take practice. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: parse a csv file into a text file

2014-02-06 Thread Neil Cerutti
in Python 2.7. newline handling can be enscrewed if you forget. file = open('raw.csv', 'b') -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

Re: parse a csv file into a text file

2014-02-06 Thread Neil Cerutti
On 2014-02-06, Tim Chase wrote: > On 2014-02-06 17:40, Mark Lawrence wrote: >> On 06/02/2014 14:02, Neil Cerutti wrote: >> > >> > You must open the file in binary mode, as that is what the csv >> > module expects in Python 2.7. newline handling can be enscrewe

Re: Finding size of Variable

2014-02-11 Thread Neil Cerutti
is few controversial opinions brought into other topics. Tim's post was responding to a specific, well-presented criticism of Python's string implementation. Left unchallenged, it might linger unhappily in the air, like a symphony ended on a dominant 7th chord. -- Neil Cerutti -- https://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >