Re: GUI (tkinter) popularity and job prospects for

2020-10-22 Thread Tal Einat
Hi Lammie, On Thu, Oct 22, 2020 at 10:03 PM Lammie Jonson wrote: > > I looked at tkinter which seems to have quite a few examples out there, > but when I searched indeed.com for tkinter and wxpython it appeared that > there was hardly any job listings mentioning those. Why is that ? > My guess

Re: [python-committers] Thank you Larry Hastings!

2020-10-05 Thread Tal Einat
2020-09-05. That’s 7 years of exemplary release > managing! > > Larry, from all of us, and from me personally, thank you so much for your > invaluable contributions to Python. Enjoy your retirement! > > Cheers, > -Barry (on behalf of the PSC and PSF) These praises are certa

Collecting more feedback about contributing to Python

2020-10-04 Thread Tal Einat
taleinat/python-contribution-feedback For more info on the core dev sprint: https://python-core-sprint-2020.readthedocs.io/index.html - Tal Einat -- https://mail.python.org/mailman/listinfo/python-list

reload a module imported with importlib.machinery.SourceFileLoader

2015-03-02 Thread Tal Einat
ot;", line 1134, in exec AttributeError: 'NoneType' object has no attribute 'name' Am I going about this the wrong way? Is this a bug in importlib? If it is a bug, and suggestions for a workaround? I'm running Python 3.4.2, installed via pyenv on OSX 10.8. - Tal Einat -- https://mail.python.org/mailman/listinfo/python-list

Re: fuzzysearch: find not exactly what you're looking for!

2015-02-13 Thread Tal Einat
do you mean by "adapt difflib's SequenceMatcher"? If you mean that you alter its code, then certainly there is value in a library which provides such functionality without requiring any adaptation? - Tal Einat -- https://mail.python.org/mailman/listinfo/python-list

Re: fuzzysearch: find not exactly what you're looking for!

2015-02-13 Thread Tal Einat
you mean by "adapt difflib's SequenceMatcher"? If you mean that you alter its code, then certainly there is value in a library which provides such functionality without requiring any adaptation? - Tal Einat -- https://mail.python.org/mailman/listinfo/python-list

fuzzysearch: find not exactly what you're looking for!

2015-02-12 Thread Tal Einat
many optimizations under the hood, including custom algorithms and C extensions implemented in C and Cython. Install as usual: $ pip install fuzzysearch The repo is on github: https://github.com/taleinat/fuzzysearch Let me know what you think! - Tal Einat .. [1]: http://en.wikipedia.org/wiki/Le

Re: Wrote a new library - Comments and suggestions please!

2011-09-27 Thread Tal Einat
I don't work with SAS so I have no reason to invest any time developing for it. Also, as far as I can tell, SAS is far from free or open-source, meaning I definitely am not interested in developing for it. My library solves a problem for which there is no existing solution in the world of Pytho

Wrote a new library - Comments and suggestions please!

2011-09-26 Thread Tal Einat
The library is called RunningCalcs and is useful for running several calculations on a single iterable of values. https://bitbucket.org/taleinat/runningcalcs/ http://pypi.python.org/pypi/RunningCalcs/ I'd like some input on how this could be made more useful and how to spread the word about it.

Re: IDLE stopped working

2008-10-31 Thread Tal Einat
On Oct 27, 2:31 am, brianrpsgt1 <[EMAIL PROTECTED]> wrote: > OSX 10.5.5 > Python 2.5.1 > > I started upIDLEtoday and the bottom of the window was off of the > screen.  I could not find a way to resize it.  I closed all apps and > rebooted.  After rebooting,IDLEwill not start.  Below is the > Traceb

Re: What's a call-tip to do?

2008-06-08 Thread Tal Einat
"Terry Reedy" wrote: > "Raymond Hettinger" wrote > > Tal Einat wrote: > > > I just ran into this. In IDLE (Python 2.5), the call-tip for > > itertools.count is: > > "x.__init__(...) initializes x; see x.__class__.__doc__ for signature" &

What's a call-tip to do?

2008-05-14 Thread Tal Einat
has a DS while the class itself does not. I'm wondering what a call-tip mechanism should do when a class and its __init__ both have a DS. I'd be willing to work up a patch for IDLE's call-tip module to work better in this regard, or for itertools and similar classes i

Re: extension to idle to clear screen - but how to write to screen?

2007-11-17 Thread Tal Einat
o anything. No output, > nuffin. > I did get some sort of 'no connection msg' playing around which leads > me to believe that I can't really write to the window (at least not > this simplistically)... > > Pointers? Try this: self.editiwin.write('\n'*60)

Re: command-line arguments in IDLE

2007-11-07 Thread Tal Einat
eractive. (idle.py is usually found in your Python installation under Lib/ idlelib/) - Tal Einat reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorted(m))], [[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3] -- http://mail.python.org/mailman/listinfo/python-list

Re: difference between IDLE and command line

2007-11-03 Thread Tal Einat
Jim Hendricks wrote: > I have been editing my code in UltraEdit then testing in IDLE by > choosing open, then F5. I didn't see an easy way to refresh in IDLE, so > each edit I've been closing the file (not IDLE itself), then opening > again. Since IDLE does not keep track of what directory I last

Re: IDLE

2007-11-03 Thread Tal Einat
On Nov 3, 12:44 am, "Russ P." <[EMAIL PROTECTED]> wrote: > I've been programming in python for a few years using XEmacs on > Solaris and Linux. I've been thinking about trying IDLE for a long > time, but either it wasn't available on my system or I procrastinated. > I finally have it available, and

Re: Excel process still running after program completion - SOLVED

2007-09-12 Thread Tal Einat
On Sep 11, 8:29 pm, Chris <[EMAIL PROTECTED]> wrote: > On Sep 11, 1:26 pm, Chris <[EMAIL PROTECTED]> wrote: > > > > > On Sep 11, 12:59 pm, "Hamilton, William " <[EMAIL PROTECTED]> wrote: > > > > > From: Chris > > > > > I have a python script that is driving Excel and using the win32com > > > > modu

Re: Python for Windows other way to getting it?

2007-05-01 Thread Tal Einat
ere are none [good project for an experienced programmer]. But I > have however found an old stand alone version here > :http://arctrix.com/nas/python/standalone.html Check out Portable Python: http://www.portablepython.com/ Still in beta status, but quite up-to-date, and free. - Tal Einat -- http://mail.python.org/mailman/listinfo/python-list

Re: Fortran vs Python - Newbie Question

2007-03-26 Thread Tal Einat
I have developed "number-crunching" software with C, C++ and Python over the past 5 years, and have recently learned Fortran as well. Python has consistently failed to disappoint me :) - Tal Einat reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorted(m))], [[chr(154-ord(c)) for

Re: eval(repr(object)) hardly ever works

2006-09-16 Thread Tal Einat
Matthew Wilson wrote: > I understand that idea of an object's __repr__ method is to return a > string representation that can then be eval()'d back to life, but it > seems to me that it doesn't always work. > [snip] > > Any thoughts? > This is actually an interesting issue when you're working wit

Re: How to stop an [Rpyc] server thread?

2006-09-07 Thread Tal Einat
Saizan wrote: > I embedded an Rpyc threaded server in a preexistent daemon (an irc > bot), this is actually very simple; > start_threaded_server(port = DEFAULT_PORT) > then I had the necessity to stop the thread which accept() new > connections without killing the whole app, the thread is simply

Re: Script Bug?

2006-09-06 Thread Tal Einat
Omar wrote: > no, i put those there. > > i have restarted IDLE and it now works. a friend told me it was a bug > in IDLE. > > I'd like to try activepython, but i can't dl it from work (that site is > blocked for some reason). anybody got the install for it, or a mirror > location for it? You ca

Re: newbie pipe question

2006-09-05 Thread Tal Einat
[EMAIL PROTECTED] wrote: > Hi > > I want to write a python script that accepts input ( a single line of > text) from another program (squid proxy) and sends back output ( a > single line of text). I am not sure how to go about this > > cheers David If you want the script to recieve this line in s

Re: Netstat Speed

2006-09-02 Thread Tal Einat
DarkBlue wrote: > Following code works . > My question is can I make it faster ? > Faster how? Are you calling this so many times that you need it to be extremely fast? Are you calling it on the same IP multiple times, on many different IPs at once, ...? > > def activeip(checkip): > # if the

Re: disgrating a list

2006-09-02 Thread Tal Einat
Neil Cerutti wrote: > On 2006-09-01, Tal Einat <[EMAIL PROTECTED]> wrote: > > Tim Chase wrote: > >> I'm not sure if '__iter__' is the right thing to be looking > >> for, but it seems to work at least for lists, sets, > >> dictionarys (vi

Re: disgrating a list

2006-09-01 Thread Tal Einat
Tim Chase wrote: > I'm not sure if '__iter__' is the right thing to be looking for, > but it seems to work at least for lists, sets, dictionarys (via > their keys), etc. I would use it because at least then you know > you can iterate over it AFAIK and as seen throughout posts on c.l.py, the best

Re: basename with extensions

2006-08-30 Thread Tal Einat
Peter Saffrey wrote: > I'd like to resurrect this subject: > > http://groups.google.com/group/comp.lang.python/browse_frm/thread/11146344b03e72b6/6b2a3b0c0e902114?lnk=gst&q=basename&rnum=2#6b2a3b0c0e902114 > > [snip] > > Or have I missed something? > The Python developers are working on a new path

Re: Coding style and else statements

2006-08-30 Thread Tal Einat
Sybren Stuvel wrote: > Tal Einat enlightened us with: > > Actually, the common work-around for this is: > > > > (thing and [thing+1] or [-1])[0] > > > > This works since non-empty lists are always considered true in > > conditional context. This is more gene

Re: Coding style and else statements

2006-08-29 Thread Tal Einat
Bruno Desthuilliers wrote: > Sam Pointon a écrit : > > Bruno Desthuilliers wrote: > > > >>foo = lambda thing: thing and thing + 1 or -1 > > > > > > The and ... or trick is buggy (what if thing == -1?) > > Yes, true - Should be: > foo2 = lambda t: t != -1 and (t and t+1 or -1) or 0 > Actually, the

Re: Coding style and else statements

2006-08-28 Thread Tal Einat
tobiah wrote: > def foo(thing): > > if thing: > return thing + 1 > else: > return -1 > > def foo(thing): > > if thing: > return thing + 1 > return -1 > > Obviously both do the same thing. The first is > possibly clearer, while the s

Re: Learning Python - Have Question.

2006-08-28 Thread Tal Einat
> Thank you for this. The most daunting task in learning Python, is learning > all of the modules and functions that are available. And there's a tonne > of them. :-) > Actually, much of this file-system related stuff really is badly spread out between many different modules (os, os.path, glob,

Re: Defining constant strings

2006-08-27 Thread Tal Einat
Hans wrote: > Hi, > > I want to define a couple of constant strings, like in C: > #define mystring "This is my string" > or using a const char construction. > > Is this really not possible in Python? > > Hans One last note: If you truly insist on having constant variables, you could write a class

Re: Defining constant strings

2006-08-27 Thread Tal Einat
Hans wrote: > Hi, > > I want to define a couple of constant strings, like in C: > #define mystring "This is my string" > or using a const char construction. > > Is this really not possible in Python? > > Hans It is really not possible. The Pythonic way (as far as I have come to know it) is to st

Re: Avoiding if..elsif statements

2006-08-27 Thread Tal Einat
Fredrik Lundh wrote: > Tal Einat wrote: > > > This will work great if all of your functions recieve the same > > argument(s). > > I assumed "every single function would be passing the same variables" > meant exactly that, of course. > > Right, a

Re: How to let a loop run for a while before checking for break condition?

2006-08-27 Thread Tal Einat
for your needs). This just lets you check the condition less often. > But of course that whole thing is a moot point - if shaving mu-secs on > that level is needed for your application, use C or assembly instead. > I agree, though those aren't the only alternatives - you could also try g

Re: Avoiding if..elsif statements

2006-08-27 Thread Tal Einat
itself) dispatch = { "something": Command(somethingClass.func), "somethingElse": Command(somethingElseClass.func, "moo", [1,2,3]), "anotherthing": Command(anotherthingClass.func, 'a', 'b', 'c'), &q

Re: Learning Python - Have Question.

2006-08-27 Thread Tal Einat
he list is. You can check premissions for the current user with os.access(). Finally, you can find out more data about any file with the "stat" module, which is more low-level. - Tal Einat reduce(lambda m,x:[m[i]+s[-1] for i,s in enumerate(sorted(m))], [[chr(154-ord(c)) for c in '.&-&,l.Z95193+179-']]*18)[3] -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2006-08-26 Thread Tal Einat
Duncan Booth wrote: > JAG CHAN wrote: > > > Whenever I try to open IDLE, my zone firewall tells me pythonw.exe is > > trying to access the trusted zone. > > Whenever I try to open new IDLE window I get the following message: > > "IDLE's subprocess didn't make connection.Either IDLE can't start a >

Re: Exercises for dive into python

2006-07-24 Thread Tal Einat
Ben Edwards (lists videonetwork.org> writes: > > Have been working through Dive Into Python which is excellent. My only > problem is that there are not exercises. I find exercises are a great > way of helping stuff sink in and verifying my learning. Has anyone done > such a thing? > > Ben >

Re: Checking File permissions

2006-07-21 Thread Tal Einat
Anoop wrote: > Hi All > > Please tell me how to check the existence of a file and the read > permission to the file using python script > > Thanks for ur inputs > > Anoop os.access(path, mode) does just this, check it out. Cross-platform-ness isn't a problem, the docs say it is available for Win

Re: IDLE built-in help in Linux vs Windows

2006-07-17 Thread Tal Einat
Paul Rubin wrote: > In Windows if you click the Help dropdown, IDLE launches a help window > as it should. The help contents are included in the installation. > > In Linux, clicking Help launches a web browser, which is a perfectly > good UI for viewing help. However, instead of loading a static

Re: Editing File

2006-07-12 Thread Tal Einat
akameswaran gmail.com gmail.com> writes: > > > D wrote: > > Thanks, guys. So overall, would it just be easier (and not too rigged) > > if any changes were made by just editing the text file? [snip] > have you used pickle? if the data is as simple as you say it is, you > will be able to read

Re: check type when assignment

2006-07-12 Thread Tal Einat
pipehappy gmail.com> writes: > > Hello everyone: > > Is there a way to check the type when do assignment? > > if I write: > ab = bc > and want to make sure the return value of isinstance(bc, klass) is True > or I will raise > a exception. > > Any suggestion? > 1. Check your condition before

Re: How to display name of elements in list?

2006-07-12 Thread Tal Einat
Diez B. Roggisch nospam.web.de> writes: > > What you should do is to install rlcompleter2... [snip] > > Another option is to look into the source of that module and identify the > objects created. Documentation is overrated - use the source, Luke! rlcompleter is overrated, and only works on Uni

Re: Generating all ordered substrings of a string

2006-07-12 Thread Tal Einat
[EMAIL PROTECTED] wrote: > Hi, > I want to generate all non-empty substrings of a string of length >=2. > Also, > each substring is to be paired with 'string - substring' part and vice > versa. > Thus, ['abc'] gives me [['a', 'bc'], ['bc', 'a'], ['ab', 'c'], ['c', > 'ab'], ['b', 'ac'], ['ac', 'b

Re: How to terminate a main script?

2006-07-12 Thread Tal Einat
Helmut Jarausch wrote: > Hi, > > I'm still looking for an elegant and clear means to > terminate the main script in Python. > > Unfortunately, Python doesn't allow a 'return' > instruction in the main script. > It is quite a common practice for Python scripts to define a main() function which conta

Re: Mechanize-Browser question..

2006-07-09 Thread Tal Einat
bruce wrote: > r2 = br.follow_link(url_regex=re.compile(r"\*"),nr=1) <<< Seems to me your regex is buggy. You are using a "raw string" yet you still escape the asterisk ('*') with a backslash? This will only match a string which contains an asterisk, while I'm guessing you're trin

Re: XML-RPC + SimpleHTTPServer question

2006-07-06 Thread Tal Einat
I have recently implemented a system where clients connect to an RPC server (RPyC in my case), run a webserver on the RPC server, and close the webserver when they're done with it. To do this I wrote a ServerThread class which wraps a SimpleHTTPServer, runs as a thread, and can be signalled to sto