Re: [Python-Dev] [RELEASE] Python 3.6.4rc1 and 3.7.0a3 now available for testing

2017-12-06 Thread Steve Holden
enjoy it. Seasons greetings Steve Steve Holden On Wed, Dec 6, 2017 at 2:29 AM, Ned Deily wrote: > Announcing the immediate availability of Python 3.6.4 release candidate 1 > and of Python 3.7.0 alpha 3! > > Python 3.6.4rc1 is the first release candidate for Python 3.6.4, the next >

UK Python Training Day

2014-12-02 Thread Steve Holden
://www.eventbrite.com/e/uk-python-training-day-tickets-14720737121 regards Steve -- Steve Holden st...@holdenweb.com +1 571 484 6266 @holdenweb -- https://mail.python.org/mailman/listinfo/python-list

New Python Course

2014-11-17 Thread Steve Holden
Hi everybody, I am pleased to announce the availability of a Python Programming Skills Lab in London on December 9, 2014 in The Church House, Westminster. The blurb follows. Led by Steve Holden, a well-known educator and member of the Python community, this one-day lab presents Python

DjangoCon US 2012

2012-07-24 Thread Steve Holden
Pythonistas: We are happy to remind all Django users that DjangoCon US is in DC this year, from September 3-8 (main conference September 4-6). Early bird pricing is available until August 3, and the schedule will be published shortly after this announcement is made. http://djangocon.us/ Sin

Re: Community Involvement

2011-08-04 Thread Steve Holden
Haven't had much Cc input so far, but this one is definitely worth following up on. Thanks! regards Steve On Aug 4, 2011, at 5:42 PM, Eric Snow wrote: > On Wed, Aug 3, 2011 at 9:14 PM, Steve Holden wrote: >> [Ccs appreciated] >> After some three years labor I (@holdenweb)

Community Involvement

2011-08-03 Thread Steve Holden
dth student would be abused and the thousandth murdered). So I wondered if anyone had any good ideas. regards Steve -- Steve Holden st...@holdenweb.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to pop the interpreter's stack?

2010-12-26 Thread Steve Holden
it. I've been > crashing against one bit of cleverness after another in Python's > unification of types and classes... Well if you can find a way to implement a class system that doesn't use clever tricks *in its implementation* please let me know. regards Steve -- Steve Hol

Re: What is the the best style and theory of writing a complier in your language

2010-12-25 Thread Steve Holden
On 12/24/2010 2:21 AM, Juha Nieminen wrote: > In comp.lang.c++ small Pox wrote: >> http://... > > You should take your religion somewhere else. And you should learn that by re-posting their links you assist spammers. -- Steve Holden +1 571 484 6266 +1 800 494

Re: What is the the best style and theory of writing a complier in your language

2010-12-25 Thread Steve Holden
> CHEERIOS > Sure you do. regareds Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Trying to parse a HUGE(1gb) xml file

2010-12-25 Thread Steve Holden
else are they to use? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Catching user switching and getting current active user from root on linux

2010-12-22 Thread Steve Holden
n help them. Squid is a different matter. For that, probably if you go on an IRC channel (freenode.net is what I use, but others have their favorites). Maybe #squid? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/

Re: issubclass(dict, Mapping)

2010-12-22 Thread Steve Holden
As Steven d'Aprano has already said, these *are* corner cases and not the whole of the language. Don't worry about having a complete knowledge of the language before you start to use it. That can induce paralysis ... regards Steve -- Steve Holden +1 571 484 62

Re: Redundant importing of modules

2010-12-20 Thread Steve Holden
There's a dict at sys.modules that has a key for each loaded module's name. When an attempt is made to import a module the first thing the interpreter does is to look at sys.modules. If it has the correct key in it then the assumption is that the module has already been imported, and its

Re: Class-override of a sort-key method?

2010-12-20 Thread Steve Holden
ted due > to all the interactions with the existing comparison methods) special > method. > But the *real* point is (as the documentation attempts to point out) that by providing the key argument it gets called only once per element, whereas the cmp argument (or the objects' __cmp_

Re: Catching user switching and getting current active user from root on linux

2010-12-20 Thread Steve Holden
can be really useful as long as you know who to listen to and who to ignore ... regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC

Re: If/then style question

2010-12-17 Thread Steve Holden
On 12/17/2010 11:13 AM, Tim Golden wrote: > On 17/12/2010 15:53, Steve Holden wrote: > > [... snip example of for-else ...] > >> This construct appears to be unpopular in actual use, and when it comes >> up in classes and seminars there is always interesting debate as peo

Re: If/then style question

2010-12-17 Thread Steve Holden
d is probably not Guido's crowning language achievement, but then since the English keywords don't make natural sense to those who speak other languages it's at least fair that there should be one that isn't totally natural to English speakers. A small price to pay for all

Re: If/then style question

2010-12-16 Thread Steve Holden
ust >> don't need such guarantees in python. > > Even without the cleanup issue, sometimes you want to edit a function > to affect all return values somehow. If you have a single exit point > you just make the change there; if you have mulitple you have to hunt > the

Re: O'Reilly Python Certification

2010-12-16 Thread Steve Holden
on how to apply and >>> what are the prerequisites >> >> http://www.oreillyschool.com/certificates/python-programming.php >> >> No prerequisites that I could see, and currently they are running a 25% >> discount promotional. >> >> ~Ethan~ >>

Re: string identity and comparison

2010-12-16 Thread Steve Holden
ing content. > > id('foo') > 3082385472L > id('foo') > 3082385472L > > Anyone has that kind of code ? > > JM > >>> id("foo") 2146743808 >>> id ("f"+"o"+"o") 2146744096 >>> regards

Re: while True or while 1

2010-12-16 Thread Steve Holden
On 12/16/2010 5:44 AM, BartC wrote: >> On 12/12/2010 2:32 PM, Christian Heimes wrote: >>> Am 12.12.2010 19:31, schrieb Steve Holden: >>> $ python -m timeit -n20 -- "i = 0" "while 1:" "i+=1" "if i == >>> 100: break"

Re: O'Reilly Python Certification

2010-12-15 Thread Steve Holden
On 12/15/2010 4:21 PM, Stefan Sonnenberg-Carstens wrote: > Am 15.12.2010 22:11, schrieb Steve Holden: >> On 12/15/2010 3:40 PM, Tim Chase wrote: >>> On a more serious note, it would be interesting to know if it's possible >>> to test out of the certification for

Re: O'Reilly Python Certification

2010-12-15 Thread Steve Holden
act me privately by email on a "no promises" basis. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holden

Re: O'Reilly Python Certification

2010-12-15 Thread Steve Holden
On 12/15/2010 12:54 PM, Ethan Furman wrote: > So I just got an e-mail from O'Reilly and their School of Technology > about a Python Certification course... anybody have any experience with > this? > > It also says Steve Holden is involved -- is this True? (Steve?) >

Re: while True or while 1

2010-12-15 Thread Steve Holden
> That's wrong: > >>>> "to be" or not "to be" > 'to be' > > You need to wrap it with bool() at least (even without interpreting > Pythons answer to the duality contradiction of consciousness for > now ;-)) > >> but d

Re: Dealing with pywin32 on Linux

2010-12-15 Thread Steve Holden
onality, I will > encounter problems. > Benedict: Have you considered running a virtual Windows machine to handle the specific issues that really require a Windows environment? If the loading isn't at brutal levels VirtualBox is a very adequate solution, and of course Python user VMWare

Re: Links and pointers to basics of soap and suds

2010-12-15 Thread Steve Holden
d you mind teaching me to drive?". Google for phrases like "web services architecture" and "SOAP WSDL" to get some idea of how these technologies are put together. This assumes, of course, that you already possess a fair idea of how the web is put together. regards Steve -

Re: Proposed changes to logging defaults

2010-12-15 Thread Steve Holden
nter the stdout-stdin pipelines carrying information between coordinating processes. If a current task is assuming the prior logging package's behavior and analysing a process's stdout for messages it arguably needs fixing anyway, though I agree that breakage of any kind is unfortunate. r

Re: Tkinter polling example: file copy with progress bar

2010-12-15 Thread Steve Holden
On 12/14/2010 11:52 PM, JohnWShipman wrote: > you > know how us ancient Unix weenies are. Indeed we do ... ;-) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video!

Re: default argument in method

2010-12-13 Thread Steve Holden
e more accurate to say that if C.foo is rebound this does not change the binding of the val default value. "Change the value of foo" could be though to include "mutate a mutable value", but in that case both C.foo and the method's val parameter would still be bound to t

Re: while True or while 1

2010-12-12 Thread Steve Holden
On 12/12/2010 2:32 PM, Christian Heimes wrote: > Am 12.12.2010 19:31, schrieb Steve Holden: >> > Would you care to quantify how much CPU time that optimization will >> > typically save for a loop of fair magnitude (say, a billion iterations)? > The difference is minimal

Re: while True or while 1

2010-12-12 Thread Steve Holden
while 1: ... and is, I'd say, therefore to be preferred (except in a code base intended to compile on 2.2 and before). regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http:/

Re: Python distribution recommendation?

2010-12-11 Thread Steve Holden
sy packages to install over the last ten years. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ --

Re: Python critique

2010-12-11 Thread Steve Holden
On 12/11/2010 6:46 AM, Lie Ryan wrote: > Also, class scope and instance scope, though similar, are distinct > scopes. Python also have the hidden interpreter-level scope (the > __builtins__). Kindly ignore my last post. Class scopes are lexical, instance scopes are not. regards Steve

Re: Python critique

2010-12-11 Thread Steve Holden
> Also, class scope and instance scope, though similar, are distinct > scopes. Python also have the hidden interpreter-level scope (the > __builtins__). But classes and instances don't have scopes. They have namespaces. That is, if we are talking about lexical scoping. regards Steve

Re: 64 bit memory usage

2010-12-11 Thread Steve Holden
your solution but have programmed less carefully. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ --

Re: instance has no __call__ method

2010-12-11 Thread Steve Holden
s an AttributeError that this instance doesn't have the __call__ > method, so how to add this kind of method to my instance? > > Thanks a lot in advance. > > Regards > Frank.Cui > Try renaming your .calc() method to .__call__(). That way the method will be called when

Re: little emacs lisp tutorial on turning a url into a link

2010-12-10 Thread Steve Holden
ing, and not without making the courts free and preventing > knowledge monopolies. If a certain group is going up > disproportionately, then there is something to look at. I see everyone > work as hard as anyone else. This is completely off-topic for c.l.py. Kindly bugger off. regards S

Re: use of __new__ to permit "dynamic" completion within (any?) IDE ?

2010-12-08 Thread Steve Holden
to guess/know it.. ; I guess the best answer would be : > bad IDE, change IDE but I'm guessing that others IDE can't do a lot > better in this case. > If you'd told us which IDE you were using we might have offered better advice, but you seem to want to keep that a secre

Re: completely implicit interpolation based on a frame object

2010-12-07 Thread Steve Holden
nfosmark.com/2008/06/string-interpolation-in-python/ > > but I don't see anything exact, and getting this right would be fairly > tricky, so I was hoping for canned solution. > > Any ideas would be great on this, including pitfalls that people see > in implementing it.

Re: Exception handling in Python 3.x

2010-12-07 Thread Steve Holden
On 12/7/2010 1:48 AM, MRAB wrote: > Perhaps Python could use Guido's time machine to check whether the > sequence will yield another object in the future. :-) Since there's only one time machine that would effectively be a lock across all Python interpreters. regards Steve

Re: Exception handling in Python 3.x

2010-12-07 Thread Steve Holden
till terminates by raising a StopIteration error. I have no idea what Shed Skin does, but to the extent that iterators don't raise StopIteration on exhaustion I'd say it is in error. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atla

Re: Perceived inconsistency in py3k documentation

2010-12-07 Thread Steve Holden
work, because my newsreader (Thunderbird) makes the assumption that the colons are part of the URLs. This behavior is common enough that people need to be aware of it. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 h

Re: Collision of rotated rectangles without pygame

2010-12-07 Thread Steve Holden
hat dict lookup has been extensively optimized, and while I am no longer involved in numerical computing it seems to me there's still a lot to do to compute a sin unless your CPU will do it for you. regards Steve >This is why you don't write your own collision library. > (I on

Re: is py2exe still active ?

2010-12-07 Thread Steve Holden
27;t have the answer about py2exe, but I'm using cxFreeze to create > executables with Python 3.1, if it's what you're looking for. > > http://cx-freeze.sourceforge.net/ -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17

Re: Comparison with False - something I don't understand

2010-12-06 Thread Steve Holden
ong since I used PL/1 I may be mistaken. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Which non SQL Database ?

2010-12-05 Thread Steve Holden
d take average (3.9 MB/s) users to > download your app if it were included. Just as a matter of interest where do you get the information that the average user has a 3.9 MB/s path to the Internet? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atla

Re: class attribute confusion

2010-12-05 Thread Steve Holden
k the class attribute for that instance. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail

Re: How to add data into exisitng Excel file at next open row?

2010-12-05 Thread Steve Holden
platforms and without the use of COM magic. There's also an xlwt module for writing spreadsheets. However I understand that the two together may not be as convenient as modifying a spreadsheet in place. In particular, if sh is a spreadsheet then sh.nrows gives you the number of rows cur

Re: Comparison with False - something I don't understand

2010-12-04 Thread Steve Holden
to know what needs to be done when a specific conditions arises, in which case (presumably) you have to return some error code and test for that ... regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video!

Re: Comparison with False - something I don't understand

2010-12-02 Thread Steve Holden
On 12/2/2010 1:31 PM, Terry Reedy wrote: > It turns out that try block are computationally lighter weight (faster) > for normal execution ;-) Though that alone would hardly be sufficient reason to use them. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCo

Re: Comparison with False - something I don't understand

2010-12-02 Thread Steve Holden
to me like a prejudice that will harm your Python development. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.h

Re: Comparison with False - something I don't understand

2010-12-02 Thread Steve Holden
you think about using exceptions to handle exceptional conditions? If you are new to Python it may not be the obvious soltuion, but it can greatly simplify program logic. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us

Re: Python's equivalent to Main calling program and subprograms

2010-12-01 Thread Steve Holden
ttribute us bound to the name of the module. When the module is run as a main program (from the command line) its __name__ attribute is set to "__main__". The main() call just calls a function that (presumably) tests the functions the module provides. regards Steve -- Steve Holden

Re: Change one list item in place

2010-11-30 Thread Steve Holden
for a fight walking into a bar in Glasgow. However, an unpacking assignment can make everything much more comprehensible [pun intended] by removing the index operations. The canonical solution would be something like: def query(): x, y = sendList() return ["Formatting only {0} i

Re: SAX unicode and ascii parsing problem

2010-11-30 Thread Steve Holden
27;, 'w' ) > mex9.write(ascii) > > Again I'm looking for something simple even it's a few more lines of > codes...or upgrade(?) > > Thanks, appreciate any help. > mex9.close() I'm just as stumped as I was when you first asked this question 13 minutes ago. ;-) regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-27 Thread Steve Holden
or multiple inheritance. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: tilted text in the turtle module

2010-11-25 Thread Steve Holden
On 11/25/2010 5:58 PM, Yingjie Lan wrote: > --- On Thu, 11/25/10, Steve Holden wrote: >>> And even if I made a patch, >>> then how to publish it? >>> >> Once you have a patch, attach it to the issue as a file and >> try and get >> it reviewe

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2010-11-25 Thread Steve Holden
ython in a Nutshell" contains a very thorough description of the new-style class system with an example showing the resolution of the diamond pattern. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon

Re: tilted text in the turtle module

2010-11-25 Thread Steve Holden
On 11/25/2010 10:49 AM, Yingjie Lan wrote: > --- On Thu, 11/25/10, Steve Holden wrote: >> From: Steve Holden >> Subject: Re: tilted text in the turtle module >> To: python-list@python.org >> Date: Thursday, November 25, 2010, 7:00 PM >> On 11/25/2010 5:06 AM, Yin

Re: what a cheap rule

2010-11-25 Thread Steve Holden
dislike is to allow existing code to continue to work. Some of it is removed in Python 3, when backwards compatibility could be ignored. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video!

Re: a regexp riddle: re.search(r'(?:(\w+), |and (\w+))+', 'whatever a, bbb, and c') =? ('a', 'bbb', 'c')

2010-11-25 Thread Steve Holden
e been able to do so far (due to split's annoying habit of including the matches of any groups in the pattern I have to throw away every second element) is: >>> re.split("\s*(,|and)?\s*", 'whatever a, bbb, and c')[::2] ['whatever', 'a', 'bbb'

Re: do something every n seconds

2010-11-25 Thread Steve Holden
delay function and time.time() as your time function. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb

Re: tilted text in the turtle module

2010-11-25 Thread Steve Holden
ate a new issue (assuming a search reveals that there is not already such an issue). You may find if you look at the module's code that you can imagine how to make the change. If not, the request will wait until some maintainer sees it and has time. regards Steve -- Steve Holden

Re: what a cheap rule

2010-11-25 Thread Steve Holden
implicit rule is thrown out of > the window so cheaply, > that it literally worth less > than an empty tuple! > Surely an exaggeration. In fact current best practice (which you should inform yourself of as best you can to help you in your teaching work - so you are to be congratula

Re: Scheme as a virtual machine?

2010-11-21 Thread Steve Holden
ow number of success stories. On > the other hand, I'm doing rapid web development in it. > > After all there aren't many CL success stories either, but Paul Graham's > story [1] speaks for itself. > > [1] http://www.paulgraham.com/avg.html > Perhaps we could take

Re: strings getting unnecessarily cut in lstrip

2010-11-21 Thread Steve Holden
g because the argument specifies a set of characters, not a string. So the "d" of "def" is removed because there's a "d" in "abcd_". If you want to remove a string, try testing is with its .startswith() method and them removing the right number of

Re: dict diff

2010-11-19 Thread Steve Holden
d. it would be awesome to have > this sucker as a method on the builtin dict, but that'd take a pep, no? > > > A PEP *and* some explanation of why you would want such an obscure piece of code built in to the dict object, yes. regards Steve -- Steve Holden +1 571 48

Re: strange behavor....

2010-11-19 Thread Steve Holden
n't break the encapsulation of dict itself, it >> just takes the liberty to assume that globals() is a non-subclassed >> dict, at least as far as __setitem__ is concerned. > > But it doesn't make this assumption for locals(). > That's because it reserves the rig

Re: Modifying Element In For List

2010-11-19 Thread Steve Holden
ot; instead of "==", which makes a comparison > to True or False perfectly safe. > But it's still the wrong thing to do. if condition==True: and if condition is True: should both be replaced (under most circumstances) by if condition: regards Steve -- Steve Holden

Re: Program, Application, and Software

2010-11-19 Thread Steve Holden
finding a file with that extension on the PATH will trigger it to be run by the registered interpreter. As far as I know, anyway. By default on my Vista system I see PATHEXT contains C:\Users\sholden\workspace\Python3_Lesson3\src>echo %PATHEXT% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS

Re: What was your strategy?

2010-11-19 Thread Steve Holden
ht be helped right away and it's a good addition to any > Python programmer's library. > I'd say "Nushell" is a great book for experienced programmers, whether in Python or other languages. It's definitely not something I would recommend for a programming noob

Re: Program, Application, and Software

2010-11-18 Thread Steve Holden
but no cigar. They are only created (assuming file permissions permit) when the module is *imported*. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommuni

Re: Distribution of Python Scripts

2010-11-18 Thread Steve Holden
d care less if they see the source code, my goal is all > around ease of use. I would love to have one distribution file for > all platforms, but I can live with making three if that's the only > option. > > So, what's my options. The only one I could find was cxFreeze:

Re: Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

2010-11-17 Thread Steve Holden
On 11/17/2010 10:19 PM, Tim Harig wrote: > On 2010-11-18, Steve Holden wrote: >> On 11/17/2010 7:21 PM, Tim Harig wrote: >>> On 2010-11-18, dave wrote: >>>> http://sourceforge.net/projects/mysql-python/ >>>> >>>> Using this package, WITHOUT

Re: Using Python and Connecting to MySQL remotely WITHOUT MySQL installed on local computer

2010-11-17 Thread Steve Holden
o add that the trend for built-in extension modules is to require a reference implementation in Python to ease the task of those wishing to port the language and get as much functionality (albeit at some performance in cost) available as early in the porting cycle as possible. regards Steve -- St

Re: How to read such file and sumarize the data?

2010-11-17 Thread Steve Holden
On 11/17/2010 7:51 PM, Terry Reedy wrote: > On 11/17/2010 6:10 PM, Steve Holden wrote: > >> $ cat data.py >> lines = open("data.txt").readlines() > > Since you iterate through the file just once, there is no reason I can > think of to make a complete in-memo

Re: How to read such file and sumarize the data?

2010-11-17 Thread Steve Holden
n't affect the logic. $ cat data.py lines = open("data.txt").readlines() from collections import defaultdict c = defaultdict(int) for line in lines: ls = line.split() if len(ls) > 3 and ls[3].startswith("NCPU="): amt = int(ls[3][5:]) c[ls[0]] += a

Re: Raw Unicode docstring

2010-11-17 Thread Steve Holden
ke a noobish one. Thanks. > > Check out > http://cse.csusb.edu/dick/samples/python.syntax.html#stringprefix > which lists alternate string prefixes. > > Does any bodyy know if "ur" and "UR" mean the same thing? Yes, they do. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: What was your strategy?

2010-11-16 Thread Steve Holden
> the first book I reach for after 6 years of Python coding and it rarely > disappoints. +1 It's encyclopedic. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://

Re: strange behavor....

2010-11-14 Thread Steve Holden
to point me to such a method. I would prefer to think of a = something and lst[i] = something as in some sense different, because I see names as referencing locations in a namespace. Perhaps you can help to unify my perceptions. regards Steve -- Steve Holden +1 571 484 6266

Re: need some debug-infos on a simple regex

2010-11-12 Thread Steve Holden
t; Without examples of text that the regex is intended to match its > difficult to say more. > > Or you could look at the Kodos tool, which is written in Python and will tell you exactly what a Python pattern will and will not match. http://kodos.sourceforge.net/ regards Steve -

Re: How to test if a module exists?

2010-11-12 Thread Steve Holden
do. >> >> You can be such an ass sometimes. > > "Sometimes"? > OK, that's probably enough. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://py

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Steve Holden
27;s quite easy to "keep objects alive" that were created inside functions - just make sure you hold on to references outside the functions, and you are fine. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ S

Re: Copy Protected PDFs and PIL

2010-11-12 Thread Steve Holden
On 11/12/2010 12:00 PM, Brett Bowman wrote: > Steve Holden - > A traceback sounds like a great idea, but I don't know how to go about > it, or know what is involved. Could you suggest a tutorial I could follow? > The traceback is the listing of modules and line numbers that

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
0-11-12, Lawrence D'Oliveiro wrote: ? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
address. > > You mean from this one on > <http://mail.python.org/pipermail/python-list/2010-November/1259515.html>? Here's a screen capture from Thunderbird. Anything else you need? regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atl

Re: Copy Protected PDFs and PIL

2010-11-11 Thread Steve Holden
rogram gives a traceback or whether it's a PIL crash, for a start. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http

Re: How to test if a module exists?

2010-11-11 Thread Steve Holden
python-list, you would be > lying, would you not? I still await some insight (which, of course, you are under no obligation to provide) about just why you perceive these innocent mistakes to be great wrongs that need righting. regards Steve -- Steve Holden +1 571 484 6266

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Steve Holden
On 11/11/2010 3:23 PM, r0g wrote: > On 11/11/10 18:01, Steve Holden wrote: >> On 11/11/2010 9:22 AM, Stef Mientki wrote: >>> hello, >>> >>> finally got Python running at my server. >>> >>> Now I would like to replace the PHP server scripts wi

Re: is there an Python equivalent for the PHP super globals like $_POST, $_COOKIE ?

2010-11-11 Thread Steve Holden
$_Cookie ? > Google finds lots of links, but I can't find the answer. > > thanks, > Stef Mientki Stef: Moving from one language to anther is not just a matter of transliterating the code. Of you try that you will end up with a messy code base that looks like PHP written in Python

Re: DTD Parsing

2010-11-10 Thread Steve Holden
, for example, experimental work. I seem to remember that the major server project in "Python Web Programming" has all configurable modules importing a common Config module, though in my own defense that *was* almost ten years ago now. (That wasn't intended to be a production ser

Re: Questions: While And List Comprehension

2010-11-10 Thread Steve Holden
;two\n', 'three\n', 'four\n', 'five\n'] >>> f.next() Traceback (most recent call last): File "", line 1, in StopIteration >>> This suggests that you are mistaken about not exhausting the source. regards Steve -- Ste

Re: Questions: While And List Comprehension

2010-11-10 Thread Steve Holden
NT < 5 # ] ## Increment >> COUNT somewhere >> === > > print [v for v in sys.stdin.readlines()[:5]] > how about print [sys.stdin.readline() for i in range(5)] At least that won't consume the whole file. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3

Re: How to test if a module exists?

2010-11-10 Thread Steve Holden
, and it does little or no good to draw people's attention to it. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17 http://us.pycon.org/ See Python Video! http://python.mirocommunity.org/ Holden Web LLC http://w

Re: Looping through files in a directory

2010-11-10 Thread Steve Holden
times from a bash script. Any input or pointers to functions > that'd help would be very much appreciated. Thanks! > from glob import glob for filename in glob("*"): # do something with filename regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 Py

Re: A way to get setup.py to create links instead of copy

2010-11-09 Thread Steve Holden
tion, which might have added it for all users. If this is an issue you may want to undo the installation manually by removing its additions to your Python's Lib/site-packages directory. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atl

Re: Compare source code

2010-11-08 Thread Steve Holden
style guide) eschew the single-line form as less readable because the guarded suites (in this case, simple statements) are not flagged as clearly by indentation or a trailing colon, and are therefore more likely to be missed by the casual reader. regards Steve -- Steve Holden +1 571 484 6

Re: Compare source code

2010-11-07 Thread Steve Holden
On 11/7/2010 10:46 AM, Grant Edwards wrote: > On 2010-11-07, Steve Holden wrote: >> On 11/7/2010 8:23 AM, Grant Edwards wrote: >> [...] >>> (I bought 4:3 monitors before they got replaced by cheap 16:8 >>> screens) >> >> I think you'll fin

Re: Compare source code

2010-11-07 Thread Steve Holden
On 11/7/2010 8:23 AM, Grant Edwards wrote: [...] > (I bought 4:3 monitors before they got replaced by cheap 16:8 > screens) I think you'll find the new aspect ration is 16:9. regards Steve -- Steve Holden +1 571 484 6266 +1 800 494 3119 PyCon 2011 Atlanta March 9-17

  1   2   3   4   5   6   7   8   9   10   >