Re: Python Print Error

2016-07-28 Thread Timothy
On Thu, 28 Jul 2016 10:40:28 -0700, Cai Gengyang wrote: > How to debug this ? > print "This line will be printed." > SyntaxError: Missing parentheses in call to 'print' You are probably using Python 3, while the syntax is for Python 2. Use print("This line will be printed.") instead. -- htt

RE: Developing Commercial Applications in Python

2005-01-03 Thread Delaney, Timothy C (Timothy)
Christophe Cavalaria wrote: > [EMAIL PROTECTED] wrote: > >> Hello All, >> I am trying to convince my client to use Python in his new product. >> He is worried about the license issues. Can somebody there to point >> me any good commercial applications developed using python ?. The >> licence clea

RE: interpreter Py_Initialize/Py_Finalize mem leak?

2005-01-09 Thread Delaney, Timothy C (Timothy)
Roman Suzi wrote: > In pure curiosity I tried to compile loop.c from Demo/embed > and started it with 'print 2+2'. It seems, that both 2.3 and 2.4 > pythons have memory leaks in Py_Initialize/Py_Finalize calls. > (That is, interpreter doesn't clean up well after itself). What's your evidence for

RE: shutil.move has a mind of its own

2005-01-10 Thread Delaney, Timothy C (Timothy)
Daniel Bickett wrote: > shutil.move( "C:\omg.txt" , "C:\folder\subdir" ) ^ ^^ ^ The problem is that backslash is the escape character. In particular, '\f' is a form feed. >>> '\o' '\\o' >>> '\f' '\x0c' >>> '\s' '\\s' Notice how for '\o' and '\s' it doub

RE: sorted (WAS: lambda)

2005-01-13 Thread Delaney, Timothy C (Timothy)
Terry Reedy wrote: > No, not same difference. A list method would only operate on lists, > as is true of all list methods. Being a function lets it work for > any iterable, as is true of any function of iterable. Big > difference. And consistent. One could argue though that it should > have be

RE: generator expressions: performance anomaly?

2005-01-16 Thread Delaney, Timothy C (Timothy)
Raymond Hettinger wrote: > Check out the current source. The time machine beat you to it. Nick's other suggestion - that genexps propagate __len__ - might still be interesting. Of course, it would only be applicable for unconditional genexps(i.e. no if clause). Tim Delaney -- http://mail.python

RE: fefinining % of c'm'y and k

2005-01-16 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > hello > i need a program (and pleas shoe me the modol in the softwar) that : > if i have a scaned photo > i want to define out of each poligon color ,as it seems in the photo, > the cmyk > in % (percets) of the color/ > 4 exampl from poligon color orang defin the cmyk in

RE: Distutils: blurring the file==module borders

2005-01-24 Thread Delaney, Timothy C (Timothy)
Frans Englich wrote: > in ./foo/ I have an __init__.py and a handful of files named > ClassA.py, ClassB.py, ClassC.py and so forth. > > import foo.ClassA > > var = foo.ClassA.ClassA() > > while I want to do var = foo.ClassA() > > In other words, the result I want can be achieved by putting all

RE: On benchmarks, heaps, priority queues

2005-01-26 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > PQPython23 - the Lib implementation > PQ0 - my insertion sort based variant > PQueue - my "heap" based variant > (like PQPython23, but different). First of all, you should be running these benchmarks using Python 2.4. heapq is considerably faster there ... (Raymond Hett

RE: Which is faster?

2005-01-26 Thread Delaney, Timothy C (Timothy)
Aggelos I. Orfanakos wrote: > Any idea which of the following is faster? > > 'a/b/c/'[:-1] > > or > > 'a/b/c/'.rstrip('/') > > Thanks in advance. > > P.S. I could time it but I thought of trying my luck here first, in > case someone knows already, and of course the reason. First, it almost c

RE: Pystone benchmark: Win vs. Linux (again)

2005-01-30 Thread Delaney, Timothy C (Timothy)
Franco Fiorese wrote: > * Windows XP Pro: 16566.7 pystones/second > * Linux (kernel 2.6.9 NPTL): 12346.2 pystones/second First of all, realise that pystone is not meant to be a general-purpose benchmarking program. It test a specific, *small* subset of the functionality available in Python.

RE: Next step after pychecker

2005-02-01 Thread Delaney, Timothy C (Timothy)
huy wrote: > do not yet have good coverage. TDD is a quite hard to practice as a > beginner. It's even harder to bolt onto an existing codebase :( Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: Why does super() require the class as the first argument?

2005-02-06 Thread Delaney, Timothy C (Timothy)
Nick Coghlan wrote: > It *is* possible to eliminate the explicit class argument, but it > takes a bit (*cough*) of work: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286195 Nick - you stole my thunder ;) Note that my recipe uses a sys._getframe() hack, so it will never be in Python

RE: Alternative to standard C "for"

2005-02-06 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > 2) for i in range(A, B, STEP): > ...do something... Note that the most common use of this is something like: t = 1, 2, 3 for i in range(len(t)): print i, t[i] This is best accomplished as: t = 1, 2, 3 for i, e in enumerate(t): p

RE: strange behaviour with decorators.

2005-02-09 Thread Delaney, Timothy C (Timothy)
Antoon Pardon wrote: > Ah, yes, the penny dropped. The try: except where there because > originally there were other statements I wanted to test and I > didn't want the raise exception by the inc(-2) stop the script. > I completely forget to consider it would also catch the > error I was expecting

RE: [N00B] What's %?

2005-02-10 Thread Delaney, Timothy C (Timothy)
Harlin wrote: > In the mode of anticipating another question... I get these all the > time at work of all places! You'd think IT workers would know the > answer to these... > > What good is the modulus operator? What would I ever need it for? # Print a summary every 100 rows for i in range(1, 10

RE: custom classes in sets

2005-02-13 Thread Delaney, Timothy C (Timothy)
vegetax wrote: > def __hashcode__(s): return s.path.__hashcode__() Try __hash__ ... Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

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

2005-02-14 Thread Delaney, Timothy C (Timothy)
Stephen Kellett wrote: > In message <[EMAIL PROTECTED]>, Ilias Lazaridis > <[EMAIL PROTECTED]> writes >>> And yet there is not one company that has someone devoted full-time >>> to developing Python. Not even Guido. >> >> Who's "Guido"? > > LOL Falling off my chair!! See, the problem is t

RE: Inheritance error in python 2.3.4???

2005-02-14 Thread Delaney, Timothy C (Timothy)
[EMAIL PROTECTED] wrote: > I guess I could just use one underscore but that means it is > easier for other people to get at my implementation details (which, > coming from a C++ background really bothers me). This is the correct solution, and getting over being bothered about it is the correc

RE: Why doesn't join() call str() on its arguments?

2005-02-16 Thread Delaney, Timothy C (Timothy)
John Roth wrote: > result = "".join([str(x) for x in list]) As of 2.4, you should use a generator expression here instead (unless you require backwards-compatibility with 2.3). result = ''.join(str(x) for x in iterable) Easier to read, more memory-efficient, potentially faster (depending on

RE: parameter name conflict. How to solve?

2005-03-07 Thread Delaney, Timothy C (Timothy)
Steven Bethard wrote: >> If you ask: why do you choose these names? The answer is: they need >> to be conformable with other functions, parameter names. Is this a style guide thing? >> I have a function that pretty much like: >> >> def output(output=''): >> print output >> >> and now in anot

RE: Default function arguments, KURL::cleanPath() -- a bindings bug?

2005-03-07 Thread Delaney, Timothy C (Timothy)
Frans Englich wrote: > Apparently, cleanPath /requires/ a boolean argument, but the C++ > function definition says: > > void cleanPath(bool cleanDirSeparator = true); Most likely that cleanPath's default parameter hasn't been declared to *Python*. If so, I expect this is a KURL bug. Raise a bu

RE: Best way to make a list unique?

2005-03-08 Thread Delaney, Timothy C (Timothy)
Diez B. Roggisch wrote: > No. But I doubt that that is what you actually want, as listA will > lose its order afterwards. Typically, something like that gets > written like this: This is actually one thing that Java 1.5 has that I'd like to see in Python - the LinkedHashSet and LinkedHashMap. Ve

RE: parameter name conflict. How to solve?

2005-03-08 Thread Delaney, Timothy C (Timothy)
Bo Peng wrote: >> Is this a style guide thing? >> >> Why not just: >> >> def func(output_param=''): >> output(output=output_param) >> > > This is exactly the problem. There are a bunch of other functions that > use output='' parameter. Changing parameter name for this single > function may

RE: Best way to make a list unique?

2005-03-08 Thread Delaney, Timothy C (Timothy)
Steven Bethard wrote: > Sounds like a good candidate for the collections module. Of course > someone will need to implement it. ;) I'll suggest it to Raymond ... ;) Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: Best way to make a list unique?

2005-03-08 Thread Delaney, Timothy C (Timothy)
Michael Hoffman wrote: >>> For those who don't know, these implement a hash set/map which >>> iterates in the order that the keys were first added to the set/map. > > I would love to see such a thing. I've proposed this on python-dev, but the general feeling so far is against it. So far the only

RE: Conversion to string: how do `s work?

2005-03-14 Thread Delaney, Timothy C (Timothy)
Chris Lasher wrote: > I'm working my way through _Learning_Python_ 2nd ed., and I saw > something peculiar which is not explained anywhere in the text. > > print " " + file + " size=" + `size` > > The `s appear to somehow automagically convert the integer to a string > for concatenation. How doe

RE: code for Computer Language Shootout

2005-03-16 Thread Delaney, Timothy C (Timothy)
Jacob Lee wrote: >> # alias methods to avoid repeated lookup >> join = ''.join I would actually do the alias here sometimes, but give it a semantically-useful name ... nosep_join = ''.join ... Tim Delaney -- http://mail.python.org/mailman/listinfo/python-list

RE: decorators ?

2004-12-02 Thread Delaney, Timothy C (Timothy)
Michael Hudson wrote: > Skip Montanaro <[EMAIL PROTECTED]> writes: > >> Jacek> Anything you can do with decorators, you could do before >> (with Jacek> the exception of rebinding the __name__ of >> functions). >> >> And while that feature was added because we realized it would be >> nic

RE: How is Python designed?

2004-12-02 Thread Delaney, Timothy C (Timothy)
Roy Smith wrote: > As far as I can tell, the process works like this: > > Guido has an idea for something he wants to do and announces it. > > Everybody beats him up about it. > > He goes ahead and does it anyway. > > It's a strange process, but it seems to work. It's not quite that straightf

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 ^ > get a 'bad magic number' try

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)
Andreas Beyer wrote: > Yeeh, I was expecting something like that. The only reason to use > map() at all is for improving the performance. > That is lost when using list comprehensions (as far as I know). So, > this is *no* option for larger jobs. Try it and see. You'll probably be pleasantly surp

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: 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: 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 type of situation, Py

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

trying to unsubscribe

2012-10-02 Thread timothy holmes
My efforts at trying to unsubscribe are not working. Could you help me with this, or take this email as a request to unsubscribe. Thanks, Timothy Holmes -- http://mail.python.org/mailman/listinfo/python-list

Site Packages Folder Red on Clean Install

2019-12-10 Thread Timothy Coca
Hello, I have a new dell XPS, I freshly installed the latest version of Pythong (3.8.0) and pycharm. Pycharm shows the site packages folder as red, and I can not import and modules from inside of it. Pip install works to install some programs like numpy, scipy, but would not install matplotlib suc

catching all tracebacks

2005-10-05 Thread Timothy Smith
iw ant to use a singel try except statment with my main app loop in the middle and catch all tracebacks and email them to myself as a bug report. however it seems a little more tricky then i thought try: Main.Main() except Exception, err_o: print err_o.__class__.__name__, '//', err_o, '/

Re: catching all tracebacks

2005-10-05 Thread Timothy Smith
Timothy Smith wrote: >iw ant to use a singel try except statment with my main app loop in the >middle and catch all tracebacks and email them to myself as a bug >report. however it seems a little more tricky then i thought > >try: >Main.Main() >except Exception, er

non descriptive error

2005-10-06 Thread Timothy Smith
i try to run my app and i get this %python DutyShift.py error thats it. thats the error. mya pp was previously working, and i did make some fairly large changes to it, but i'd expect a more descriptive message then just "error". anyidea where i need to start looking? -- http://mail.python.org

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Terry Hancock wrote: >On Thursday 06 October 2005 11:57 pm, Timothy Smith wrote: > > >>i try to run my app and i get this >> >>%python DutyShift.py >>error >> >>thats it. thats the error. mya pp was previously working, and i did make >>som

Re: non descriptive error

2005-10-09 Thread Timothy Smith
i have reproduced the error in this code block #save values in edit self.FinaliseTill.SaveEditControlValue() if Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalance'])) == Decimal('0'): #box must be ch

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Timothy Smith wrote: >i have reproduced the error in this code block > >#save values in edit > self.FinaliseTill.SaveEditControlValue() > if >Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()]['ChangeTinBalanc

Re: non descriptive error

2005-10-09 Thread Timothy Smith
[EMAIL PROTECTED] wrote: >On Mon, Oct 10, 2005 at 09:12:13AM +1000, Timothy Smith wrote: > > >>FAYI i have already found it and it was a wrongly indented code block :/ >> >> > >When indentation leaves an illegal program structure, Python gives a very &g

Re: non descriptive error

2005-10-09 Thread Timothy Smith
Neil Hodgson wrote: >Timothy Smith: > > > >>FYI i have located where the problem was. in the first if statement >>there was an unbalanced ). now since when does python not give a >>descriptive error for that? >> >> > >I see this with the

Re: non descriptive error

2005-10-11 Thread Timothy Smith
Fredrik Lundh wrote: >Timothy Smith wrote: > > >>i have reproduced the error in this code block >> >>#save values in edit >>self.FinaliseTill.SaveEditControlValue() >>if >>Decimal(self.parent.TillDetails[self.TillSelection.GetStringSelection()][&#

Re: Python obfuscation

2005-11-10 Thread Timothy Smith
> Reliability is >important but so is protecting your code in an effective manner > > there is no way to prevent people disassembling your code compiled or otherwise. once you give then the program they can easily take it apart. no if's, no but's; do NOT rely on binary's for security. > >the

Re: an intriguing wifi http server mystery...please help

2005-11-30 Thread Timothy Smith
Paul McNett wrote: >[EMAIL PROTECTED] wrote: > > >>1) >>Laptop wired, client >>Desktop wired, server >>GREAT! >>webpage served in 2 seconds >> >>2) >>Laptop wired, server >>Deskop wired, client >>GREAT! >>webpage served in 2 seconds >> >>3) >>Laptop wireless, client >>Desktop wireless, server >>

how to print unicode structures?

2005-01-17 Thread Timothy Babytch
Imagine you have some list that looks like ('unicode', 'not-acii', 'russian') and contains characters not from acsii. or list of dicts, or dict of dicts. how can I print it? not on by one, with "for" - but with just a simple print? My debugging would be MUCH simpler. Now when I try print or ppr

Zen of Python

2005-01-19 Thread Timothy Fitz
While I agree that the Zen of Python is an amazingly concise list of truisms, I do not see any meaning in: Flat is better than nested. I strive for balance between flat and nested. Does anyone have a good example of where this is applied? (specifically to python, or in general) -- http://mail.py

Re: Zen of Python

2005-01-19 Thread Timothy Fitz
On 19 Jan 2005 15:24:10 -0800, Carl Banks <[EMAIL PROTECTED]> wrote: > The gist of "Flat is better than nested" is "be as nested as you have > to be, no more," because being too nested is just a mess. Which I agree with, and which makes sense. However your "gist" is a different meaning. It's not t

Re: PyCon Preliminary Program Announced!

2005-01-21 Thread Timothy Fitz
> I don't care much for "parallel tracks" myself, because I want to hear > basically everything. But we had more proposals of higher quality > this year than ever before, so it came down to scheduling more talks > in parallel than ever before too, or rejecting perfectly good > proposals. Will t

ANN: LJ pyGTK clien Zapys-0.3 released

2005-01-25 Thread Timothy Babytch
Usable simple app for posting messages to LiveJournal. Easy extandable. Main feature: character substitution. I mean (tm) to â, (c) to Â, quote to matching pairs and so on. The list can be easily extended with your own regexps. submit on Ctrl+Enter. Edit/delete last entry. screenshot: http://img

Re: Where are list methods documented?

2005-02-01 Thread Timothy Fitz
[Tim Peters] > The methods on mutable sequence types are documented in the Library > manual's section on mutable sequence types: > >http://docs.python.org/lib/typesseq-mutable.html > And like -many- python programmers, when he thinks "List" he doesn't immediately think "Mutable Sequence Type.

Re: Finding user's home dir

2005-02-02 Thread Timothy Grant
On Wed, 02 Feb 2005 11:30:34 -0800 (PST), Nemesis <[EMAIL PROTECTED]> wrote: > Hi all, I'm trying to write a multiplatform function that tries to > return the actual user home directory. I saw that > os.path.expanduser("~") works on Linux but on Windows2000 (at least on > the win I used) it returns

Python AST Sprint

2005-02-02 Thread Timothy Fitz
I am interested in helping Python, however my knowledge of Abstract Syntax Trees is lacking. Where should I turn to educate myself? Any books or websites would be appreciated. -- http://mail.python.org/mailman/listinfo/python-list

multi threading and win9x

2005-06-20 Thread Timothy Smith
i want to run my sql statements on a seperate thread to prevent my app from stop responding to input (atm is says "not responding" under windows until the sql is finished) but i'm hesitant because i have to still support win9x and i'm not sure how well this will play. -- http://mail.python.org/

startfile problems

2005-08-01 Thread Timothy Smith
hello i have a very odd issue with os.startfile() ok basicly my app works perfectly on every single other pc todate. i cannot recreate this issue on any system. so i've already ruled out any obvious coding issues, such as wrong file names etc. this issue only occurs on this one old pc. upon tr

Re: startfile problems

2005-08-02 Thread Timothy Smith
Dennis Lee Bieber wrote: >On Tue, 02 Aug 2005 15:10:23 +1000, Timothy Smith ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > >>i'm very curious as to what everyone thinks >> >> > > I suspect most of us think:

Re: startfile problems

2005-08-02 Thread Timothy Smith
Dennis Lee Bieber wrote: >On Tue, 02 Aug 2005 17:35:27 +1000, Timothy Smith ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > > > >>it's iterally just >> >>PDFname = 'tmp.pdf' >>os.startfile(PDFname) >> &

Re: startfile problems

2005-08-02 Thread Timothy Smith
Michael Hoffman wrote: >Timothy Smith wrote: > > > >>yep the program is executed in the same dir as the pdf file. like i said >>it actually opens it, but throws up an exception as well. >> >> > >You are far more likely to get informed help if

Survey Tool

2005-08-31 Thread Timothy Downs
I've been looking around for an online (that is, web-based) survey tool for commercial use, and have been unable to any written in Python. Is anyone aware of such a thing existing? A price tag is not a problem, although access to source code is desirable. Timothy Downs --

Re: Survey Tool

2005-08-31 Thread Timothy Downs
Sorry if I wasn't clear- Was after a Python program serving up (using CGI, Django, CherryPy.. or whatever) a survey- filled out using a web browser. Timothy Downs > Wait. . .Do you want it on a website? I don't really understand yo

OCR librarys

2005-09-12 Thread Timothy Smith
i'm looking for ocr librarys with reasonably free licensing and the ablity to use python with them. c library's that i can call from python are acceptable. so far all i have run into is voodoo and wild claims. i've tried gocr, and it wasn't very impressive. i'm like to be able to ocr handwriting

Re: OCR librarys

2005-09-12 Thread Timothy Smith
Larry Bates wrote: >You need to specify a "platform" you will be running on. I've had >good experience with ExperVision's RTK toolkit on Windows. It is not >free, but it is very, very good. Sometimes software is actually >worth paying for ;-). > &g

Re: services on linux

2005-09-20 Thread Timothy Smith
Martin Franklin wrote: >Christoph Haas wrote: > > >>On Tue, Sep 20, 2005 at 02:57:26AM -0500, pt python wrote: >> >> >> >>>im moving from the windows world to the linux world and i need to make >>>a python script to see if a service is instaled (ex: apache), if it is >>>running or stoped and

Python-libnjb on macosx

2005-02-10 Thread Timothy Grant
I was working on some things that use Glenn Strong's excellent libnjb wrapper on my Linux box. I have since bought a PowerBook and have been trying to get everything working correctly under OS/X. This morning I got Python-libnjb to build without errors using the following command: ld -dynamic -dy

Re: webbrowser.py

2005-02-14 Thread Timothy Babytch
Jeremy Sanders wrote: It occurs to me that webbrowser could be more intelligent on Linux/Unix systems. Both Gnome and KDE have default web browsers, so one could use their settings to choose the appropriate browser. I haven't been able to find a freedesktop common standard for web browser, however

More newbie macosx user questions

2005-02-24 Thread Timothy Grant
I think I'm mis-understanding something about how PYTHONPATH works (at least on OSX I didn't have this trouble on Linux). I have a directory where I store libraries that I'm playing around with. However, for some reason python can't find the library. Since I'm using PyQt, I use pythonw, but the re

problem installing wxPython 2.5.3, wxWidgets installed ok

2005-02-25 Thread timothy . williams
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have everything. The make install in $WXDIR seemed to go fine. I have the libxw* libraries in my lib/ directo

Re: problem installing wxPython 2.5.3, wxWidgets installed ok

2005-03-01 Thread timothy . williams
Luc wrote: > [EMAIL PROTECTED] a écrit: > > > I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 > > machine. > > > > I have python in a non-standard place, but I'm using --prefix with the > > configure script to point to where I have everything. The make install > > in $WXDIR

locale support and 4.10

2005-03-04 Thread Timothy Smith
i'm trying to setlocale() on 4.10, and it appears the python package doesn't support this under 4.10. Python 2.3.3 (#2, Apr 28 2004, 22:48:37) [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(

Re: locale support and 4.10

2005-03-05 Thread Timothy Smith
Martin v. Löwis wrote: Timothy Smith wrote: >>> locale.setlocale(locale.LC_NUMERIC, 'us') the exact same thing works under windows xp. do i have to compile it with locale support? No. You have to choose a locale name that is supported by your operating system (which appears t

Re: How to script DOS app that doesn't use stdout

2005-03-08 Thread Timothy Grant
On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <[EMAIL PROTECTED]> wrote: > There's a DOS console application I am trying to script (in Python), but it > doesn't seem to use stdout or stderr... For example, if I redirect output > to a file ("cmd > file.txt"), the output still appears on screen. > Similar

  1   2   3   4   5   >