Re: abort python script from trace function

2011-07-26 Thread Dave Stark
Update: I ended getting the desired result by registering a new trace function. In my existing trace function I check the status of the abort button. When it's been triggered I register a NEW trace function using PyEval_SetTrace. I also use PyEval_SetProfile and point them both at my new tra

Re: How can I make a program automatically run once per day?

2011-07-27 Thread Dave Angel
On 01/-10/-28163 02:59 PM, John Salerno wrote: On Jul 26, 9:22 pm, Andrew Berg wrote: On 2011.07.26 08:05 PM,JohnSalernowrote:> Hmm, okay I'm finally trying Task Scheduler, but how do I set it to run a Python script? It seems to not work, I suppose because it's running the script but doesn't

Re: where the function has problem? n = 900 is OK , but n = 1000 is ERROR

2011-08-01 Thread Dave Angel
On 01/-10/-28163 02:59 PM, jc wrote: # Get Fibonacci Value #Fibonacci(N) = Fibonacci(N-1) + Fibonacci(N-2) # # n = 900 is OK # n = 1000 is ERROR , Why # # What Wrong? # cache = [] def fibo( n ): try: if cache[n] != -1: return cache[n] else:

Re: Equality check

2011-08-03 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Abhishek Jain wrote: How to check equality of two nos. in python Python doesn't have numbers, it has various numeric data types. If all you're concerned with are int types, then just use the obvous: if a == b: dosomething If one or both might

Re: problem with bcd and a number

2011-08-04 Thread Dave Angel
On 01/-10/-28163 02:59 PM, nephish wrote: Hey all, I have been trying to get my head around how to do something, but i am missing how to pull it off. I am reading a packet from a radio over a serial port. i have " two bytes containing the value i need. The first byte is the LSB, second is MSB.

Re: thread and process

2011-08-13 Thread Dave Angel
On 01/-10/-28163 02:59 PM, 守株待兔 wrote: please see my code: import os import threading print threading.currentThread() print "i am parent ",os.getpid() ret = os.fork() print "i am here",os.getpid() print threading.currentThread() if ret == 0: print threading.currentThread() els

Re: Re: allow line break at operators

2011-08-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Roy Smith wrote: In article<4e47db26$0$30002$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: Er, most URLs are case insensitive, at least the most common ones, including HTTP and HTTPS. So I don't quite see why you think this was a Whoops. URLs are mos

Re: Ten rules to becoming a Python community member.

2011-08-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, rantingrick wrote: On Aug 14, 12:57 am, rantingrick wrote: 9. Never use the word "previously" or the phrase "in the past"; just dumb it down with "used to". I had forgot to mention one other usage of "used to": WRONG: "I used to not like indention but know i am ver

Re: reading and writing files

2011-08-23 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Adrián Monkas wrote: Hi. I`ve been trying to copy a long text from one file to another but it always copied me just a small part. I would be glad if you can help me or explain which is my error. Thanks ---

Unspecified problem sending serial data

2011-08-24 Thread Dave Angel
Former subject line: reading and writing files On 08/24/2011 01:05 PM, Adrián Monkas wrote: Hi. thanks for answering so soon. What i want to do is send around 180KBytes via Serial port. First of all i have been trying to read from a file this amount of information and copy to another file. Tha

Python IDE/Eclipse

2011-08-26 Thread Dave Boland
lBundleAction). Cannot connect to keystore. This trust engine is read only. The artifact file for osgi.bundle,org.eclipse.cvs,1.0.400.v201002111343 was not found. Any suggestions on getting this to work? Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Unload a DLL

2011-02-24 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Sathish S wrote: Hi Ppl, I'm loading a dll using the *cdll.LoadLibrary *function. How can I release the dll after I'm done with it. Are there any functions to do this. Thanks, Sathish In Windows, the FreeLibrary() call will decrement the load count, and unload the

Re: Running Scripts vs Interactive mode

2011-02-24 Thread Dave Angel
On 01/-10/-28163 02:59 PM, grobs456 wrote: #I set my system environment variables to: VARIABLEVALUE PYTHON_HOME c:\python27\python.exe PATH...;%PYTHON_HOME% #after also trying this: VARIABLEVALUE PYTHON_HOME c:\python2

Re: Python encoding question

2011-02-25 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Marc Muehlfeld wrote: Hi, TEST = cursor.fetchone() print TEST[0] print TEST When I run this script It prints me: München ('M\xc3\xbcnchen',) Why is the Umlaut of TEST[0] printed and not from TEST? When you print a string, it simply prints it, control character

Re: A question about Cmd Class

2011-03-08 Thread Dave Angel
On 01/-10/-28163 02:59 PM, yuan zheng wrote: Hello, everyone: I encouter a question when implementing a commmand line(shell). I have implemented some commands, such as "start", "stop", "quit", they are easily implemented by "do_start", "do_stop" and "do_quit". there are no troubles. B

Re: A question about Cmd Class

2011-03-10 Thread Dave Angel
On 03/10/2011 01:38 AM, yuan zheng wrote: Thanks for your help. thanks, yuanzheng. 2011/3/8 Dave Angel On 01/-10/-28163 02:59 PM, yuan zheng wrote: Hello, everyone: I encouter a question when implementing a commmand line(shell). I have implemented some commands, such as "

generator / iterator mystery

2011-03-13 Thread Dave Abrahams
27;b',n) for n in range(3)), ...(('c',n) for n in range(3)) )) [('a', 0), ('a', 1), ('a', 2), ('b', 0), ('b', 1), ('b', 2), ('c', 0), ('c', 1), ('c', 2)] >>> list(chain( *(((x,n) for n in range(3)) for x in 'abc') )) [('c', 0), ('c', 1), ('c', 2), ('c', 0), ('c', 1), ('c', 2), ('c', 0), ('c', 1), ('c', 2)] Huh? Can anyone explain why the last result is different? (This is with Python 2.6) Thanks in advance! -- Dave Abrahams BoostPro Computing http://www.boostpro.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido rethinking removal of cmp from sort method

2011-03-13 Thread Dave Abrahams
orting. Think of the heap churn! Even if it turns out that Python 3 contains some magic implementation detail that makes it efficient most of the time, it goes against a natural understanding of the computation model 2p for y'all. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: puzzle about file Object.readlines()

2011-03-19 Thread Dave Angel
On 01/-10/-28163 02:59 PM, MRAB wrote: On 19/03/2011 13:15, 林桦 wrote: i use python 2.5. os is window 7. the puzzle is :python don't read the leave text when meet character: chr(26) the code is: /fileObject=open('d:\\temp\\1.txt','w') fileObject.write('22\r\n') fileObject.write(chr(26

Re: python time

2011-03-20 Thread Dave Angel
On 01/-10/-28163 02:59 PM, ecu_jon wrote: I'm working on a script that will run all the time. at time specified in a config file, will kick-off a backup. problem is, its not actually starting the job. the double while loop runs, the first comparing date works. the second for hour/min does not. #

Re: Why aren't copy and deepcopy in __builtins__?

2011-03-28 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Andrea Crotti wrote: John Ladasky writes: Simple question. I use these functions much more frequently than many others which are included in __builtins__. I don't know if my programming needs are atypical, but my experience has led me to wonder why I have to import

Re: Re: Equivalent code to the bool() built-in function

2011-04-17 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Daniel Kluev wrote: On Sun, Apr 17, 2011 at 8:38 AM, Ben Finney wrote: It won't look up the *name* ‘bool’, but it will use that object. Any boolean expression is going to be calling the built-in ‘bool’ type constructor. So the answer to the OP's question is no: the f

Re: Feature suggestion -- return if true

2011-04-17 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Chris Angelico wrote: Sure. In my (somewhat contrived) example of factorials, that's going to be true (apart from 0! = 0); and if the function returns a string or other object rather than an integer, same thing. If there's the Just to be pedantic, by any reasonable

Re: [OT] Piling of prepositions (was: Namespaces in functions vs classes)

2011-04-19 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Ben Finney wrote: "Rhodri James" writes: Language abuse: it's not just Python. A donation of just $5 will keep a programmer in prepositions for a month. $50 will supply enough articles to keep a small company understandable for over a year. With your generous help, w

Re: Re: learnpython.org - an online interactive Python tutorial

2011-04-24 Thread Dave Angel
On 01/-10/-28163 02:59 PM, harrismh777 wrote: Cameron Simpson wrote: | folks are not aware that 'bc' also has arbitrary precision floating | point math and a standard math library. Floating point math? I thought, historically at least, that bc is built on dc (arbitrary precision integer math, r

Re: Fibonacci series recursion error (slightly OT)

2011-05-02 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Chris Angelico wrote: On Mon, May 2, 2011 at 3:36 PM, Hans Georg Schaathun wrote: On Mon, 2 May 2011 06:49:41 +1000, Chris Angelico wrote: : Sure. Serialize this Python object in a way that can be given to, say, PHP: : foo=asdf":"qwer","zxcv":"1234"}; foo["self"

Re: Recursion or iteration (was Fibonacci series recursion error)

2011-05-03 Thread Dave Angel
On 01/-10/-28163 02:59 PM, rusi wrote: On May 3, 10:29 am, Chris Angelico wrote: On Tue, May 3, 2011 at 3:27 PM, Dan Stromberg wrote: Doh. Usually when someone gives a recursive solution to this problem, it's O(logn), but not this time. Here's a logn one: :-) Ok so you beat me to it :D

Re: Obtaining a full path name from file

2011-05-25 Thread Dave Angel
On 01/-10/-28163 02:59 PM, RVince wrote: s = "C:\AciiCsv\Gravity_Test_data\A.csv" f = open(s,"r") How do I obtain the full pathname given the File, f? (which should equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff and am just not finding it. Any help greatly appreciated !

Re: searching in list

2011-05-30 Thread Dave Angel
On 01/-10/-28163 02:59 PM, vino19 wrote: I want to make a function that is called only once per one argument. I mean I want to store data of function calling to prevent calling it again if there is no need. How to make it? For example I can make a global list that just consist of tuples [(arg1,

python 3.9.12 and python 3.10

2022-05-03 Thread Dave Francis
3.9 appeared with my old errors. I uninstalled 3.10 as 3.9 did not appear in control panel. Dell Inspiron 3793 Win 10 Thanks Dave Francis -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating logs with Python

2023-02-22 Thread Dave (NK7Z)
Thank you Gerard! I am working on a project and needed that... :) 73, and thanks, Dave (NK7Z) https://www.nk7z.net ARRL Volunteer Examiner ARRL Technical Specialist, RFI ARRL Asst. Director, NW Division, Technical Resources On 2/22/23 07:03, Weatherby,Gerard wrote: https://docs.python.org/3

Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
# starAbsMags=df['radial_velocity'] #GaiaPandasEscapeVelocityCode import pandas as pd import numpy as np from astropy.io import fits import astropy import matplotlib.pyplot as plt #get the combined data and load the fits files fits_filename="Gaia_DR2/gaiadr2_100pc.fits" df=pd.DataFrame() wit

python is bugging

2019-09-21 Thread Dave Martin
what does expected an indented block -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin wrote: > what does expected an indented block *what does an indented block mean? -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 12:44:27 PM UTC-4, Brian Oney wrote: > On Sat, 2019-09-21 at 08:57 -0700, Dave Martin wrote: > > On Saturday, September 21, 2019 at 11:55:29 AM UTC-4, Dave Martin > > wrote: > > > what does expected an indented block > > > &g

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > On 9/21/2019 11:53 AM, Dave Martin wrote: > > > > # starAbsMags=df['radial_velocity'] > > > > #GaiaPandasEscapeVelocityCode > > > > import pandas as pd > > import

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Dave Martin
On Saturday, September 21, 2019 at 2:46:15 PM UTC-4, boB Stepp wrote: > On Sat, Sep 21, 2019 at 1:01 PM Dave Martin wrote: > > > > On Saturday, September 21, 2019 at 1:33:12 PM UTC-4, Terry Reedy wrote: > > > On 9/21/2019 11:53 AM, Dave Martin wrote: > [...] > &g

ANNOUNCE: Thesaurus and ThesaurusCfg - recursive mapping and cfg file data types

2019-11-13 Thread Dave Cinege
cfg.opt.verbose True import json >>> print(json.dumps(cfg, indent=4, separators=(',', ': '))) { "prog": { "version": 123 }, "opt": { "verbose": true }, "hi": "Hello" } browse: https://git.cinege.com/thesaurus/ or git clone https://git.cinege.com/thesaurus/ --- Dave -- https://mail.python.org/mailman/listinfo/python-list

Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Dave Cinege
Can you expand on what you are trying to accomplish with this? It seems a small C program or library you interface python too is a better solution. With that said, as others mentioned you might need a real time OS or micro controller if this needs to be dead on timing. Dave On 2019/11/13 09

Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Dave Cinege
, my advise is doing this *reliably*. In that regard you might need look at locking your C process to 1 CPU and giving it highest priority. (man nice) Once you have this working reliably, you could then look to convert it to a python c-module to more tightly integrate it. Dave On 2019/11

Re: low-level csv

2019-11-17 Thread Dave Cinege
mmas while honoring quoted values (and stripping out the quotes) Dave On 2019/11/17 08:18, Antoon Pardon wrote: This is python 2.6->2.7 and 3.5->3.7 I need to convert a string that is a csv line to a list and vice versa. I thought to find functions doing this in the csv module but that do

Visualize dataframes in 2 lines

2020-08-22 Thread Dave Dawson
import sho sho.w(dataframe) Install : pip install sho Medium Article: https://medium.com/@davewd/sho-w-dataframe-my-first-package-b7242088b78f Github: https://github.com/davewd/sho -- https://mail.python.org/mailman/listinfo/python-list

Re: Accessing class variable at class creation time

2005-09-26 Thread Dave Hansen
nce, and calling A.F(instance) or instance.F() throws a TypeError (argument count) exception. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to find python c-sources

2005-09-29 Thread Dave Benjamin
thon/dist/src/ For example, the file you asked for is viewable here: http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Modules/socketmodule.c?rev=1.314&view=auto Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Duplicating Modules

2005-09-30 Thread Dave Benjamin
dname) sys.modules[newname] = sys.modules[oldname] sys.modules[oldname] = tmp else: result = __import__(oldname) sys.modules[newname] = sys.modules[oldname] del sys.modules[oldname] return result Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-09-30 Thread Dave Benjamin
obody could agree, the Benevolent Dictator did what only a dictator can do, and just made a damn decision already. Thank you, Guido! =) Dave -- http://mail.python.org/mailman/listinfo/python-list

Python profiler

2005-09-30 Thread Celine &amp; Dave
the symbol table to retrieve a specific item, and things like that. Thanks, Dave __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python chess module

2005-09-30 Thread Dave Hansen
Can anyone suggest a name for this module? pyChess is already taken... > >Pyawn??? As a play on "pawn?" that wasn't the way I first took it (ho-hum...) How about pyTurk, after the first chess automaton? It seems to be available. Regards,

Python profiler

2005-10-03 Thread Celine &amp; Dave
'e') The dis module provides the following: 0 LOAD_GLOBAL0 (dict) 3 LOAD_ATTR1 (has_key) 6 LOAD_CONST 1 ('e') 9 CALL_FUNCTION 1 12 PRINT_ITEM But this doesn't really help to see what's going on with

Python Debug Build

2005-10-03 Thread Celine &amp; Dave
Hi, What happens if I build Python with debug option (--with-pydebug)? Do I see any changes in my program output? What is --with-pydebug good for? Thanks. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com -- http://mail.p

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
;studied nuclear engineering at the naval acadamy, and should at >least be able pronounce the word. "I was talking to my daughter, Amy, last night..." Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
. (Words enclosed in /slashes/ represent italics.) The dictionary? "The American Heritage Dictionary of the English Language, New College Edition." Still sounds wrong to me, though. -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-10-07 Thread Dave Hansen
On Fri, 7 Oct 2005 16:18:57 -0500, Terry Hancock <[EMAIL PROTECTED]> wrote: >On Friday 07 October 2005 01:31 pm, Dave Hansen wrote: Actually, I didn't, though I did respond to it. Please watch your attributions. Thanks, -=Dave -- Change is inevit

Re: dictionaries/pointers

2005-10-07 Thread Dave Hansen
+---+ > >Where if I change "a" or "b" to 3 the other one will change? >Is this even possible? How would I do it? A simple, ugly answer: Use a mutable object rather than a plain integer. Example: >>> elt = [1] >>> dict = {"a":elt, "

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-10 Thread Dave Hansen
on. > >Python's main advantage over other languages, for me, is that >it makes me run to the manual a lot less, and I generally don't >get confused trying to follow other people's code. I'm inexperienced enough to keep Beazley's book at my elbow when writin

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-12 Thread Dave Hansen
On Tue, 11 Oct 2005 01:06:30 -0400, "George Sakkis" <[EMAIL PROTECTED]> wrote: >"Dave Hansen" <[EMAIL PROTECTED]> wrote: > >> On Mon, 10 Oct 2005 16:42:34 -0500, Terry Hancock >> <[EMAIL PROTECTED]> wrote: >> >> >On Sunday 09

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-12 Thread Dave Hansen
ficulty to distinguish this in time from the if >statement. This is because the parser doesn't use a very strong formalism. So lose the "if." R = C then A else B I don't think python uses the question mark for anything. Throw that in, if it makes parsing easier: R = C

Re: Jargons of Info Tech industry

2005-10-12 Thread Dave Hansen
hat "pictures are not code." Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: [Info] PEP 308 accepted - new conditional expressions

2005-10-13 Thread Dave Hansen
On Thu, 13 Oct 2005 21:49:15 +0200, Piet van Oostrum <[EMAIL PROTECTED]> wrote: >>>>>> [EMAIL PROTECTED] (Dave Hansen) (DH) wrote: > >>DH> So lose the "if." > >>DH>R = C then A else B > >>DH> I don't think python use

Re: Well written open source Python apps

2005-10-17 Thread dave . brueck
ointing out that it is probably not at all what the OP is looking for (well-written Python, stuff that is generally considered "very Pythonic"). -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Yes, this is a python question, and a serious one at that (moving to Win XP)

2005-10-17 Thread dave . benjamin
nd to keep this on topic, Cygwin's Python works just fine in mrxvt, though the native Windows version doesn't work so well. It doesn't print any output, which I think is due to buffering... however, I tend to use PythonWin for interactive development, and emacs with M-x shell to actually test and run (native) Python scripts. I'm pretty happy with it, overall. Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Extention Woes

2005-10-19 Thread Dave Brueck
ifferent applications. Best of luck, -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: destroy your self????

2005-10-19 Thread Dave Brueck
need to do, but this isn't it. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: destroy your self????

2005-10-19 Thread Dave Brueck
KraftDiner wrote: > Well I guess what I'm trying to achive is the invalidate the instance > of the object. > I have been using None to denote an invalide or uninitialized instance > of an object. > > There is a degenerate case in my code where a polygon has less than 3 > points and > I want to cla

Re: Python vs Ruby

2005-10-19 Thread Dave Cook
On 2005-10-20, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Languages are very similar but Python has more cale avaliable. Much > more. Cale? You mean Python has more ruffage? Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: System tray Icon

2005-10-23 Thread Dave Brueck
Mike Pippin wrote: > How would I have an app run with just a system tray Icon??? any help > would be greatly appreciated. I have no clue where to start. Choose a GUI toolkit, e.g. wxPython. -- http://mail.python.org/mailman/listinfo/python-list

Re: Any Pythonic GTK Undo library?

2005-10-29 Thread Dave Cook
ld be great to have this feature in the Gtk C API, though. I do see some relevant bugzilla entries: http://bugzilla.gnome.org/show_bug.cgi?id=316551 You might want to make a new request for a general undo/redo interface. Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: Rename files with numbers

2005-10-31 Thread Dave Benjamin
handful of albums to rename, trust me. This problem has been solved. Here's a list of apps, including Tag&Rename, that can query freedb: http://www.freedb.org/freedb_aware_apps.php -- .:[ dave benjamin: ramen/[sp00] ]:. \\ "who will clean out my Inbox after I'm dead[?]"

Re: Object-Relational Mapping API for Python

2005-11-01 Thread Dave Cook
Python ones); you usually lose a lot of the power of relational databases. Dave Cook -- http://mail.python.org/mailman/listinfo/python-list

Re: Threading

2005-11-02 Thread Dave Brueck
q = Queue.Queue() # this queue is shared with the worker thread # Start up a worker t = threading.Thread(target=Work, args=(q,)) t.start() # Give it stuff to do for i in range(5): q.put(i) # signal end of work q.put(None) print 'Main thread waiting for worker to be done' t.join()

Re: Underscores in Python numbers

2005-11-08 Thread Dave Hansen
ant 1200, that I see great value in being able to specify 12_000_000. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

page faults when spawning subprocesses

2005-11-09 Thread Dave Kirby
seen this problem? 4) are there any other situations that could be causing a continuous stream of minor page faults? 5) WTF can I do about it? Dave Kirby (dave.x.kirby at gmail dot com) -- http://mail.python.org/mailman/listinfo/python-list

Re: is parameter an iterable?

2005-11-15 Thread Dave Hansen
>>> joe = foo2([1,3,5,7,9]) 1 3 5 7 9 Success! >>> print joe 0 >>> bob = foo2(2) Bad foo. No donut. iteration over non-sequence >>> print bob -1 >>> Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Reinvent no more forever

2005-11-18 Thread Dave Hansen
quot;... ITYM "EnumOMatic" or "Enum_O_Matic". "Enum-O-Matic" is a syntax error. Or worse... Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to do "new_variable = (variable) ? True : False; " (php) on python?

2005-11-18 Thread Dave Hansen
you expect force. Do or do not, there is no try. Things as they are use. Duck-typing embrace. >:-) Ditto. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Underscores in Python numbers

2005-11-18 Thread Dave Hansen
Sorry for the delayed response. I somehow missed this earlier. On Tue, 8 Nov 2005 15:39:09 + (UTC) in comp.lang.python, [EMAIL PROTECTED] (Roy Smith) wrote: >Dave Hansen <[EMAIL PROTECTED]> wrote: >> Of course, I write _far_ more code in C than Python. But I've seen &

Re: Hot to split string literals that will across two or more lines ?

2005-11-22 Thread Dave Hansen
bly not what you want." >>> """\ So you need to add spaces, but make sure they're \ before the backslash, and not after.""" "So you need to add spaces, but make sure they're before the backslash, and not after." >>> Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Converting a flat list to a list of tuples

2005-11-22 Thread Dave Hansen
ip(it, it) >>> [('a', 1), ('b', 2), ('c', 3)] >> [...] > >Hm, actually, something tells me I've seen some variation of this before, >but I can't think of the context off hand. Earlier this fall I posted a question about iteratin

Profiling from embedded C [newbie]

2005-11-22 Thread Dave Bronner
they invoke the python profiler module? I'm pretty new to python, so specific examples or links to docs would be much appreciated. Thanks, Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: defining the behavior of zip(it, it) (WAS: Converting a flat list...)

2005-11-23 Thread Dave Hansen
m? ISTM that one would use itertools.izip in order to get some functionality not available from zip. Perhaps this is one of those bits of functionality. But I admit, I'm not all that familiar with itertools... In any case, the solution seems obvious: if you want the guarantee, use the tool that p

Dynamic classes

2005-11-25 Thread Dave Rose
had a name on the list, Dave, I could then be able to read the name in the list, and assign Maria.birthday = <> and all the other attributes I would want to use a class for, except this is dynamic. I don't know how to iterate thru the list to assign the different attributes yet,

Re: Dynamic classes

2005-11-26 Thread Dave Rose
Duh! how dumb am I? A dictionary solves all those problems, with each entry named, and the value of each name could be a class instace. plus all the class instances can be iterated by a loop. Thanks Piet & Alex for your guidance! -Dave "Piet van Oostrum" <[EMAIL PROTECTED]&

Re: PYTHONDOCS on OSX

2005-11-28 Thread Dave Opstad
oper Docs/Python-Docs-2.4.1' So by analogy, you could try adding this to your profile: export PYTHONDOCS='/usr/local/PythonDocs' Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question concerning formatted output

2005-11-29 Thread Dave Hansen
len(data),3): tl = data[i:i+3] for d in tl: print d, print inp.close() HTH, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Compiling Guppy-PE extension modules

2005-11-29 Thread Dave Hansen
later version of the compiler, or you might need to use some other compiler that doesn't support multiline strings, and you're back where you started. [...] > >PS. I know it's not ANSI-correct but why do we have to work to make >our source codes less clear? Hysterical raisins. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python as Guido Intended

2005-11-30 Thread Dave Hansen
t;> saying that removing things *always* makes a langauge more >> powerful. That's not what I said, > >I would say it is the common interpretation for such a sentence. I hope no one ever tells you that you'd be healthier if you ate less and exercised more. (Perhaps it's

Re: python speed

2005-11-30 Thread Dave Brueck
tually executes is highly specialized. So, yeah, knowledge of the runtime behavior can allow a hand-optimized version to run faster than a static, automatically-generated version, but knowledge of the runtime behavior could also allow a dynamic code generator to even beat the hand-optimized version. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Quene

2005-11-30 Thread Dave Hansen
found: >remove 4 from quene #(Not python code, not sure how to do this...) queue.remove(found[0]) HTH, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-02 Thread Dave Hansen
I say that. I've never seen TAB characters solve more problems than they cause in any application. But I suspect I'm a lone voice crying in the wilderness. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Why my modification of source file doesn't take effect when debugging?

2005-12-05 Thread Dave Hansen
could mean you module worked when you were debuggining it because of some initialization that doesn't get performed in a clean start. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dao Language v.0.9.6-beta is release!

2005-12-08 Thread Dave Hansen
today (as long as you also obey indentation rules). Just mark the end of your blocks with #endif, #endfor, #endwhile, #enddef, #endclass, #endwhatever as appropriate. Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org

Re: Bitching about the documentation...

2005-12-08 Thread Dave Hansen
d or had had been correct had had had Regards, -=Dave -- Change is inevitable, progress is not. -- http://mail.python.org/mailman/listinfo/python-list

Re: Lambda as declarative idiom (was RE: what is lambda used for in real code?)

2005-01-03 Thread Dave Benjamin
eyword, breaking backward compatibility (I'm assuming we're still talking about Py3k here) - (Still) doesn't interface statements with expressions Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: Python evolution: Unease

2005-01-04 Thread Dave Brueck
e language will accept missing declarations but as soon as the feature is available it will become "mandatory" to use it (peer pressure, workplace practices). That's my fear - type declarations could become one of the most abused language features because they'd get used too ofte

Re: Python evolution: Unease

2005-01-04 Thread Dave Brueck
Roman Suzi wrote: On Tue, 4 Jan 2005, Dave Brueck wrote: It may be optional in the sense that the language will accept missing declarations but as soon as the feature is available it will become "mandatory" to use it (peer pressure, workplace practices). What about generic programm

Re: Python evolution: Unease

2005-01-04 Thread Dave Brueck
t; and "concepts" don't yet have a widely recognized, strict definition in the context of programming. If somebody has assigned some specific definition to them, that's great, it's just not universal yet so references and additional explanations are helpful. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Installing IPython on win2k

2005-01-08 Thread Dave Merrill
orant flailing about. Very much looking forward to getting this working. Thanks, Dave Merrill -- http://mail.python.org/mailman/listinfo/python-list

Re: Installing IPython on win2k

2005-01-08 Thread Dave Merrill
"Tim G" wrote in message news:[EMAIL PROTECTED] > Dave Merrill wrote: > > Hi, I'm new to python, and ipython, but not to programming, having > trouble > > getting ipython installed on windows 2000, python 233. Any help would > be > > much appreciate

Re: Installing IPython on win2k

2005-01-08 Thread Dave Merrill
it if ipython could be invoked in the current debugger context in PyDev under Eclipse. Is there any way to do that? Thanks again, Dave Merrill -- http://mail.python.org/mailman/listinfo/python-list

C structure in the Python extension

2005-01-10 Thread Dave win
ABSUB(FU); return Py_BuildValue("i",result); } Thx. Dave. -- http://mail.python.org/mailman/listinfo/python-list

<    5   6   7   8   9   10   11   12   13   14   >