RE: byte code generated under linux ==> bad magic number under windows

2004-12-06 Thread Delaney, Timothy C (Timothy)
Philippe C. Martin wrote: > I understand from my reading that a .pyc generated by python anywhere > should run anywhere else - is that true ? > > If I generate 'compile.all' a pyc with python 2.3.3 under Linux, I ^ >

RE: need some help quickly

2004-12-14 Thread Delaney, Timothy C (Timothy)
Allan Irvine wrote: > Hope you can help - any thoughts welcome Here is the best place you can get help for your problem: http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: Python compiler method

2004-12-15 Thread Delaney, Timothy C (Timothy)
Lady_Valerie wrote: > hello guys! i just want to ask favor, coz i want to know how python > compiler method could be done? im really clueless of this programming > language hope anyone coule help me with this topic... im just focusing > only on the compiler of the python.thanks a lot!!! This shou

RE: [ANN] [Hack] Import binary extensions from zipfiles, windows only

2004-12-16 Thread Delaney, Timothy C (Timothy)
Thomas Heller wrote: > zipextimporter.py contains the ZipExtImporter class which allows to > load Python binary extension modules contained in a zip.archive, > without unpacking them to the file system. I take it this was what you were talking about the other day when you mentioned single-file ap

RE: [dictionary] how to get key by item

2004-12-14 Thread Delaney, Timothy C (Timothy)
Roy Smith wrote: >> >>> forward = {10 : 50, 2 : 12, 4 : 43} >> >>> reverse = dict([(v,k) for (k,v) in forward.iteritems()]) >> >>> print forward {10: 50, 4: 43, 2: 12} >> >>> print reverse >> {50: 10, 43: 4, 12: 2} > > BTW, does Python really build the intermediate list an

RE: printing anomaly

2005-03-20 Thread Delaney, Timothy C (Timothy)
Paul Rubin wrote: > What's the deal with this? > > >>> print 3.2 > 3.2 > >>> print [3.2] > [3.2002] > >>> > > Yes, I know that 3.2 isn't an exact binary fraction. I'm wondering > why it's converted differently depending on whether it's in a list. `print 3.2` ==

RE: Set literals

2005-03-21 Thread Delaney, Timothy C (Timothy)
George Sakkis wrote: > How about overloading curly braces for set literals, as in > aSet = {1,2,3} > > - It is the standard mathematic set notation. > - There is no ambiguity or backwards compatibility problem. > - Sets and dicts are in many respects similar data structures, so why > not sh

RE: Help me to sort.

2005-03-23 Thread Delaney, Timothy C (Timothy)
BMS wrote: > I'll apreciate if you can guide me how to sort in Python. I'm doing a > list and I want to sort it in ascending or descending order. > > Please send me some examples. Everything you need is right here: http://www.catb.org/~esr/faqs/smart-questions.html http://www.python.org/doc/ T

RE: The Running Time of += on Char Strings ?

2005-03-28 Thread Delaney, Timothy C (Timothy)
MyHaz wrote: > ''.join(['Thank ','you]) ^^ Syntax error ... Probably better as: ' '.join(['Thank', 'you']) ;) Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: __getslice__ passed INT_MAX rather than sys.maxint for missingendpoint?

2005-03-28 Thread Delaney, Timothy C (Timothy)
Dave Huang wrote: > Hi, I don't actually know Python; I'm just trying to debug a problem > I encounted in another program, so apologies if this has been > covered before. I did do some Google searches though, and didn't > find anything that specifically addressed this :) > > According to the docu

RE: mod_python

2005-03-29 Thread Delaney, Timothy C (Timothy)
onur2029 wrote: >I need mod_python resources,documentation or ebook.But not manual > from modpython.org.I'm waiting for your links. http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: string goes away

2005-03-31 Thread Delaney, Timothy C (Timothy)
bly be pleasantly surprised. Note that you can use `str.upper` in map ... /usr/bin> C:/Python24/python.exe -m timeit -s "strings = ['a']*1000" "map(str.upper, strings)" 1000 loops, best of 3: 304 usec per loop /usr/bin> C:/Python24/python.exe -m timeit -s "

RE: the bugs that try men's souls

2005-04-06 Thread Delaney, Timothy C (Timothy)
Jordan Rastrick wrote: > I had a doozy myself the other night, writing a mergesort for python's > deque class (I can't believe it doesnt come with one!) Post it to the Cookbook ... ;) Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: Compiling extensions

2005-04-06 Thread Delaney, Timothy C (Timothy)
ake wrote: > I would like to compile extensions usig distutils. is there a way to > set which compiler to use ? > > I am using windows and VC++ 7.1 comp. python setup.py --help python setup.py build --help However, if you're using an installed version of VC++ 7.1 you shouldn't need to set the c

Re: database in python ?

2005-04-11 Thread R. C. James Harlow
On Monday 11 April 2005 11:01, Pierre-Frédéric Caillaud wrote: > psycopg ... has a dictfetchall() method which is worth its weight in > donuts ! It's very simple to write one for MySQLdb: def dictfetchall(cursor): '''Takes a MySQLdb cursor and returns the rows as dictionaries.''' col_nam

Re: Python license (2.3)

2005-04-12 Thread R. C. James Harlow
On Tuesday 12 April 2005 09:51, Antoon Pardon wrote: > It seems I have to include the following in > my code: > > "Copyright (c) 2001, 2002 Python Software Foundation; >All Rights Reserved" > > Do I understand correctly? You are of course allowed to *ad

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread R. C. James Harlow
On Thursday 14 April 2005 22:18, Tiziano Bettio wrote: > Actually your script doesn't work on my python distribution... Works fine here - did you decompress the first bit of the python executable? You have to do that before Fredrick's script works... pgpYFHzjRTUoB.pgp Description: PGP signatur

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-14 Thread R. C. James Harlow
On Thursday 14 April 2005 22:21, R. C. James Harlow wrote: > You have to do that before Fredrick's script works... Damn - 'Fredrik's' - I accidentally decompressed his name. pgpbUXNRRyNvA.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: Supercomputer and encryption and compression @ rate of 96%

2005-04-15 Thread R. C. James Harlow
On Thursday 14 April 2005 10:27, [EMAIL PROTECTED] wrote: > Supercomputer and encryption and compression @ rate of 96% Dear Sir or Madam, I have received notification that you posted a compression algorithm on the newsgroup comp.lang.python on or about 10:27:26 on the 04/14/2005. I am writ

Re: Piping data into script under Win32

2005-04-15 Thread R. C. James Harlow
On Saturday 16 April 2005 03:11, runes wrote: > I trying to figure out a way to make a python script accept data output > from another process under Windows XP, but I fail miserably. I have a > vague memory having read this is not possible with Python under > Windows... > > C:\&g

Re: Piping data into script under Win32

2005-04-15 Thread R. C. James Harlow
On Saturday 16 April 2005 03:43, runes wrote: > type countlines.py | python countlines.py = Success > type countlines.py | countlines.py = Failure > > Why doesn't the latter work? Don't quote me on this, but I think it's because invoking countlines.py involves running some sort of wrapper that d

Re: goto statement

2005-04-21 Thread R. C. James Harlow
On Thursday 21 April 2005 17:42, Maxim Kasimov wrote: > > Have you tried the triple quote comment technique? > how do use this here: Simple. > sql = ''' > some long query > ''' Change this to: sql = """ some long query """ since you shouldn't be using multiple quoting styles in one module, an

Re: Variables

2005-04-24 Thread R. C. James Harlow
On Sunday 24 April 2005 03:20, Richard Blackwood wrote: > To All: > > Folks, I need your help. I have a friend who claims that if I write: > > foo = 5 > > then foo is NOT a variable, necessarily. This is a really amusingly recursive discussion. Your friend has a piece of knowledge, "what a

Re: Parsing data from URL

2005-04-24 Thread R. C. James Harlow
On Monday 25 April 2005 01:24, Harlin Seritt wrote: > dat = urllib.urlopen(url, 'r').read() Drop the 'r' - urlopen is posting the 'r' to the server, instead of doing what you mean, opening the file read-only. pgpmZ2zcMs1bO.pgp Description: PGP signature -- http://mail.python.org/mailman/listi

Re: Multiple tuples for one for statement

2005-04-25 Thread R. C. James Harlow
On Monday 25 April 2005 04:20, James Stroud wrote: > for a,b,c in zip(tup1, tup2, tup3): >print a >print b >print c or just: for a,b,c in (tup1, tup2, tup3): print a print b print c pgpJ0RNTnCUA3.pgp Description: PGP signature -- http://mail.python.org/mail

Re: Multiple tuples for one for statement

2005-04-25 Thread R. C. James Harlow
On Monday 25 April 2005 14:34, Ivan Van Laningham wrote: > Hi All-- > > "R. C. James Harlow" wrote: > > or just: > > > > for a,b,c in (tup1, tup2, tup3): > > print a > > print b > > print c > > And this works in Python v

Re: Do I need a nested lambda to do this?

2005-04-25 Thread R. C. James Harlow
On Tuesday 26 April 2005 00:34, raoul wrote: > I can't figure this one out. Trying to be unnecessarily functional I > suspect. With list comprehensions: Python 2.3.4 (#1, Mar 26 2005, 20:54:10) [GCC 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)] on linux2 Type "help", "copyright"

Re: large dictionary creation takes a LOT of time.

2005-04-29 Thread R. C. James Harlow
On Friday 29 April 2005 11:53, Ville Vainio wrote: > > "Kent" == Kent Johnson <[EMAIL PROTECTED]> writes: > > Kent> if frequency.has_key(word): > Kent> frequency[word] += 1 > Kent> else: > Kent> frequency[word] = 1 > > This is a good place to use 'get' method of dict: > > freque

Re: Anyone still using Python 2.5?

2011-12-21 Thread George R. C. Silva
Em quarta-feira, 21 de dezembro de 2011 08:50:34, Steven D'Aprano escreveu: On Wed, 21 Dec 2011 07:15:46 +, Chris Withers wrote: Hi All, What's the general consensus on supporting Python 2.5 nowadays? Do people still have to use this in commercial environments or is everyone on 2.6+ nowad

Re: Ruby/Python/REXX as a MUCK scripting language

2006-11-26 Thread Jeremy C B Nicoll
so that either no commands are passed to an external environment, or that only some are. Surely that'd be less work than creating something from scratch. -- Jeremy C B Nicoll, Edinburgh, Scotland - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: regular expression

2006-12-24 Thread Rad [Visual C# MVP]
On Sun, 24 Dec 2006 16:36:31 +0100, Stef Mientki wrote: > Dustan wrote: >> Kleine Aap wrote: >>> Asper Faner wrote: >>> I seem to always have hard time understaing how this regular expression works, especially how on earth do people bring it up as part of computer programming langua

RE: problem in the compiler ?

2005-05-02 Thread Delaney, Timothy C (Timothy)
Glauco Silva wrote: > when i creat a RadioButton and put a command = self.Function , this > function is called in the creation of RadioButton. It´s right this or > it´s wrong ? http://www.catb.org/~esr/faqs/smart-questions.html I'm pretty sure I can guess exactly what the problem is. I suspect

RE: problem in the compiler ?

2005-05-03 Thread Delaney, Timothy C (Timothy)
Glauco Silva wrote: > My code is like this: > > MyClass() > > class MyClass: > def __init__(self): > btn = RadioButton(command=self.Function) > def Function(self): > print "Enter in the function" > > When a do this, the function 'Function' is call. And i don´t want >

RE: problem in the compiler ?

2005-05-04 Thread Delaney, Timothy C (Timothy)
Glauco Silva wrote: > I´m sorry, I feel I didn't comunicate very well . > The program I am writing is a part of a big project, so it would be > no use to post it here as it involves many other things and concepts. We wouldn't want the whole thing - that would be useless. What you need to do is t

Re: Controlling kwrite by dcop

2005-05-08 Thread R. C. James Harlow
On Sunday 08 May 2005 13:41, [EMAIL PROTECTED] wrote: > As you can see you can interact with kwrite from dcop. > Unfortunately I don't have this module in my Python (2.3) nor I have > been able to find it. It's normally installed seperately from the main kde libraries - on gentoo it's a package c

RE: Ask for a tool to protect my .pyc file :)

2005-05-08 Thread Delaney, Timothy C (Timothy)
Lily Kakm wrote: > when I distribute my software, I will give the users .pyc file (maybe > I can use py2exe, but I think there's no essential different), > because I don't like them to know my source code. Leaving aside all other arguments of whether or not you should allow your users to see your

RE: bad argument type for built-in operation

2005-05-10 Thread Delaney, Timothy C (Timothy)
Florian Lindner wrote: > Traceback (most recent call last): > File "visualizer.py", line 8, in ? > main() > File "visualizer.py", line 5, in main > g = GraphCreator(f) > File "/home/florian/visualizer/GraphCreator.py", line 13, in > __init__ self.conf = ConfigReader(config) > F

RE: Need a little parse help

2005-05-10 Thread Delaney, Timothy C (Timothy)
Peter Hansen wrote: > In my opinion, if the code fits on one screen and just reads stuff > from one file and, maybe, writes to another, you can safely and with ^^ > clean conscience ignore Mike's advice (but remember it for later!). Remember, finalisers are not cal

RE: Need a little parse help

2005-05-11 Thread Delaney, Timothy C (Timothy)
Fredrik Lundh wrote: > that's probably because finalizers *are* called when Python exits. D'oh! Old semantics? I'm sure I remember this used to not work at some point, and not just in Jython. My apologies to anyone who I led astray. Still ... better to be too careful ;) I've been trying to find

RE: Property,how to use it?

2005-05-15 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > What is the "property" mean in the python? Who can explain it > for me? I don't know how to use it. http://www.catb.org/~esr/faqs/smart-questions.html Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: The world is really unstable these days......

2005-05-15 Thread Delaney, Timothy C (Timothy)
Peter Hansen wrote: > Lucas Raab wrote: >> > [...] >> Y'know, I really do love these random word spam messages. They're >> quite entertaining to read. > > Although, when posting in reply to them it apparently helps those who > read this through the mailing list, and who have Bayesian filtering o

RE: speeding up Python script

2005-05-18 Thread Delaney, Timothy C (Timothy)
James Carroll wrote: > It looks like your algorithm really does iterate over all values for > six variables and do lots of math.. then you can't do any better than > implementing the inner loop in C. Or Pyrex ... http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ For this typ

RE: Is Python suitable for a huge, enterprise size app?

2005-05-18 Thread Delaney, Timothy C (Timothy)
Ivan Van Laningham wrote: > What you're going to run into are two major stumbling blocks. One, > Python's got no credibility with management types unless the > credibility's already there. "Python? Never heard of it. Tell me > about it. ... Oh, it's interpreted, is it? Interesting." You c

RE: For review: PEP 343: Anonymous Block Redux and GeneratorEnhancements

2005-06-05 Thread Delaney, Timothy C (Timothy)
Nicolas Fleury wrote: > def getFirstLine(filename): > with opening(filename) as file > return file.readline() Your tastes definitely disagree with the majority of Python programmers then, including Guido. Scoping is defined in Python by indentation. If you want the above sort of thing,

RE: Controlling a generator the pythonic way

2005-06-12 Thread Delaney, Timothy C (Timothy)
Thomas Lotze wrote: > call. The picture might fit better (IMO) if it didn't look so much > like working around the fact that the next() call can't take > parameters for some technical reason. You might want to take a look at PEP 342 . Doesn't help you no

RE: Controlling a generator the pythonic way

2005-06-13 Thread Delaney, Timothy C (Timothy)
Steve Holden wrote: > Sigh indeed. But if you allow next() calls to take arguments you are > effectively arguing for the introduction of full coroutines into the > language, and I suspect there would be pretty limited support for > that. You mean `PEP 342`_ which I posted earlier and is consider

RE: Controlling a generator the pythonic way

2005-06-13 Thread Delaney, Timothy C (Timothy)
FWIW, PEP 342 is now titled "Coroutines via Enhanced Iterators" :) Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: Python in Games (was RE: [Stackless] Python in Games)

2005-06-14 Thread Delaney, Timothy C (Timothy)
Dave LeCompte (really) wrote: >> Who is using Python in games >> >> Python has been used in a number of games, including >> >>* ToonTown - http://www.toontown.com/ >>* EveOnline - http://www.eve-online.com/ >>* Blade of Darkness - http://www.codemastersusa.com/blade/ Add to that: -

RE: Python in Games (was RE: [Stackless] Python in Games)

2005-06-14 Thread Delaney, Timothy C (Timothy)
Irmen de Jong wrote: > Also, alledgedly the new BattleField II uses Python in a way... > because I heard that you had to comment out a certain line > in a certain .py file to remove the time limit of the demo :-) Silly silly people - they should have at least had the launcher and that part in Pyr

Re: Working with fixed format text db's

2007-06-08 Thread Jeremy C B Nicoll
ed to be sure that you don't have any other code anywhere that implicitly relies on a particular field being a known fixed length. > > However, I'd like something better. What precisely do you want to achieve? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with fixed format text db's

2007-06-08 Thread Jeremy C B Nicoll
Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-06-08, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > Neil Cerutti <[EMAIL PROTECTED]> wrote: > >> Luckily, the output format has not changed yet, so issues with > >> maintaining the above haven'

What order does info get returned in by os.listdir()

2007-08-14 Thread Jeremy C B Nicoll
xt ie, XP seems to think that files with a "~" as their first character are sorted ahead of A. When I use os.listdir() to return that list of leaf values, I do seem to get them in alphabetical order, A before B before C etc, but the ~-prefixed ones are returned after the Z-prefixed files rath

Re: What order does info get returned in by os.listdir()

2007-08-15 Thread Jeremy C B Nicoll
Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > When I use os.listdir() to return that list of leaf values, I do seem to > get them in alphabetical order, A before B before C etc, but the > ~-prefixed ones are returned after the Z-prefixed files rather than before > the A-ones.

Re: What order does info get returned in by os.listdir()

2007-08-15 Thread Jeremy C B Nicoll
Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Wed, 15 Aug 2007 12:34:27 +0100, Jeremy C B Nicoll wrote: > > > I've some supplementary questions... my original code was looking at > > each leafname in turn via > > > > for leaf in o

Re: Xah's Edu Corner: Under the spell of Leibniz's dream

2007-08-20 Thread Albert Y. C. Lai
Twisted wrote: > A link to a copy in a non-toxic format would be nice. http://www.cs.utexas.edu/users/EWD/transcriptions/EWD12xx/EWD1298.html -- http://mail.python.org/mailman/listinfo/python-list

Finding out what other tasks are running

2007-11-23 Thread Jeremy C B Nicoll
and Linux/Unix ways of doing this? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: File to dict

2007-12-08 Thread Jeremy C B Nicoll
is vast surely there's some or a lot of point in breaking it up into a group of smaller files? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Different kinds of Import Errors

2007-12-08 Thread Jeremy C B Nicoll
that could be raised? How does one write a try/except piece of code that works (ie traps whatever exception occurs, though obviously it can't necessarily fix an arbitrary exception) for any exception, even those not known of in advance by the author? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie edit/compile/run cycle question

2007-12-08 Thread Jeremy C B Nicoll
ython script without running it? Does a syntax check report all syntax errors or just the first one found? -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie edit/compile/run cycle question

2007-12-08 Thread Jeremy C B Nicoll
Steve Howell <[EMAIL PROTECTED]> wrote: > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > What command (in XP) does one need to issue to > > syntax check a saved python > > script without running it? > > Perhaps oversimplifying a bit, running

Re: Different kinds of Import Errors

2007-12-09 Thread Jeremy C B Nicoll
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 09 Dec 2007 00:25:53 +, Jeremy C B Nicoll wrote: > > > > for app_name in settings.INSTALLED_APPS: > > > try: > > > __import__(app_name + '.management',

Re: Newbie edit/compile/run cycle question

2007-12-09 Thread Jeremy C B Nicoll
Steve Howell <[EMAIL PROTECTED]> wrote: > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > > Steve Howell <[EMAIL PROTECTED]> wrote: > > > > > --- Jeremy C B Nicoll <[EMAIL PROTECTED]> > > wrote: > > > >

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
put to. The code someone else posted to reverse the keys is all very well, but surely hugely wasteful on cpu, maybe storage, and elapsed time. Even if the dict in this form is needed for some other reason, couldn't the code that created it also create a reverse index at the same

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
[EMAIL PROTECTED] wrote: > Jeremy C B Nicoll: > > The code someone else posted ... > > If you are talking about my D code then I know it... No I meant the code that used python to iterate over the dict and create zillions of extra keys. I've deleted earlier posts in the th

Re: searching a value of a dict (each value is a list)

2007-12-09 Thread Jeremy C B Nicoll
ored is suitable, you might sensibly use several or many smaller dicts to store all the data (and thus save time reverse-keying much less of it). -- Jeremy C B Nicoll - my opinions are my own. -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie edit/compile/run cycle question

2007-12-10 Thread Jeremy C B Nicoll
Simon Forman <[EMAIL PROTECTED]> wrote: > On Dec 8, 6:45 pm, Jeremy C B Nicoll <[EMAIL PROTECTED]> wrote: > > Ah, I've been using IDLE so far (but would probably prefer to write > > Python in my normal text editor). In IDLE Alt-X syntax checks the saved >

Re: Newbie edit/compile/run cycle question

2007-12-10 Thread Jeremy C B Nicoll
Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Jeremy C B Nicoll a écrit : > > Figuring out how IDLE works is a bit beyond me at this stage. > > Did you try out, or is it just an a priori ? Sort of, no and yes... A few weeks ago I started trying to use Python & ID

Re: Modifying the value of a float-like object

2009-04-24 Thread C or L Smith
/ float(len(x)) for a in x: std += (a - mean)**2 std = sqrt(std / float(len(x)-1)) return mean, std def makecontext( cmds=''): #execute cmds in clean context (e.g. from math import *) context = {} for c in cmds: if c: exec(c, context) return co

Re: Parsing text

2009-05-06 Thread C or L Smith
> Hi, > I'm trying to write a fairly basic text parser to split up scenes and > acts in plays to put them into XML. I've managed to get the text split > into the blocks of scenes and acts and returned correctly but I'm > trying to refine this and get the relevant scene number when the split > is ma

PyWin editor modification

2009-09-12 Thread C or L Smith
going to make my editing life less error prone as I work on a project that checks for trailing whitespace. Maybe it will be useful to someone else. /c -- http://mail.python.org/mailman/listinfo/python-list

where is ctrl+newline handled in pywin editor?

2009-09-21 Thread C or L Smith
I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespace is stripped from a line and I've been able to get it to not leave any white space when a doub

Re: where is ctrl+newline handled in pywin editor?

2009-09-23 Thread C or L Smith
{Sorry about the no-wrap in the first post...} I use the pywin environment on Windows for python code editing and interactive environment. I've been able to find the place in the editor files where the enter key is handled and where the whitespace is stripped from a line and I've been able

Re: mantissa and exponent in base 10

2010-10-07 Thread C or L Smith
I just sent a similar suggestion to tutor: check out the %g format. >>> print '%g' % 1.2345e7 1.2345e+07 >>> print '%g' % 1.2345e-7 1.2345e-07 >>> print '%g' % 1.2345 1.2345 >>> def me(n, sigfigs = 4): ... s = ('%.'+'%ig' % sigfigs) % n # check docs for a better way? ... if 'e' in s: m, e = s.s

Re: mantissa and exponent in base 10

2010-10-08 Thread C or L Smith
Jason Swails wrote: >> s = ('%%%ig' % sigfigs) % n # double-% cancels the % Thanks! I see that the parenthesis can be dropped, too: >>> '%%.%ig' % 3 % 4.23456e-5 '4.23e-05' /c -- http://mail.python.org/mailman/listinfo/python-list

RE: A simple way to print few line stuck to the same position

2011-06-04 Thread Sarcar, Shourya C (GE Healthcare)
A way to do this on DOS/Windows console would be: import sys for r in range(0,2**16): line = "Count : %d" % r sys.stdout.write(line) sys.stdout.flush() # do something that consumes time backup = "\b" * len(line) # The backspace character; this will prevent c

Creating Dict of Dict of Lists with joblib and Multiprocessing

2016-04-20 Thread Sims, David (NIH/NCI) [C]
Hi, Cross posted at http://stackoverflow.com/questions/36726024/creating-dict-of-dicts-with-joblib-and-multiprocessing, but thought I'd try here too as no responses there so far. A bit new to python and very new to parallel processing in python. I have a script that will process a datafile an

Spam levels.

2018-02-10 Thread C W Rose via Python-list
I've been reading a limited range of Usenet groups since the late 1980s, and until the recent problems in comp.lang.python had never bothered with any sort of filtering; it's easier just to ignore people. However, the sheer volume of spam in comp.lang.python finally defeated me, so I set up a fil

Respam levels.

2018-02-13 Thread C W Rose via Python-list
Having run a check for straightforward spam, I now find that there's a site editing and reposting non-spam posts. An example of the changed headers follows: Original post headers: > > From c...@seckford.org Sun Feb 11 23:23:22 2018 > Path: > eternal-september.org!reader02.eter

Re: Filtering computer.lang.python

2018-04-11 Thread C W Rose via Python-list
Thomas Jollans wrote: > > Welcome to python-list/comp.lang.python! > > This isn't originally a Google group. Google just mirrors the old USENET > group, which is awash with spam. > > There is also a mailing list version of this group (posts are mirrored > both ways) at https://mail.python.org/m

Re: Spam levels.

2018-05-22 Thread C W Rose via Python-list
m wrote: > W dniu 10.02.2018 o 15:57, C W Rose pisze: >> No other groups (in the limited set which I read) have the problem, >> and I don't understand why the spammers neither spam a range of >> groups, nor change their adddresses more frequently. It may be >> tha

Re: Python indentation (3 spaces)

2018-10-07 Thread C W Rose via Python-list
Ryan Johnson wrote: > The point that OP is trying to make is that a fixed standard that is > distinguishable from the even-spacing Tab-length convention in code and > text editors will establish a level of trust between the end developer and > upstream developers or co-developers who may not have

Re: Validating cells of a table PyQt

2010-01-06 Thread t r z e w i c z e k
this. Any help will be appreciated Cheers! Hi, I'm not an expert but could you write, why you can't use validators on the cells? There is this free ebook of first edition of "C++ GUI Programming with Qt 4" that has an excel like application as an example and I remember t

Re: Python interactive terminal in Ubuntu Linux : some keys fouled up

2010-01-06 Thread t r z e w i c z e k
keys now do not work. eg pressing left-arrow yields ^[[D right-arrow ^[[C Home ^[OH Del ^[[3~ up-arrow^[[A Frustrating as I use all these

<    7   8   9   10   11   12