HELP: Searching File Manager written in Python

2005-10-11 Thread anton
Hi, I am googeling some hours now ... still without result. So I have a question: Does somebody know a filemanager: - which looks like Norton Commander/7-Zip Filemanager - where I can add python scripts which I can execute on a selected file I already looked at wxpyatol but its not what

Re: HELP: Searching File Manager written in Python

2005-10-12 Thread anton
To answer to you both: The Norton Commander was a popular file manager for DOS, but the idea of the 2 window concept is still used by a lot of software. On Linux the one I use is Midnight Commander (mc). On Windows there are the 7-zip file manager see http://www.7-zip.org/ (7-zip is also a new c

Re: Anyone know the solution

2014-10-28 Thread Anton
On Monday, October 27, 2014 5:33:17 PM UTC-7, alex23 wrote: > On 28/10/2014 1:10 AM, e...@gmail.com wrote: > > Write a program that reads the contents of the two files into two > > separate lists. The user should be able to enter a boy's > > name, a girl's name or both, and the

Python Style Question

2014-10-29 Thread Anton
else: values.add(c_int) continue === Thanks, Anton. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Style Question

2014-10-29 Thread Anton
On Wednesday, October 29, 2014 4:43:33 AM UTC-7, Rafael Romero Carmona wrote: > Hi, first in Python 2.7.6 and Python 3.4.0 list haven't got any add > function but they have append. You are right, in my original code I use set instead of array, so it should be either values = set() or values.append

Re: Python Style Question

2014-10-29 Thread Anton
On Wednesday, October 29, 2014 4:59:25 AM UTC-7, Rafael Romero Carmona wrote: > 2014-10-29 12:25 GMT+01:00 Martin Kemp : > Actually it doesn't work because there is no add function and it > doesn't catch the TypeError function to ignore other exceptions than > ValueError. Doesn't it? I tested in Py

Re: Anyone know the solution

2014-10-29 Thread Anton
On Tuesday, October 28, 2014 10:13:14 PM UTC-7, Gregory Ewing wrote: > No, that's not the correct answer. Being NP-complete doesn't > mean something is impossible, or even hard to do. All it > means is that nobody knows of a cleverer solution than > just trying all possibilities. That's only a diff

Re: Python Style Question

2014-11-12 Thread Anton
On Thursday, October 30, 2014 4:10:23 AM UTC-7, Steven D'Aprano wrote: > I don't particularly like either version. I prefer this: > > def load_int(obj): > if isinstance(obj, int): > # Case 1), an int, e.g. 7 > return obj > elif isinstance(obj, str): > # Case 2) and

Re: I love assert

2014-11-12 Thread Anton
On Tuesday, November 11, 2014 11:41:06 AM UTC-8, Peter Cacioppi wrote: > I get the impression that most Pythonistas aren't as habituated with assert > statements as I am. Is that just a misimpression on my part? If not, is there > a good reason to assert less with Python than other languages? >

Re: I love assert

2014-11-12 Thread Anton
On Wednesday, November 12, 2014 2:00:35 PM UTC-8, Anton wrote: > On Wednesday, November 12, 2014 1:41:20 PM UTC-8, Marko Rauhamaa wrote: > > Asserts help the reader of the code understand why some possibilities > > are not considered by the code. They are not considered because th

Re: I love assert

2014-11-12 Thread Anton
On Wednesday, November 12, 2014 1:41:20 PM UTC-8, Marko Rauhamaa wrote: > Asserts help the reader of the code understand why some possibilities > are not considered by the code. They are not considered because the > writer of the code asserts they are not really possible. I can see how assert state

Re: I love assert

2014-11-12 Thread Anton
On Wednesday, November 12, 2014 2:05:17 PM UTC-8, Ian wrote: > On Wed, Nov 12, 2014 at 2:56 PM, Marko Rauhamaa wrote: > > Ethan Furman: > > > >> On 11/12/2014 01:41 PM, Marko Rauhamaa wrote: > >>> > >>> Or I might indicate the exhaustion of possibilities: > >>> > >>> if status == OK: > >>>

Re: I love assert

2014-11-12 Thread Anton
On Wednesday, November 12, 2014 2:42:19 PM UTC-8, Ian wrote: > On Wed, Nov 12, 2014 at 3:13 PM, Anton wrote: > > If the code is run optimized and asserts are ignore CONFUSED statement > > would still not be handled and you will not know about it. > > I would do something

Re: I love assert

2014-11-12 Thread Anton
On Wednesday, November 12, 2014 3:03:18 PM UTC-8, Ian wrote: > On Wed, Nov 12, 2014 at 3:48 PM, Anton wrote: > Sure, which is why you and I have both suggested raising a RuntimeError > instead. Yeah, I actually read it after sending my response :) -- https://mail.python.org/mailman

Re: Array of Functions

2014-11-17 Thread Anton
On Friday, November 14, 2014 2:17:38 PM UTC-8, Richard Riehle wrote: > In C, C++, Ada, and functional languages, I can create an array of functions, > albeit with the nastiness of pointers in the C family. For example, an > array of functions where each function is an active button, or an array

Re: loop

2014-03-23 Thread anton
for i in (10**p for p in range(3, 8)): print(i) -- https://mail.python.org/mailman/listinfo/python-list

Check if dictionary empty with == {}

2015-08-19 Thread Anton
Probably a silly question. Let's say I have a dictionary mydict and I need to test if a dictionary is empty. I would use if not mydict: """do something""" But I just came across a line of code like: if mydict == {}: """do something""" which seems odd to me, but maybe there is a valid

Re: When to use assert

2014-10-21 Thread Anton
27;t use them for checking input arguments to public library > > functions (private ones are okay) since you don't control the > > caller and can't guarantee that it will never break the > > function's contract. > > > > * Don't use assert for any error which you expect to recover from. > > In other words, you've got no reason to catch an AssertionError > > exception in production code. > > > > * Don't use so many assertions that they obscure the code. > > > > > > > > -- > > Steven I use ORM and often need to write a function that either takes an id of the record or already loaded model object. So I end up writing a piece of code like below: def do_something(instance): if isinstance(instance_or_id, int): instance = Model.get(instance) assert isinstance(instance, Model) # Code that assumes that instance is an object of type Model do_somthing is not a part of public library, though it is a public function, which can and intended to be used by other programmers; and assert should never happen if a client uses the function as planned. I wonder if this use-case is controversial to this part: > Many people use asserts as a quick and easy way to raise an exception if > > an argument is given the wrong value. But this is wrong, dangerously > > wrong, for two reasons. The first is that AssertionError is usually the > > wrong error to give when testing function arguments. You wouldn't write > > code like this: > > > > if not isinstance(x, int): > > raise AssertionError("not an int") > > > > you'd raise TypeError instead. "assert" raises the wrong sort of > > exception. > Thanks, Anton. -- https://mail.python.org/mailman/listinfo/python-list

BCB5 & Py_InitModule in python 2.3.5 crashes sometimes

2005-06-02 Thread anton
Hi, I embedded the python 2.3.5 interpreter in my Borland C++ Builder 5 application on WinXP pro Sp2 and all runs fine. (I translated the python23.lib with coff2omf) But from time to time when I call Py_InitModule I get a dialog: Title: Microsoft Visual C++ Runtime Library Text: Program: bla

3D plotting with python 2.5 on win32

2007-12-19 Thread anton
Hi, I would like to know if some of you knows a - working - actual - out of the box (for me: binaries available) Package/Lib to do 3D plotting out of the box. I know matplotlib. There is MayaVi from enthon but you need to use their python (2.4.3), all other stuff need picking sources etc

Re: 3D plotting with python 2.5 on win32

2007-12-20 Thread anton
Hi Marek, thanks for the link .. I knew VPython already by I forgot it ( the last time it was only python 2.4 compatible) but as I see they support python 2.5 now ;-) I will check it and thanks again. Anton > Hi anton, > >Have you take a look at vpython? Here's their

Re: 3D plotting with python 2.5 on win32

2007-12-20 Thread anton
tried out (or tried to try out) different tools for doing 3D plotting, but skipped most of them since I did not get them to work. (... yes I am a little bit confused since I didnt find something working out of the box). Anton > > PyOpenGL isn't abandonware. Python 2.5 comes with the ct

Re: 3D plotting with python 2.5 on win32

2007-12-21 Thread anton
python 2.4.3 installation with moinmoin and trac for example, I didn't like this too much, ... don't remember exactly what I didn't like exactly, by I deinstalled the whole enthon stuff rather fast. Again: the enthon installer is nice if somebody uses only this suite :-) Its a great wo

Re: 3D plotting with python 2.5 on win32

2007-12-21 Thread anton
s it didn't get the complete file) it deleted it afterwards anyway. Bye Anton -- http://mail.python.org/mailman/listinfo/python-list

using re module to find " but not " alone ... is this a BUG in re?

2008-06-12 Thread anton
and NOT: this I want \" while I dont want this \\" I tried even the (?<=...) construction but here I get an unbalanced paranthesis error. It seems tha re is not able to do the job due to parsing/compiling problems for this sort of strings. Have you any idea?? Anton Exam

Re: using re module to find

2008-06-13 Thread anton
John Machin lexicon.net> writes: > > On Jun 12, 7:11 pm, anton <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I want to replace all occourences of " by \" in a string. > > > > But I want to leave all occourences of \" as they are. > >

Re: What Programing Language are the Largest Website Written In?

2011-07-13 Thread Anton Fonarev
2011/7/12 Xah Lee : >23 yandex.ru (Russian) ◇ ? > As far as I know, the site is written in Perl. However, they are using lots of python in their products and for internal use. Anton. -- http://mail.python.org/mailman/listinfo/python-list

Introspecting the variable bound to a function argument

2023-02-22 Thread Anton Shepelev
Hello, all. Does Python have an instrospection facility that can determine to which outer variable a function argument is bound, e.g.: v1 = 5; v2 = 5; def f(a): print(black_magic(a)) # or black_magic('a') f(v1) # prints: v1 f(v2) # prints: v2 -- () ascii ribbon campaign

Re: What exactly is a python variable?

2016-11-17 Thread Anton Mamaenko
Just a couple of days ago I was asking myself a similar question, and found this blog article: https://jeffknupp.com/blog/2013/02/14/drastically-improve-your-python-understanding-pythons-execution-model/ Clarified a lot of things to me. , Anton > On 17 Nov 2016, at 16:19, BartC wr

Re: When will they fix Python _dbm?

2016-12-05 Thread Anton Mamaenko
What is your operating system, environment, and Python build? dbm is just a module that might not have been included into your Python build. It's not a bug but a deliberate choice of the package maker. Regards, Anton > On 5 Dec 2016, at 17:45, clvanwall wrote: > > I ha

Re: python 2.7.12 on Linux behaving differently than on Windows

2016-12-07 Thread Anton Mamaenko
o not try. Do or not do." So stop complaining. Just live with it. Regards, Anton > On 7 Dec 2016, at 21:02, BartC wrote: > >> On 07/12/2016 16:53, Michael Torrie wrote: >>> On 12/07/2016 08:48 AM, BartC wrote: >>> I would prefer that the program

Re: MacOSX SpeechRecognition installation problems

2016-12-08 Thread Anton Mamaenko
hances are that your global package configuration breaks anyways. Regards, Anton >> On 8 Dec 2016, at 09:18, Michael Torrie wrote: >> >> On 12/07/2016 11:09 PM, 3dB wrote: >> trying to install SpeechRecognition for Python results in error: >> >> running

pip problems

2018-04-08 Thread Anton Alley
(I am on Windows 10) When I install a new Python version, pip does not update all of the way. In the command line 'pip' still runs the old pip.exe, so I've had to manually move the new pip to C:\Windows . It would be great if you fixed this for future python versions! Thanks,

How to find files with a string

2019-01-09 Thread anton . gridushko
: main() But there are mistakes like C:\Users\Anton\AppData\Local\Programs\Python\Python36-32\python.exe "C:/Users/Anton/PycharmProjects/Работа с файловой системой/Перебор файлов из папки.py" Traceback (most recent call last): File "C:/Users/Anton/PycharmProjects/Работа с файл

Re: Python obfuscation

2005-11-17 Thread Anton Vredegoor
der to reverse engineer the code behind the server. But the more one messes with the ideal output the more often the user will rather click another link. (or launch another satellite) Anton. what's the current exchange rate for clicks and dollars? -- http://mail.python.org/mailman/listinfo/python-list

Re: Python obfuscation

2005-11-18 Thread Anton Vredegoor
Bengt Richter wrote: > On Thu, 17 Nov 2005 10:53:24 -0800, [EMAIL PROTECTED] (Alex Martelli) wrote: > > >Anton Vredegoor <[EMAIL PROTECTED]> wrote: > [...] > >> The idea of using a webservice to hide essential secret parts of your > >> application can

Re: Python obfuscation

2005-11-19 Thread Anton Vredegoor
e that the segmentation might perfectly well be > appropriate for this "analogy" case, whether it is or isn't in the > originally discussed case of selling predictions-via-webservices). I agree it doesn't make sense. Like uncle Harry who thinks he can lay golden eggs. We

Re: Python obfuscation

2005-11-20 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: >... > > Suppose I grant all your theories about optimal marketing strategies. I wish I hadn't done that :-) But seriously, I'm having trouble answering in detail all of your points (which doe

Re: Why are there no ordered dictionaries?

2005-11-22 Thread Anton Vredegoor
an intuitive point of view of course :-) Here's a sorted dict implementation without using hashes, which maybe would be fast if implemented in C. The insertion order can be retrieved using the keys and values lists from the object itself, items() gives a sorted sequence. Anton. NB warning u

How to wake up the jython list moderator

2005-12-06 Thread Anton Vredegoor
't show up either. Anton "maybe I'm just impatient" -- http://mail.python.org/mailman/listinfo/python-list

Re: How to wake up the jython list moderator

2005-12-06 Thread Anton Vredegoor
Thomas Heller wrote: > The easiest solution for this is to join the mailing list (with the > email address that you use to post), disable list delivery, and repost > your message via gmane. > Thanks. Anton -- http://mail.python.org/mailman/listinfo/python-list

Python on a public library computer

2005-07-22 Thread Anton Vredegoor
stdin and stdout to an applet? Anton p.s. John Lee: You remembered correctly, such a thing exists. -- http://mail.python.org/mailman/listinfo/python-list

Re: all possible combinations

2005-07-28 Thread Anton Vredegoor
1:]) This makes me wonder why we still don't have something like the unint function above in the standard distribution. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: all possible combinations

2005-07-28 Thread Anton Vredegoor
reverse problem we only have hex or oct (and cannot choose symbol lists but that's not so very important, if the whole matter has any significance of course :-). Hey, unint might even win the "more general" approval! Anton "or maybe it's just because it's difficult to find a good name for it" -- http://mail.python.org/mailman/listinfo/python-list

Re: Brute force sudoku cracker

2005-09-18 Thread Anton Vredegoor
the cells instead of computing them on the fly each time, that could make contigency elimination easier. Anton from __future__ import generators from sets import Set as set problem1 = ['063000700','000690008','97002', '002010080',

multimethod (or rather overloading) in Python

2005-02-17 Thread anton muhin
++ compilers do. Is there better way? Can I unify both @overload and @overloadMethod? with the best regards, anton. -- http://mail.python.org/mailman/listinfo/python-list

Re: multimethod (or rather overloading) in Python

2005-02-17 Thread anton muhin
anton muhin wrote: Correction: Of course, I can imagine some metaclasses magic that would allow to code: class MyClass(WithOverloading): @overloadMethod(A) def someMetod(self, _): ... But it would rather convoluted: the best idea I have so far is to mangle methods name in the manner most of

Re: [perl-python] exercise: partition a list by equivalence

2005-02-18 Thread anton muhin
Xah Lee wrote: here's another interesting algorithmic exercise, again from part of a larger program in the previous series. Here's the original Perl documentation: =pod merge($pairings) takes a list of pairs, each pair indicates the sameness of the two indexes. Returns a partitioned list of same in

Re: multimethod (or rather overloading) in Python

2005-02-21 Thread anton muhin
Nick Coghlan wrote: anton muhin wrote: anton muhin wrote: Correction: Of course, I can imagine some metaclasses magic that would allow to code: class MyClass(WithOverloading): @overloadMethod(A) def someMetod(self, _): ... But it would rather convoluted: the best idea I have so far is to

Re: Syntax for extracting multiple items from a dictionary

2004-11-30 Thread anton muhin
or an object containing only the keys named in cols out of row? In other words, to get this: {"city" : "Hoboken", "state" : "Alaska"} Untested: dict( (key,value) for (key,value) in row.iteritems() if key in cols ) Works in Py2.4 Stefan Or dict((key, row[key]) for key in cols). regards, anton. -- http://mail.python.org/mailman/listinfo/python-list

IOError 11 CGI module

2005-04-15 Thread Anton Jansen
tractflat( cgi.FieldStorage() ) --- With kind regards, Anton Jansen -- http://mail.python.org/mailman/listinfo/python-list

Freelance Django developer needed

2011-10-11 Thread Anton Pirker
templates in django We think the project will take about 8-12 weeks, starting November 1th. If you are interested, send your CV, a "why i am the best for the job"-letter and your rates to: development [at] creativesociety [dot] com Thanks, Anton -- http://mail.python.org/mailman/listi

Re: Freelance Django developer needed

2011-10-11 Thread Anton Pirker
ind the best one, and i think they are not browsing job boards.. ;) greetings from vienna, Anton > > Best regards, > Waldek -- http://mail.python.org/mailman/listinfo/python-list

Re: subset permutations

2005-12-11 Thread Anton Vredegoor
uot;permutation" and > "combination", not just between English common usage and mathematics, but > even in mathematics. Why is that unfortunate? Now we can all post our favorite scripts and let them be severely criticized :-) Anton def ncycle(seq,n): while True:

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Anton Vredegoor
There is not much time anymore for idealists to start trying to save the world, and I don't think we can count on google in that respect. Anton 'make my day, prove me wrong' -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2005-12-28 Thread Anton Vredegoor
; > is something on the same level as a nano assembler or an artificial > > intelligence. > > ??? What the hell are you smoking? We already have self-hosting programming > languages. Yes. We have humans too. > > Anton > > > > 'make my day, prove me wron

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-02 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: >... > > Google's not a nice company (yeah, I know I'm posting from a google > > account). If you look at their job requirements it's clear they will > > only hire people with long

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-04 Thread Anton Vredegoor
Michael Sparks wrote: > Sorry to reply to the thread so late in the day, but I noticed (via > QOTW :-( ) that Anton got worked up at me suggesting that congratulating > someone with a new job was a nice idea (surprised me too - all the > Google employees I've met have been very n

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-05 Thread Anton Vredegoor
times the student does all the work and receives almost no payment, and the professors know next to nothing about the subject (except from times long gone) and enjoy luxurious quarters and working conditions, foreign travel arrangements and a big secure salary check each month. Anton 'excuse me if I sound a bit bitter and as if suffering from a sense of untitlement' -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-08 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: > >> However I still maintain that I was never able to meet these fine >> people you speak about and which you seem to know because the cost >> involved (a few hundred euro to visit pycon for exampl

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: > > > However I still maintain that I was never able to meet these fine > > people you speak about and which you seem to know because the cost > > involved (a few hundred euro to visit pycon for exam

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: > > > However I still maintain that I was never able to meet these fine > > people you speak about and which you seem to know because the cost > > involved (a few hundred euro to visit pycon for exam

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-09 Thread Anton Vredegoor
ithout realizing that what you are selecting for is not what you think it is. It is selection for socialization and belonging to some kind of social group, not any mental ability really, not even the likeliness of being able to grasp Haskell which you somehow seem to link to having a mathemati

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Anton Vredegoor
him to refuse to pick up checks while his opponents barely have enough to feed themselves) by donating the money to me, so that I might increase my efforts to squelch any remaining trace of elitism at google. Anton "I'd even look into PyPy sprint options at Maastricht, so you'd get extra value for your money" -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Anton Vredegoor
roblem, the resulting code was not even using the same dataformats. Sometimes adding an attractive female to a group of young male coders will slow down the developments while it wouldn't matter in a team of female coders. One has to consider the *complete* system, which is another fault in your monocultural elitist selection process. Sometimes adding a very strange element to a team can prevent it from being a 'linear combination of social peer pressure vectors'. Face your fears. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-11 Thread Anton Vredegoor
Alex Martelli wrote: > Anton Vredegoor <[EMAIL PROTECTED]> wrote: >... > > You are not my superior (or even considered to be more succesfull) as > > you seem to imply. > > Depends on who does the considering, I'm sure. If the considerer loves > the Eng

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-11 Thread Anton Vredegoor
Steve Holden wrote: > Consider yourself excused. Thanks. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudoku solver: reduction + brute force

2006-01-17 Thread Anton Vredegoor
with x , y and z coordinate having value '0', is filled (virtually has a '1' inside, the 'unfilled' cells in the cube (the zeros) are not represented). I wonder if I still make sense, it's hard to stay programming Python without a computer to correct my thinking. Can someone write an implementation to check my ideas? Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-19 Thread Anton Vredegoor
ood old natural language. Don't tell me those math formulas are what it 'really' is, or even that it's more precise that way. The old trick of 'but there are some things that cannot be expressed in any other way than by using formulas' doesn't get one many opti

Re: OT: excellent book on information theory

2006-01-19 Thread Anton Vredegoor
ion (mathematics) is considered to be known to everyone (with a math education of course) but I doubt if that is really the case and, even if it were the case it doesn't imply that being explicit (in giving the procedures in computer and human readable form at the same time, for example in Python) wo

Re: Sudoku solver: reduction + brute force

2006-01-19 Thread Anton Vredegoor
rored cube. Eh, maybe math notation wouldn't be such a bad idea after all, only then I wouldn't be able to read what I wrote here. I hope you can :-) Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-20 Thread Anton Vredegoor
Terry Hancock wrote: > On 19 Jan 2006 13:57:06 +0100 > Anton Vredegoor <[EMAIL PROTECTED]> wrote: > > Some time ago I tried to 'sell' Python to a mathematician. > > The crucial point was that it was not (in standard Python) > > possible to have a

Re: Sudoku solver: reduction + brute force

2006-01-20 Thread Anton Vredegoor
ago wrote: [Something I mostly agree with] > According to Anton the number of possible solutions can be reduced > using 1) number swapping, 2) mirroring, 3) blocks/rows/columns > swapping. All those operations create equivalent matrices. For a 9X9 > grid, this should give a redu

Re: OT: excellent book on information theory

2006-01-21 Thread Anton Vredegoor
ctional programming is connected to having a math degree and more such self serving and self fullfilling prophecies. An excellent book would break with this jargon advertising salesmanship. Anton "but I'll give it one more try" -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: excellent book on information theory

2006-01-22 Thread Anton Vredegoor
bit ;-). I hope you're not trying to outexpertize me. You seem to be thinking that you know more about math than me, probably because you have a formal education in the subject? If so, you're proving my point, and thank you very much. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: integer to binary...

2006-06-01 Thread Anton Vredegoor
;j & 1] for j in xrange(n-1,-1,-1)) >>> bits(7,4) (0, 1, 1, 1) Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: An oddity in list comparison and element assignment

2006-06-02 Thread anton . vredegoor
be foolish, but who am I to judge even that- is what makes it possible to develop higher language and cognitive structures. Anton 'even if it means turning into lisp before moving on' -- http://mail.python.org/mailman/listinfo/python-list

Re: An oddity in list comparison and element assignment

2006-06-03 Thread anton . vredegoor
I was trying to revive you. A process that is not evolving is dead. Stopping it frees up valuable resources that enable it to become alive again. Anton 'being alive is being mutable' -- http://mail.python.org/mailman/listinfo/python-list

[OT] code is data

2006-06-17 Thread Anton Vredegoor
like Lisp but then more powerful (because of the widely used standard data types and the code exchange between languages that that makes possible). Your thoughts please. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] code is data

2006-06-19 Thread Anton Vredegoor
tions in XML-space using ElementTree. But rest assured, there is no such module, nor will we ever need it for anything. Anton "use cases are for the faint-hearted" -- http://mail.python.org/mailman/listinfo/python-list

Re: [OT] code is data

2006-06-20 Thread Anton Vredegoor
Diez B. Roggisch wrote: <...> >> The whole point of a code transformation mechanism like the one Anton is >> talking about is to be dynamic. Else one just needs a preprocessor... > > No, it is not the whole point. The point is > > "" > The idea is

Re: [OT] code is data

2006-06-21 Thread Anton Vredegoor
be available for further discussion. If more than ten people demand a PEP and no better champion is available (very unlikely) I'll even write a proposal. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: How to generate all permutations of a string?

2006-06-22 Thread Anton Vredegoor
Girish Sahani wrote: > I want to generate all permutations of a string. I've managed to > generate all cyclic permutations. Please help :) http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496724 anton -- http://mail.python.org/mailman/listinfo/python-list

Re: code is data

2006-06-23 Thread Anton Vredegoor
Paul Boddie wrote: > Anton Vredegoor wrote: >> Yes, but also what some other posters mentioned, making Pythons internal >> parsing tree available to other programs (and to Python itself) by using >> a widely used standard like XML as its datatype. > > http://pysch.sou

Re: why a main() function?

2006-09-19 Thread anton . list
the functions indentation. -- Cheers Anton -- http://mail.python.org/mailman/listinfo/python-list

proof of concept python and tkinter gnugo interface

2006-11-23 Thread Anton Vredegoor
eds Python 2.5 which you can get at: http://www.python.org/ Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I access a main frunction from an import module?

2006-11-24 Thread Anton Vredegoor
> from abc import * > def m(): > print 'something' > return None > > a() import sys def a(): sys.modules['__main__'].m() return None Anton 'now why would anyone want to do *that* ?' -- http://mail.python.org/mailman/listinfo/python-list

Re: proof of concept python and tkinter gnugo interface

2006-12-01 Thread Anton Vredegoor
grindel wrote: > Anton Vredegoor wrote: [...] >> Here's the proof of concept, just copy it to some dir and run the >> Python script: >> >> http://home.hccnet.nl/a.vredegoor/gnugo/ >> >> It needs Python 2.5 which you can get at: >> >> htt

Re: permutations - fast & with low memory consumption?

2006-12-19 Thread Anton Vredegoor
d then do these permutations. Anton. def _sorted(seq): """ Return a sorted copy of seq, preserving the type. """ res = seq[0:0] decorated = ((x,i) for i,x in enumerate(seq)) for x,i in sorted(decorated): res += se

Re: Fast generation of permutations

2006-01-28 Thread Anton Vredegoor
trary numbers of variables to partition by. This would then give result sets like those strange quantum particles, such as quarks. Have fun, Anton def hands(L = [0]): if len(L) == 6: if L[1] != L[-1]: #no five of a kind yield L[1:] else: for i in range(

Re: "Intro to Pyparsing" Article at ONLamp

2006-01-28 Thread Anton Vredegoor
h data files, which is of course in a whole other league of difficulty of programming, but at least it gives some encouragement to the idea that it would be possible. Thank you for your ONLamp article and for making pyparsing available. I had some fun experimenting with it and it gave me some insights

Re: Fast generation of permutations

2006-01-29 Thread Anton Vredegoor
Paul Rubin wrote: > Cool, I'd still like to know why (13**5)-13 = C(52,5) other than > by just doing the arithmetic and comparing the results. Maybe your > tkinter script can show that. That seems to be very hard :-) Unless I'm missing something. Anton def noverk(n,k)

Re: Fast generation of permutations

2006-01-29 Thread Anton Vredegoor
Anton Vredegoor wrote: > Paul Rubin wrote: > > > Cool, I'd still like to know why (13**5)-13 = C(52,5) other than > > by just doing the arithmetic and comparing the results. Maybe your > > tkinter script can show that. > > That seems to be very hard :-) Un

Re: "Intro to Pyparsing" Article at ONLamp

2006-01-29 Thread Anton Vredegoor
nce we're also using a *visual* interface for something that in the end originates from sound sequences (even what I type here is essentially a representation of a verbal report) we have ultimately a difficult switch back to auditory parsing ahead of us. But in the meantime the tools produced (even if only for text parsing) are already useful and entertaining. Keep up the good work. Anton. -- http://mail.python.org/mailman/listinfo/python-list

Re: two generators working in tandem

2006-02-12 Thread Anton Vredegoor
enough times to sychronize the nesting. I wonder if 'ncycle' would be a useful generalization for itertools' 'cycle' function. Anton def ncycle(seq,n): while True: for x in seq: for dummy in xrange(n): yield x def cross(*ar

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
onsole r: reload policy configuration s: dump system properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to Thanks for replying anyway! Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
onsole r: reload policy configuration s: dump system properties t: dump thread list v: dump thread stack x: clear classloader cache 0-5: set trace level to Thanks for replying anyway! Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
or so and run it over there and simulate a python interpreter on a webpage which I can access from here. Has this been tried before? How can I use cookies to identify interpreter sessions? Anton 'webpython_3000_server_at_xxx.xxx.xxx.xxx_>>>' -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
Robert Kern wrote: > There is a Java SSH client that runs in the browser. > > http://www.oit.duke.edu/sa/security/ssh.html Great! I have a terminal. I can't figure out how to start jython from there though. Anton -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on a public library computer

2005-05-17 Thread Anton Vredegoor
't even set internet options, that means I can't remove my history or clear my cache :-( Anton 'security doesn't mean shooting everyone in the foot' -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   >