Re: Future standard GUI library

2013-05-18 Thread Kevin Walzer
 Python's stdlib in 
years. You are quite safe in developing against this API, unless your 
taste simply does not run to using the ttk widgets.


Hope this helps,
Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Future standard GUI library

2013-05-19 Thread Kevin Walzer

On 5/18/13 11:01 PM, llanitedave wrote:

I'm curious about how commonly tkinter is actually used among Python app 
developers as compared to wx, Pyside, or PyQT.  I get the impression that more 
distributed apps are built with wxPython, at least, than tkinter.  My 
impression is far from actual knowledge, of course.



I have two commercial apps developed with Tkinter:

http://www.codebykevin.com/phynchronicity.html
http://www.codebykevin.com/quickwho.html

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: any cherypy powred sites I can check out?

2013-05-19 Thread Kevin Walzer

On 5/16/13 2:30 PM, Chris Angelico wrote:

On Fri, May 17, 2013 at 4:17 AM,   wrote:

anyone?
--
http://mail.python.org/mailman/listinfo/python-list


You're firing off a bunch of minimal-content threads that ask other
people to do work for you. I recommend you put a bit more thought into
your posts, and show that you're willing to do a basic web search
before you just ask a question :)



He's also known on the Tcl newsgroup as Gavino; a Google search for 
"gavino tcl" will turn up some interesting hits. I also see that he's 
posting on comp.lang.perl as "Johannes Falcone." The common thread of 
his recent postings are subjects posed as questions, usually about 
various web frameworks, sometimes without even a single line in the 
message body. On the Tcl list it's AOLServer and NavServer. I'm not 
familiar with the Perl frameworks he's curious about.


--Kevin


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Future standard GUI library

2013-05-20 Thread Kevin Walzer

On 5/20/13 1:04 AM, Vito De Tullio wrote:

FLTK? (http://www.fltk.org/index.php)


FLTK is even uglier than non-themed Tkinter: non-native on every 
platform. Tkinter wraps native widgets on MacOS and WIndows, but FLTK 
draws its own widgets everywhere.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Re-using copyrighted code

2013-06-09 Thread Kevin Walzer

On 6/8/13 5:31 PM, Malte Forkel wrote:

Now, how am I supposed to deal with that? Ask Secret Labs for some kind
of permission? Leave it as it is and add my own copyright line?


Secret Labs AB is Frederic Lundh, author of the Python Image Library and 
many bits included in Python's stdlib. Here is info about him:


http://effbot.org/zone/about.htm

His contact info is listed here:

http://www.pythonware.com/company/contact.htm

I have trouble believing there would be any issue with you re-using the 
code, especially since it is included with Python's stdlib.


--Kevin
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Stack Overflow moderator “animuson”

2013-07-19 Thread Kevin Walzer

On 7/10/13 3:55 AM, Mats Peterson wrote:

A moderator who calls himself “animuson� on Stack Overflow doesn’t
want to face the truth. He has deleted all my postings regarding Python
regular expression matching being extremely slow compared to Perl.
Additionally my account has been suspended for 7 days. Such a dickwad.

Mats



And we should care because...?

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Beginner - GUI devlopment in Tkinter - Any IDE with drag and drop feature like Visual Studio?

2013-07-22 Thread Kevin Walzer

On 7/22/13 4:54 AM, Cucole Lee wrote:

Why Thinter? You can try wxpython.



Well, it's partly a matter of taste, but I for one find wxPython's 
API...inelegant.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-22 Thread Kevin Walzer

On 7/21/13 10:42 AM, Gilles wrote:

Hello

Every once in a while, my ISP's SMTP server refuses to send
perfectly legit e-mails because it considers them as SPAM.

So I'd like to install a dead-simple SMTP server on my XP computer
just to act as SMTP backup server.
All I'd need is to change the SMTP address in my e-mail client, and
off they go. No need for anything else like user authentication or
SPAM control.

Is there a no-brainer, ready-to-use solution in Python that I could
use for this?

Thank you.



http://www.hmailserver.com

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Simple Python script as SMTP server for outgoing e-mails?

2013-07-24 Thread Kevin Walzer

On 7/23/13 5:53 PM, Gilles wrote:

On Mon, 22 Jul 2013 10:14:15 -0400, Kevin Walzer 
wrote:

http://www.hmailserver.com


Thanks. hMailServer was one of the apps I checked, and I was just
making sure there weren't something simpler, considering my needs,
ideally something like Mongoose MTA.

Regardless, because of the SPAM anti-measures mentioned above, it
seems like I was over-optimistic about running an MTA and sending
e-mails from my home computer :-/



The reason I mentioned hMailServer is that I host my own mail server for 
my business--I have a static IP address, and correctly configured 
DNS--and so I'm able to send out large batches of e-mails to customers 
from my network without being blocked by my ISP. I'm running a Mac 
server so my mail system is the typical Unix setup (Postfix, etc.), but 
hMailServer was the closest thing I've found for Windows.


Configuring your own server isn't cheap in terms of time even if you use 
FOSS components, and your ISP may charge more for a static IP, so I 
completely understand if you don't want to go that route.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Cross-Platform Python3 Equivalent to notify-send

2013-07-27 Thread Kevin Walzer

On 7/27/13 6:58 AM, Devyn Collier Johnson wrote:

Linux systems with the proper software can use the "notify-send"
command. Is there a cross-platform Python3 equivalent?

Mahalo,

Devyn Collier Johnson
devyncjohn...@gmail.com


http://pythonhosted.org/gntp/ ?

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: how to package embedded python?

2013-07-29 Thread Kevin Walzer

On 7/25/13 5:05 PM, David M. Cotter wrote:

what must i include in my app package if i'm embedding python?

i tried including *everything* in the "DLLs" directory, but my app still 
crashes as soon as i attempt to initialize python.

this is on a system that does not have python installed, as most of my users 
won't have it.  is it actually a requirement that they first install python?  
(cuz it does work then)



Have you looked at these docs?

http://docs.python.org/2/extending/embedding.html

Lots of other hits on Google for ""embedding Python in C app."

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter bug in Entry widgets on OS X

2012-08-31 Thread Kevin Walzer

On 8/31/12 6:18 AM, Arnaud Delobelle wrote:

I'm very inexperienced with Tkinter (I've never used it before).  All
I'm looking for is a workaround, i.e. a way to somehow suppress that
output.


What are you trying to do? Navigate the focus to another widget? You 
should use the tab bar for that, not the arrow key. The entry widget is 
a single-line widget, and doesn't have up/down as the text widget does.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Tkinter bug in Entry widgets on OS X

2012-08-31 Thread Kevin Walzer

On 8/31/12 11:18 AM, Arnaud Delobelle wrote:



I'm not trying to do anything.  When a user presses the UP or DOWN
arrow, then a strange character is inserted in the Entry box.  I'd
rather nothing happened.

Why is the user doing that? If they are trying to navigate to a 
different part of the interface, they need to use the tab key, not the 
arrow key. It's not a multi-line text widget and shouldn't be expected 
to work like one.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Reading a file in IDLE 3 on Mac-Lion

2012-09-23 Thread Kevin Walzer

On 9/23/12 3:33 AM, Ned Deily wrote:

This appears to a difference in behavior between Carbon Tk 8.4 and Cocoa
Tk 8.5 on OS X.  The python.org 32-bit-only installers are built to link
with the former and, with 8.4, the Open file dialog box does have the
file-type filter menu as Hans describes.  The python.org 64-/32-bit
installers link with the newer Cocoa Tk 8.5 and, with it, the Open file
dialog box does not have the filter menu.  I'm not sure there is
anything that IDLE or Tkinter can do about that; any change may need to
be by the Tcl/Tk folks.  But it would be good if you would open an issue
at bugs.python.org so we can follow up on it.


It's a function of NSOpenPanel, the underlying native dialog that 
supports the "open file" dialog on OS X. It doesn't have a "file filter" 
capability, and so it will only recognize hard-coded types that are 
passed to it, cf. py and txt files. "dat" isn't recognized, I tested it 
out. There's nothing to do here; it's an aspect of the native dialog.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Reading a file in IDLE 3 on Mac-Lion

2012-09-23 Thread Kevin Walzer

On 9/23/12 8:45 AM, Kevin Walzer wrote:

There's nothing to do here; it's an aspect of the native dialog.


To clarify: there's nothing to do at the C level, which is where the 
native dialog is invoked. IDLE can probably be patched to accept other 
file types, such as "dat."


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Article on the future of Python

2012-09-25 Thread Kevin Walzer

On 9/25/12 4:15 AM, Mark Lawrence wrote:

Hi all,

I though this might be of interest.

http://www.ironfroggy.com/software/i-am-worried-about-the-future-of-python



Interesting article, but the comments of those who say "the only 
language I need to know is Python" strike me as a bit limited. If this 
is the case, then Python can never be moved forward, because it is 
written in C.


I program in Python, C, Objective C, JavaScript, Tcl, AppleScript, and 
I'm learning Perl. Python could *not* handle all the domains I target in 
my projects. For instance: if I want to access Mac-native functionality 
via Tkinter that isn't currently available in the library, I have to 
drill down into C or Objective-C, write a wrapper that hooks in to the 
primitives via Tcl's C API, then possibly write some additional Tcl code 
to provide a cleaner interface, *then* write some kind of Python wrapper 
that I can access in my Tkinter app.


I can understand loving the language and wanting to work just in the 
language, but it's another thing entirely to call Python the One 
Language to Rule Them All. (That's C, because all other languages are 
implemented in it. :-) )


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Article on the future of Python

2012-09-26 Thread Kevin Walzer

On 9/25/12 11:35 AM, Steven D'Aprano wrote:

IronPython in C#. Jython is written in Java. CLPython is written in Lisp.
Berp and HoPe are written in Haskell. Nuitka is written in C++. Skulpt is
written in Javascript. Vyper is written in Ocaml. PyPy is written in
RPython.

Some of those Python compilers are obsolete, unmaintained or
experimental. Others are not. But either way, it is certainly not true
that Python is written in C. One specific Python compiler happens to be
written in C, that is all.


Apart from IronPython, what constituency do these alternative 
implementations of Python have that would raise them above the level of 
interesting experiments?


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: IDLE Crashing in Mac OS 10.8.2 with 2.7.3

2012-10-09 Thread Kevin Walzer

On 10/9/12 11:27 AM, bkee...@gmail.com wrote:

I've tried all the usual suspect of uninstalling and reinstalling IDLE and 
Python 2.7.3, but my IDLE environment always crashes unexpectedly on Mac OS X 
10.8.


Where did you get Python? What version of Tcl/Tk do you have installed? 
Is it the one from ActiveState or the one bundled with OS X?


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Keeping a Tkinter GUI alive during a long running process

2012-12-20 Thread Kevin Walzer
I maintain a Tkinter application that's a front-end to to a package 
manger, and I have never been able to find a way to keep the app from 
locking up at some point during the piping in of the package manager's 
build output into a text widget. At some point the buffer is overwhelmed 
and the app simply can't respond anymore, or writes data to the text 
widget after locking up for a period.


I've long used the typical Tkinter design pattern of opening a pipe to 
the external command, and letting it do its thing. However, after a 
time, this locks up the app. If I try to throttle the buffer with some 
combination of "update" or "after" or "update_idletasks," that keeps the 
data flowing, but it comes in too slowly and keeps flowing in long after 
the external process has terminated.


Below is a sample function that illustrates how I approach this issue. 
Can someone suggest a better approach?


 #install a fink package
def installPackage(self):

self.package = self.infotable.getcurselection()
if not self.package:
showwarning(title='Error', message='Error', detail='Please 
select a package name.', parent=self)

return
else:
self.clearData()
self.packagename = self.package[0][1]
self.status.set('Installing %s' % self.packagename)
self.setIcon(self.phynchronicity_install)
self.playSound('connect')
self.showProgress()
self.file = Popen('echo %s | sudo -S %s -y install %s' % 
(self.passtext, self.finkpath.get(), self.packagename), shell=True, 
bufsize=0, stdout=PIPE).stdout

for line in self.file:
    self.inserturltext(line)
self.after(5000, self.update_idletasks)

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Second try: non-blocking subprocess pipe and Tkinter in 2.7

2012-12-21 Thread Kevin Walzer
Yesterday I posted a question about keeping a Tkinter GUI during a 
long-running process, i.e. reading data from a pipe via the subprocess 
module. I think that question did not quite get at the heart of the 
issue because it assumed that Python, like Tcl which underlies Tkinter, 
supports non-blocking, asynchronous reading out of the box. Apparently 
it does not.


So, my question is hereby revised as such: how can I implement a 
non-blocking read of a subprocess pipe that can write data to the 
Tkinter text widget in an manner that does not cause the GUI to lock up?


--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: PYTHON 3.3 + GUI + COMPILE

2012-12-27 Thread Kevin Walzer

On 12/27/12 9:08 PM, Dimitrios Xenakis wrote:

Morning,
I have been looking for a library solution of both GUI and Compiler but for 
Python 3.3 and ofcourse i was hoping for a combination that would be most 
compatible between them. After searching i may have concluded to cx_Freeze 
(because it was the only one that noticed that currently supports version 
Python 3.3), but i do not know what GUI library should i combine it with. Does 
cx_Freeze alone put any kind of restriction to my choice of GUI? I would also 
be interested in using my programs for commercial purposes, so would this put 
again some other kind of limitations to my GUI choice? I have read many good 
stuff about PySide, but still i do not know wether this is the one that i 
should choose. Is PySide same as PyQT and PyQT4 and QT or which is the exact 
relationship between those? Disadvantages - advantages, capabilities, benefits, 
costs, etc. (What is the lowest possible cost of buying such a commercial 
license for my programming?. Are there different versions and should i be carefu

l
l to choose the best for me? Where could i get this from? PySide is total free 
for my commercial needs?) I need to be legit so i guess i should learn how to 
handle with the licencing thing. Please somebody clear things for me.


Thanks 4 your time i really appreciate that.



cx_Freeze has good support for Tkinter, PyQt, and (as far as I know) 
wxPython.


License: Qt is LGPL. PyQt is GPL or commercial. PySide is, I believe, 
the same as Qt itself. I'm not sure how mature or well-supported PySide 
is, in general.


wxPython is LGPL with a commercial exception clause, which allows you to 
use it in closed-source apps.


Tkinter, as part of the stlib, has a very liberal license (BSD-style), 
as does Tcl/Tk, which allows for free use in commercial apps.


Hope this helps,
Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Buffering in Wing and IDLE 3

2012-02-01 Thread Kevin Walzer

On 2/1/12 3:01 PM, Terry Reedy wrote:

On 2/1/2012 10:17 AM, Franck Ditter wrote:


I would prefer to use IDLE but as we are in France, the Python team
does not seem to be aware that the ~ and others are not available
on MacOS-X here (probably the same in Europe)...


We are quite aware of the problem but cannot directly do anything about
it as the problem is with tcl/tk and Apple. A couple of days ago, Kevin
Walzer wrote on an IDLE-sig post "I'm currently reviewing an updated
patch to address the problem. When I commit the patch, it will go into
both Tk's trunk and in the Cocoa 8.5 backport, and eventually be
available through ActiveState's distribution."


And it's been committed:

http://core.tcl.tk/tk/info/9844fe10b9

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: How do you use the widgets in tkinter.ttk if you want to "import tkinter as tk"?

2012-03-04 Thread Kevin Walzer

On 3/3/12 12:06 AM, John Salerno wrote:

I suppose the 'advantage' of this is that it will replace tk widgets
with equivalent ttk widgets, if they exist and have the same name. I
believe one has to program them differently, however, so the replacement
cannot be transparent and one mush know anyway what gets replaced and
what not.


Grr, sounds like a pain if I want to use the new widgets. Does this cause 
conflict with someone who isn't running 8.5, or will they still see the older 
widgets as normal?

I'm tempted just to go back to wxPython. Two sets of widgets in Tkinter is a 
little annoying.


The new widgets are not a drop-in replacement for the traditional Tk 
widgets. They can be used with 8.4 if the "tile" Tk extension is 
installed. This is how the ttk widgets were first deployed; they didn't 
enter Tk's core until 8.5.

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: converting from tcl/tkl to python

2012-03-09 Thread Kevin Walzer

On 3/9/12 10:10 AM, Richard Boothroyd wrote:


First, I am not a developer so go easy on my ignorance ;-). Our
company designs and develops hearing aid audibility fitting equipment.
(www.audioscan.com). Our current software GUI is all based on TCL/TKL
and we are running into issues on developing a "prettier" GUI in an
effort to modernize some of our equipment.

My understanding is that Python is a much better GUI tool than TCL/TKL
so I'd appreciate any insight on this assumption. Also I'm wondering
what kind of effort and expertise it would take to convert from TCL/
TKL to Python. Let me know what further info you may require.



First, don't assume that Tcl/Tk is not up to the job. I took a look at 
some of your software screenshots at your website and noticed that you 
are using the "classic" Tk widgets, which, while functional, are a bit 
dated in their appearance. Tcl/Tk 8.5 has added a separate group of 
widgets called the ttk (for "themed Tk")  widgets that are fully native 
in appearance on Windows/Mac and much improved in their appearance on 
Linux/Unix. Here's a screenshot of a Tcl/Tk app using the ttk widgets on 
Windows:


http://sourceforge.net/p/windowstoolset/screenshot/screenshot.png

If modernizing the UI is all you need to do, a careful update of your 
code using the themed Tk widgets will take you a long way, with far less 
work and cost than porting your code to Python.


Having said this, if you are seeing other issues with Tcl (lack of 
support for certain libraries/API's, code is becoming unmanagable, etc.) 
and you have concluded that Python is a superior choice overall, then 
there are a number of different routes you can take:


1. Python's built-in GUI toolkit is a wrapper for Tk called Tkinter. 
Recent versions of Python support the themed Tk widgets as well as the 
classic Tk widgets. Doing a port of your code from Tcl/Tk to Python will 
be somewhat simpler if you use Python's Tkinter library, because the 
general layout will be similar. However, there are no automated tools 
for mapping Tk to Tkinter that I am aware of--you will have to do a 
rewrite of your code.


2. Python also has bindings for many other UI toolkits, including 
wxWidgets (a very nice cross-platform toolkit that has native UI 
bindings), Qt, Gtk, and others. If you prefer a different 
design/toolkit/API, these may be worth a look. However, if you opt for 
one of these toolkits and Python, then you are essentially starting from 
scratch with your software--it will be a complete rewrite not just in 
the programming language but also in the UI design as well. That will 
take a great deal of additional time and cost.


To sum up: a rewrite of your software in Python will amount a 
major-to-complete overhaul of the code base, depending on how you 
approach the UI design--and this will involve significant cost and time. 
This may make sense if you feel you have reached the end of the line 
with Tcl and your desire for a different language is for reasons in 
addition to the look and feel of the UI. However, if your software and 
its code is otherwise satisfactory and you need simply to update the UI 
design, that can be done in Tcl at far less cost using the ttk widgets.


Hope this helps,

Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Carbon Event Manager (Carbon.CarbonEvt module) - working?

2012-05-15 Thread Kevin Walzer

On 5/15/12 3:06 PM, msmucr wrote:

Do I have something wrong or is it simply broken and unmaintained now?


Support for Carbon Events was removed in Python 3.x and it does not work 
in 64-bit, to my knowledge--most of the Carbon API's are not supported 
by Apple anymore.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Tkinter by John E Grayson

2012-05-17 Thread Kevin Walzer

On 5/16/12 11:55 PM, Mark R Rivet wrote:

  I have a copy of this book and was wondering how relevant the content
is considering the publish date is 2000. Are people still using this
information? Anyone have any experience with this book? I guess what I
mean, is, any of the code in this book deprecated? or does it still
contain information used today the same as then. I mean, I guess some
things don't change right? For instance,  the derivative of x^2 is 2x
now and in the 1800's.


Mark Lutz' "Programming Python" has extensive coverage of Tkinter (it's 
a huge book and devotes several chapters to Tkinter), and has been 
updated at regular intervals, most recently in the last year or two; 
I've found it a very helpful reference and guide to Tkinter programming.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: How to hide console with Popen on Windows?

2012-05-18 Thread Kevin Walzer

On 5/18/12 4:22 AM, xliiv wrote:

Like the topic, more details in followed links..


http://stackoverflow.com/questions/10637450/how-to-hide-console-with-popen-on-windows

http://code.activestate.com/recipes/409002-launching-a-subprocess-without-a-console-window/?c=14452

Please help :(
Any hint i would appreciate


There are some Windows-specific flags in the subprocess module that you 
can set to control the display of a console window. I use something like 
this:


 self.pscmd=os.path.join(execdir, 'pstools-1.1/txt2ps.exe')
   startupinfo =  subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
txtps = self.pscmd  + ' -o ' + tempfile.gettempdir() + 
'\\whois.ps' + ' ' + tmpfile

subprocess.check_output(txtps, startupinfo = startupinfo)

Hope this helps.
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Recruiting for Python Developer - Perm

2012-05-22 Thread Kevin Walzer

On 5/22/12 5:30 AM, Python Recruiter wrote:

Key skills required for this role are:
1. Python Development on Linux
2. Experienced Software Developer

Desirable:
1. AppScript
2. Adobe Illustrator


I'm in the U.S. so would not be applying for your position, but one 
thing your post neglects to mention is that competence on Mac OS X may 
also be required here. appscript is a Mac-specific technology (Python 
interface to Apple Event framework), and can be used to script Adobe 
Illustrator, which, of course, does not run on Linux.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: what gui designer is everyone using

2012-06-07 Thread Kevin Walzer

On 6/5/12 10:10 AM, Mark R Rivet wrote:

I want a gui designer that writes the gui code for me. I don't want to
write gui code. what is the gui designer that is most popular?
I tried boa-constructor, and it works, but I am concerned about how
dated it seems to be with no updates in over six years.


None. I write GUI code by hand (Tkinter).

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-10 Thread Kevin Walzer

On 6/8/12 8:27 AM, Wolfgang Keller wrote:

What "GUI designer" would come the closest to the way that Cocoa's
Interface Builder works? I.e. is there any one (cross-platform) that
allows to actually "connect" the GUI created directly to the code and
make it available "live" in an IDE?


If you're developing on the Mac, PyObjC allows you to use Interface 
Builder for developing Python apps.


However, there are those of us who are deeply uncomfortable with IB and 
related tools, such as RealBasic and LiveCode/Runtime Revolution. These 
tools make code organization very hard by reducing the amount of code 
written to the point of the UI working by "magic," and/or by breaking up 
your code into little snippets that you can only view by clicking on the 
widget in the UI tool.


A related issue is that using a tool such as this makes you heavily 
dependent on that particular tool, and subject to its developers' 
priorities, release schedule, and bugs. The pace of Xcode 
development--with Apple making frequent changes to project formats in a 
backwards-incompatible way--is an example of this.


One reason I prefer to code UI's by hand is because a) in Tkinter it's 
very easy to do, and b) it allows me to have a much better mental model 
of my code and my app's functionality--I can put everything into as many 
.py files as I need to, and can edit my code with any text editor.


I think these issues are a reason that the slick "drag-and-drop" UI 
builders tend to be developed by commercial software shops to support 
their language and/or IDE, but find little traction among open-source 
developers and languages.


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Pythonic cross-platform GUI desingers à la Interface Builder (Re: what gui designer is everyone using)

2012-06-11 Thread Kevin Walzer

On 6/11/12 8:01 AM, Wolfgang Keller wrote:

Tkinter is imho honestly the very best "argument" if you want to make
potential new users turn their backs away from Python for good. Just
show them one GUI implemented with it and, hey, wait, where are you
running to...


Yes, Tkinter GUI's are very ugly.

http://www.codebykevin.com/phynchronicity-running.png

http://www.codebykevin.com/quickwho-main.png

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Tix Combobox

2011-06-08 Thread Kevin Walzer

On 6/8/11 8:00 AM, peter wrote:

I'm writing some fairly simple code using a Tkinter GUI, and found I
wanted a Combo box.   As Tkinter does not provide one, I turned to
Tix, and struggled.  Extensive googling failed to turn up any python
specific documentation, and there was no obvious way to translate the
Tcl documentation.

Nothing worked, and usually fell over with the error message
_tkinter.TclError: unknown color name "{#c3c3c3}".  Googling this
error message seemed to suggest that this was a known bug, and that
there was no readily available fix for those of us who like
applications to work out of the box.

Is this correct? If so is there any other Tkinter based solution, or
do I need to learn a new GUI?

I'm using Python 2.6.1 under WindowsXP

Peter
If you switch to Python 2.7 you can use the themed ttk widgets, which 
includes a native combobox--not the ugly one that comes with Tix.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: trouble creating tooltips using Wx in Tk canvas

2011-07-06 Thread Kevin Walzer

On 7/6/11 3:35 PM, Ravikanth wrote:


As it says, you haven't created the wx.App object necessary for pretty
much all wxPython code.  You could create one, but your tooltip still
would not work correctly because you would be running the Tkinter
event loop rather than the wxPython event loop.  If you want to use
the wxToolTip widget, then you should write your program to use
wxPython only.  Alternatively, googling for "tkinter tooltip" turns up
a couple of recipes; you could try one of those.

Cheers,
Ian


Thank you Ian for your insights to me on this.
I will migrate to wxPython to achieve the functionality.


Tooltips are trivial to create in Tkinter:

http://tkinter.unpythonic.net/wiki/ToolTip

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Kevin Walzer

On 7/10/11 6:50 PM, Ivan Kljaic wrote:

Ok Guys. I know that most of us have been expiriencing the need for a
nice Gui builder tool for RAD and most of us have been googling for it
a lot of times. But seriously. Why is the not even one single RAD tool
for Python. I mean what happened to boa constructor that it stopped
developing. I simply do not see any reasons why there isn't anything.
Please help me understand it. Any insights?


http://pyobjc.sourceforge.net/

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Wgy isn't there a good RAD Gui tool fo python

2011-07-11 Thread Kevin Walzer

On 7/11/11 2:28 PM, Ivan Kljaic wrote:

Did you notice that 2 of these 4 are not for python? One is out of dTe
and one has a fucked up licence. Sorry guys but there is not even one
single rad gui tool for python as long as there is no serious
guibuilder.


One reason there hasn't been much demand for a GUI builder is that, in 
many cases, it's just as simpler or simpler to code a GUI by hand. 
Certainly with the Tkinter library this is trivial. The only GUI builder 
I've ever used that was arguably superior to hand-coding is Interface 
Builder, on Mac OS X, and it's truly needed there. (The Cocoa frameworks 
don't really lend themselves to hand-coding.) Otherwise I find GUI 
builders inflexible, and more trouble than they are worth.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: I am fed up with Python GUI toolkits...

2011-07-19 Thread Kevin Walzer

OK, I'll bite...

On 7/19/11 10:12 PM, sturlamolden wrote:


1. Designed for other languages, particularly C++, tcl and Java.


So? Doing a GUI toolkit is a hard project.



2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)


Again, so? This isn't applicable to Tk, by the way. It's a GUI toolkit 
specifically designed for scripting languages.




3. Unpythonic memory management: Python references to deleted C++
objects (PyQt). Manual dialog destruction (wxPython). Parent-child
ownership might be smart in C++, but in Python we have a garbage
collector.


Again, so? Again, this isn't applicable to Tk.



4. They might look bad (Tkinter, Swing with Jython).


Then again, they might not.  A lot depends on the skill of the 
developer. I write highly polished commercial apps with Tk GUI's. I'm 
sick of developers blaming their ugly apps on the toolkit rather than 
their own lack of design training and/or skills.




5. All projects to write a Python GUI toolkit die before they are
finished. (General lack of interest, bindings for Qt or wxWidgets
bloatware are mature, momentum for web development etc.)


That's right. People issue a clarion call for a new GUI toolkit, then 
discover that even a so-called "ugly, limited, minimalist" toolkit like 
Tk has twenty years of development behind it. And people think they can 
duplicate this effort in a few months by starting a flame war on 
comp.lang.python?




1. Lean and mean -- do nothing but GUI. No database API, networking
API, threading API, etc.


Presenting...Tk.



2. Do as much processing in Python as possible. No more native code
(C, C++, Cython) than needed.


And what's wrong with native (ie. compiled) code? Python is written in 
native code, isn't it? To extend Python in significant ways, it is often 
necessary to drop down into native code.




3. Instances of extension types can clean themselves up on
deallocation. No parent-child ownership model to mess things up. No
manual clean-up. Python does all the reference counting we need.


Presenting...Tk.



4. No artist framework. Use OpenGL, Cairo, AGG or whatever else is
suitable.


"Artist framework"? I'm not sure what you mean here.



5. No particular GUI thread synchronization is needed  -- Python has a
GIL.


No comment here.


6. Expose the event loop to Python.


Presenting...Tk.


7. Preferably BSD-style license, not even LGPL.


Presenting...Tk.


8. Written for Python in Python -- not bindings for a C++ or tcl
toolkit.


Well, that's the holy grail, but given the history of other toolkits, 
you'll reach a comparable level of maturity in 2031.





The Eclipse SWT library does some of this for Java does some of this,
though it also has flaws (e.g. manual memory management). A Python GUI
toolkit could be partially based on the SWT code.


Your practical suggestion for the basis for a new Python GUI toolkit 
is...a Java GUI toolkit? I'm quite confused.


Is it worth the hassle to start a new GUI toolkit project?


Not unless you want to reinvent the wheel yet again.


Or should modern deskop apps be written with something completely
different, such as HTML5?


If it's written in HTML5, it is, by definition, not a desktop app.

--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: I am fed up with Python GUI toolkits...

2011-07-21 Thread Kevin Walzer

On 7/20/11 9:05 AM, rantingrick wrote:

On Jul 19, 9:44 pm, Kevin Walzer  wrote:


2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)


Again, so? This isn't applicable to Tk, by the way. It's a GUI toolkit
specifically designed for scripting languages.


Tk is SPECIFICALLY designed for TCL. Tkinter works ONLY by embedding a
TCL interpreter. You statements are misleading.


Of course I know this--I'm one of the core Tcl/Tk developers on my 
platform. :-) My statement was actually based on Mark Lutz's 
characterization in "Programming Python," when he defends Tk's inclusion 
in the stdlib (and his own book's extensive focus on it) by observing 
that the toolkit was specifically designed for use with scripting 
languages--Tcl at the start, but also Python, Perl, Ruby...he seemed to 
want to downplay Tk's Tcl-ish roots, as if he were embarassed by them. I 
guess it's a Tcl-ish subject.




3. Unpythonic memory management: Python references to deleted C++
objects (PyQt). Manual dialog destruction (wxPython). Parent-child
ownership might be smart in C++, but in Python we have a garbage
collector.


Again, so? Again, this isn't applicable to Tk.


He did not even mention Tk in that block, do you have a TK persecution
complex?


No, but it's an advantage that Tk has over the other ones, and an 
argument that reinventing the wheel is unncessary.





4. They might look bad (Tkinter, Swing with Jython).


Then again, they might not.  A lot depends on the skill of the
developer. I write highly polished commercial apps with Tk GUI's. I'm
sick of developers blaming their ugly apps on the toolkit rather than
their own lack of design training and/or skills.


This is true. Lots of people lack the skill to create professional
quality GUI applications however lots of GUI devs lack the skill to
create clean and intuitive API's also. Tkinter/TclTk and WxPython
\WxWidgets has lots of warts in this respect.


I think what constitutes a "clean API" is partly a matter of taste.




5. All projects to write a Python GUI toolkit die before they are
finished. (General lack of interest, bindings for Qt or wxWidgets
bloatware are mature, momentum for web development etc.)


That's right. People issue a clarion call for a new GUI toolkit, then
discover that even a so-called "ugly, limited, minimalist" toolkit like
Tk has twenty years of development behind it. And people think they can
duplicate this effort in a few months by starting a flame war on
comp.lang.python?


Just because someone wants to entertain ideas for a new GUI does mean
they are starting flame wars. I would say out all the responses so far
YOURS is the most emotional.


*shrug*

Maybe it is. I prefaced this by saying, "OK, I'll bite," which suggests 
that perhaps I shouldn't, because complaints and hand-wringing are 
really a waste of time. In the future, I think my response (if I make 
one at all) will more likely be something like this:


"An interesting idea. Please post back when you have a source code repo, 
build instructions so we can play with your code, a mailing list, and a 
license that is suitable for both open-source and proprietary development."


The most substantial effort at developing a new GUI API for Python did 
just this--PySide (alternative bindings to Qt). No hand-wringing, no 
flame wars, just an announcement of the project, an invitation to 
contribute, and so on. Whether you think it's a misguided project or an 
attempt to reinvent the wheel is beside the point--it's a substantial 
project, with both leadership and a growing community that support 
ongoing development and rapid maturation.


In my own experience, this is the only way to move things forward or 
bring about any useful change--roll up my sleeves and do it myself. I've 
done this a bit with Tkinter (maintaining bindings/wrappers to a popular 
Tk widget, tablelist), but I've done this extensively with Tk itself on 
the Mac. I complained on mailing lists for years that Tk didn't do this 
or that on the Mac, and these complaints fell on deaf ears; finally, I 
decided to dive into the deep end, learn the low-level API's to do what 
I wanted, and bingo! Suddenly Tk did what I wanted.


That's the essence of open-source development--scratching your own itch. 
Sometimes you get lucky and a large corporate entity has an itch to 
scratch, and this can bring large-scale projects with large-scale 
benefits. I believe Nokia is funding PySide. While Tk's port to the 
Mac's Cocoa API was done by a single developer, the project was funded 
by Apple. Creating a new GUI toolkit may require this scale of effort 
and investment. But even without it, if a developer can get something 
started and make enough progress to be of interest to others, then a 
larger community may move th

Tkinter/py2exe with installer

2011-07-24 Thread Kevin Walzer
Can anyone point me in the direction of a Tkinter/Python app that has 
been wrapped with py2exe and is deployed on Windows as a standalone 
using one of the standard installer tools? (MSI, NSIS, Inno Setup, etc.) 
I'm working on a Tkinter app for Windows and have had a surprisingly 
hard time finding such apps to use as examples/benchmarks, etc. (The 
only one I've found, in fact, is Webgobbler at 
http://sebsauvage.net/python/webgobbler/index.html; a nice app, but I'd 
like more examples.)


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


DDE vs. COM for Python Windows apps

2011-08-06 Thread Kevin Walzer
I'm developing a Windows version of a Mac/Python app and I'd like to add 
a scripting interface to it. On the Mac I do this via Apple Events--this 
is an Apple technology that allows applications to drive other 
applications and query them for data using a message-passing interface. 
Each application defines a suite of commands and/or data objects that it 
will invoke, depending on which Apple Event is passed to it; these 
commands and data objects are most commonly documented in an AppleScript 
API dictionary, though there are other ways to send Apple Events as well.


On Windows, I've found two separate mechanisms that seem to offer what 
I'm looking for: Dynamic Data Exchange (DDE) and Component Object Model 
(COM). As I understand it, DDE allows data transfer and 
command-automation between applications via a lightweight 
message-passing interface. COM seems to offer similar functionality, 
with a much more complex learning curve.


The main complaint I've seen about DDE is that it is very old. The main 
complaint I've seen about COM is that it is very complex and very 
brittle. Based on my research, it seems that DDE might be sufficient for 
my needs--I want other applications to be able to send commands to my 
application and have data returned to them. But I'd like to have a 
better understanding of the merits of each.


Can someone summarize the advantages that COM might have over DDE, in a 
Pythonic context?


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


os.system() on Windows in Tkinter app spawns console window

2011-08-12 Thread Kevin Walzer
I'm developing a Tkinter app for a Windows customer, and the app bundles 
several command-line tools (ported from Unix). I call out to these 
console tools from the Tkinter app via os.system(). However, in the 
frozen version of my app, when I call out to these tools, I get multiple 
console windows popping up. This is jarring to say the least. Is there 
any way to run the commands under the hood without the console/DOS 
windows popping up?


--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Ten rules to becoming a Python community member.

2011-08-14 Thread Kevin Walzer
I'd like to post a detailed response, e.g. a point-by-point engagement 
with Rantingrick's list, but as I lack time, this will have to suffice:


http://xkcd.com/386/

There! Can I get my community pin now? :-)
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: os.system() on Windows in Tkinter app spawns console window

2011-08-14 Thread Kevin Walzer

On 8/13/11 1:15 AM, Nobody wrote:

On Fri, 12 Aug 2011 22:49:32 -0400, Kevin Walzer wrote:


I'm developing a Tkinter app for a Windows customer, and the app bundles
several command-line tools (ported from Unix). I call out to these
console tools from the Tkinter app via os.system(). However, in the
frozen version of my app, when I call out to these tools, I get multiple
console windows popping up. This is jarring to say the least. Is there
any way to run the commands under the hood without the console/DOS
windows popping up?


Just a wild guess, but try explicitly redirecting the commands'
stdin/stdout/stderr. You might also consider using subprocess.call()
instead of os.system().



I've gotten the CLI commands to execute silently by setting the window 
flags for subprocess as discussed here:


http://code.activestate.com/recipes/409002-launching-a-subprocess-without-a-console-window/

These flags are apparently undocumented, but this solution works 
perfectly. Perhaps the flags should be better documented.


--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python Windows Extensions for Mac

2011-08-20 Thread Kevin Walzer

On 8/19/11 4:02 PM, johnny.venter wrote:


Hello, I am looking for the Python Windows Extensions to see if they can be 
installed on a Mac.THanks.



You can certainly try to install them via easy_install, I supposed, but 
it's doubtful they would do anything, as the Mac does not support win32 
API calls any more than Windows supports Cocoa/Objective-C calls.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: OSX application built with py2app can't see bundled PySide module?

2011-09-02 Thread Kevin Walzer

On 9/1/11 3:54 PM, Aaron Scott wrote:

I'm trying to deploy a Python app on OSX that was built with PySide. py2app 
packages it without issue, copying and linking a lot of PySide and Qt files in 
the process. But then, when I try to run the built app, I get this error:

Traceback (most recent call last):
   File 
"/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/__boot__.py",
 line 31, in
 _run('dailies_v02.py')
   File 
"/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/__boot__.py",
 line 28, in _run
 execfile(path, globals(), globals())
   File 
"/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/dailies_v02.py",
 line 9, in
from PySide.QtCore import *
   File "PySide/__init__.pyc", line 2, in
   File "PySide/private.pyc", line 2, in
   File "PySide/QtCore.pyc", line 18, in
   File "PySide/QtCore.pyc", line 15, in __load
ImportError: '/usr/lib/python2.6/lib-dynload/PySide/QtCore.so' not found

The weird thing is, QtCore.so IS included in the application bundle: py2app 
copied it to the build under 
Contents/Resources/lib/python2.6/lib-dynload/PySide/. Is there a reason the 
application isn't seeing this?


You might want to post this question to the MacPython list--that's where 
the py2app experts are found.


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Comparing VCS tools (was ""Development tools and practices for Pythonistas")

2011-04-29 Thread Kevin Walzer

Fossil is another SCM to consider: http://www.fossil-scm.org/

It's written by the author of SQLite, D. Richard Hipp. It's not as 
well-known as some of the other DCVS's, but the Tcl/Tk language projects 
have moved their core development to it (http://core.tcl.tk). This is 
relevant to Python because Tkinter is part of the stlib.


There aren't any huge sites like Github providing Fossil hosting, but 
here is one site: http://chiselapp.com/


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Why did Quora choose Python for its development?

2011-05-24 Thread Kevin Walzer

On 5/22/11 3:44 AM, Octavian Rasnita wrote:

Somebody told that C# and Objective C are good languages. They might be good, 
but they are proprietary, and not only that they are proprietary, but they need 
to be ran under platforms that cannot be used freely, so from the freedom point 
of view, Perl, Ruby, Python and Java are the ways to go.


Proprietary?

Licensing options for C# in its Mono (Free Platform) implementation:

http://www.mono-project.com/Licensing

Licensing options for Objective-C in its GNUStep (Free Platform) 
implementaiton


http://www.gnustep.org/information/aboutGNUstep.html

It may be true that these languages are more widely used on their 
originating platforms (Windows, OS X) than on Linux, but these 
implementations are definitely open source.


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Why did Quora choose Python for its development?

2011-05-24 Thread Kevin Walzer

On 5/24/11 2:23 AM, Stefan Behnel wrote:

Beliavsky, 20.05.2011 18:39:

I thought this essay on why one startup chose Python was interesting.


Since everyone seems to be hot flaming at their pet languages in this
thread, let me quickly say this:

Thanks for sharing the link.

Stefan



I kind of thought that other posters might also chime in on why they 
chose Python instead of . Since no one else 
has, I'll bite.


I've been programming for about seven years, and am basically 
self-taught. I got my first taste of writing code when trying do to some 
basic hacking on my (then) shiny new G3 iBook. (Even though it was a 
Mac, I was enthralled by its Unix underpinnings.) C was too hard for a 
programming newbie, and (at the time) I only understood shell to be a 
sequential series of commands. (cd ~/.Trash; ls; rm *)


My goal was to write desktop GUI apps, and looking around at the 
available languages, libraries, and toolkits for Unix and the Mac, I 
settled on Tk as the UI toolkit, since it seemed to be the simplest one 
out there, and on Tcl and Python as the programming languages. (A brief 
detour with AppleScript convinced me that it is a useful scripting 
language for hooking into various parts of OS X, but it is not very 
powerful.)


While Tcl doesn't get a lot of love or respect on this list, it is quite 
powerful in its way, and an understanding of Tcl is quite useful in 
particular for understanding Tk and its Python wrapper, Tkinter. After 
becoming productive with Tcl and writing a couple of applications in it, 
I turned to Python in earnest and set about learning its capabilities as 
well, and have since released a couple of Python desktop apps on the Mac 
(commercial apps, using Tk as the toolkit).


With that background, here are my reasons for keeping Python in my toolbox:

1. Its core libraries and third-party packages address nearly every 
imaginable need. The size of its community is a real asset here. Tcl is 
a more compact language, with a smaller core library and fewer 
third-party packages (no library comparable to Mark Pilgrim's 
feedparser, for instance), which means that for some use cases, using 
Tcl would mean more work.


2. Python has excellent tools for deployment of desktop apps. Since I 
only work on the Mac, I'm not that familiar with py2exe, but py2app and 
bundlebuilder have always allowed me to wrap up my apps with an embedded 
Python interpreter with a minimum of fuss. Tcl also excels in deployment 
of desktop apps; other languages, such as Perl and Ruby, seem to lag 
behind in this respect. (I could find no actively-maintained, 
open-source, Mac-viable desktop app bundling tools for either Ruby or 
Perl, which cooled my interest in them considerably.)


3. Python's binding to Tk makes writing GUI apps a straightforward 
process. Since I already knew Tk quite well, learning its Python 
bindings was much simpler than learning another GUI toolkit such as PyQt 
or wxPython. The strategies I learned from Tcl to develop sophisticated 
Tk-based UI's translate quite well to Python.


Python isn't perfect; for some instances, I find Tcl a more lightweight 
and accessible tool to use. I also spend a lot of time digging into Tcl 
and Tk's C API to extend their capabilities in certain ways; this also 
allows my Python apps to access such enhancements, via Tkinter. But all 
in all I'm a happy user of Python, and it will continue to have a 
primary place in my toolbox.


--Kevin

--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Linux/Windows GUI programming: GUI-fy a CLI using pyInstaller

2018-01-05 Thread Kevin Walzer

On 1/1/18 11:45 AM, X. wrote:

Ulli Horlacher:

I have to transfer a python 2.7 CLI programm into one with a (simple) GUI.
The program must run on Linux and Windows and must be compilable with
pyinstall, because I have to ship a standalone windows.exe
Any kind of installer is not acceptable.

Reading https://github.com/pyinstaller/pyinstaller/wiki/Supported-Packages
supported GUI packages are PyGTK, PyQt4, PyQt5, wxPython
I have tested tkinter by myself and it works, too.
I do not like GTK and Qt, because they are too complex.

I want to do VERY simple things and I prefer a simple GUI toolkit :-)



me too !



Try easygui:

https://pypi.python.org/pypi/easygui


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: PyDictObject to NSDictionary

2017-02-03 Thread Kevin Walzer

On 2/2/17 6:30 PM, Charles Heizer wrote:

Hello,
I'm embedding python in to my Objective-C app and I need to know how do I 
convert a PyDictObject (PyObject) to a NSDictionary?

Thanks!

Does the PyObjC library provide any support for this? It allows 
integration between the Cocoa API's and Python.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Python on 10.14 Mojave

2018-10-10 Thread Kevin Walzer
I'm trying to build Python 3.7.0 on macOS 10.14, and Tkinter is not 
linking to my installation of Tcl/Tk 8.6.8 in /Library/Frameworks. 
Instead it is linking to the ancient 8.5 Tk installed in 
/System/Library/Frameworks. My usual way of forcing Python to link to my 
installation is to edit setup.py and comment out all search directories 
except /Library/Frameworks, but that seems to be ignored here. Is there 
any other way to link to the correct frameworks?


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
--
https://mail.python.org/mailman/listinfo/python-list


Can't load Tkinter in embedded Python interpreter on Windows

2016-04-05 Thread Kevin Walzer
I am trying to build a stub exe on Windows that embeds Python and 
launches my Tkinter app. I want a full-blown exe program starter because 
the various Python freezing tools (py2exe, pyinstaller) do not work to 
my satisfaction with Python 3.5.


I am able to get the executable built but I cannot get it to load 
Tkinter and run. The current error is:


"AttributeError: module 'sys' has no attribute 'argv'"

when called from the Tkinter init method.

Here is my command-line invocation for the compiler:

---
gcc quickwho.c -I 
\C:\Users\kevin\AppData\Local\Programs\Python\Python35\include 
-LC:\Users\kevin\AppData\Local\Programs\Python\Python35\libs 
-LC:\Users\kevin\AppData\Local\Programs\Python\Python35\DLLs -lShlwapi 
-lpython35 -o quickwho.exe



And here is my C stub launcher:

#include 


#include 
#include 
#include 
#include 

int main(int argc, char *argv[])
{

Py_SetProgramName(argv[0]);
Py_Initialize();

 TCHAR exedir [MAX_PATH];


  #if 0
  GetModuleFileName(NULL, exedir, MAX_PATH);
  _tprintf("%s/n", exedir);
  PathRemoveFileSpec(exedir);
  _tprintf("%s/n", exedir);
  #endif

   /*Get the module's full path, and set to the current working 
directory.*/

  if (!GetModuleFileName(NULL, exedir, MAX_PATH)) {

TCHAR errmsg[512];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, 
GetLastError(),0,errmsg,1024,NULL);


_tprintf( TEXT("The path is %s, and the error is %s/n"), exedir, 
errmsg );

  }


  if (!PathRemoveFileSpec(exedir)) {

TCHAR errmsg[512];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, 
GetLastError(),0,errmsg,1024,NULL);
_tprintf( TEXT("The target dir is %s, and the error is %s/n"), 
exedir, errmsg );

  }

  if (!SetCurrentDirectory(exedir)) {

TCHAR errmsg[512];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,0, 
GetLastError(),0,errmsg,1024,NULL);
_tprintf( TEXT("The working dir is %s, and the error is %s/n"), 
exedir,errmsg );

  }


PyRun_SimpleString("exec(open(\"QuickWho.py\").read())");
Py_Finalize();

return 0;
}

Can anyone suggest what I might do to get Tkinter to load and run my exe?

Thanks,
Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Can't load Tkinter in embedded Python interpreter on Windows

2016-04-05 Thread Kevin Walzer

Adding

 PySys_SetArgv(argc, argv);

did the trick.

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Label behavior's difference between tkinter and ttk

2016-04-05 Thread Kevin Walzer
In general, the "img.config" syntax is suitable for the classic Tk 
widgets, not the themed ttk widgets. They have a very different (and 
very gnarly) syntax for indicating changed state. I am not inclined to 
see a bug here.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: calling a dylib in python on OS X

2005-10-23 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] wrote:
| Hi
|
| Is there something similar to python's windll for calling DLLs on win32
| but meant for calling dylib's on OS X?
|
| thanks,
|
| r.s.
|
Can you be more specific about what you are trying to do/what dylib you
want to call?


- --
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDW8ZmJmdQs+6YVcoRAvKPAJ0TUW8hgRN6AOn/nBP1v12kqmLXrQCfc5B1
uVv3uBAz7I/jO7l/htpuTb0=
=oXiv
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IDE recommendation please

2005-10-23 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

microsnot wrote:
| I'm new to Python but am wondering what IDE Python developers use? I
use Mac
| OS X 10.4.2. I have PythonIDE which comes with MacPython but I don't think
| that has even rudimentary "intellisense". Xcode and Eclipse don't seem to
| support Python out of the box. Suggestions for plugins for Eclipse would
| also be nice.
|
The situation has been pretty bleak, and I've tried (even maintained Mac
packages for awhile) nearly all the open-source IDE's out there,
including SPE, Boa, Eric3, etc. They all crashed constantly in my
experience. SPE has been making more of a Mac push since I stopped
maintaining Mac packages so it may have improved.

Komodo is a good IDE and is currently in beta testing on OS X: see
www.activestate.com for the particulars. It's more polished than any of
the open-source tools (though it should be for the $300 that the pro
version costs), and runs natively (as an Aqua app). Komodo is not
Python-only, but if you are developing commercially it is a very  good
tool to consider.

WingIDE is also very powerful, but runs only as an X11 app on the Mac.
That may or may not be a problem for you.

I've ultimately settled on a primitive set of tools myself, Emacs or
IDLE, plus the console. Fewer bells and whistles, but they are stable,
and don't get in my way.

- --
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDXAIlJmdQs+6YVcoRAqsKAJ0YX14aGH5pUpujXb+wmYoWbGUkWQCfX0oK
6kiXX9w+rAIbo5qCYGUWIuc=
=YSju
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: MacOS Extension Carbon.File.FSCatalogInfo file sizes should be UInt64?

2005-10-31 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

donbro wrote:
| If my read of the extension source (Mac/Modules/file/_Filemodule.c) is
| correct, the parameter sizes specified for data and resource file sizes
| are UInt32 where they should be UInt64.
|
| In both OS9 and OSX Carbon, the MacOS File Manager (Files.h) uses
| UInt64 values for data and resource filesizes.
|
| Testing Python 2.3 and 2.4.2 on MacOS 10.3 returns 0L for the file size
| values and correct values for other elements such as parentDirID:
|
|
|>>>fsRef = FSRef('LICENSE')
|>>>catinfo, d1, d2, d3  = fsRef.FSGetCatalogInfo(-1L)
|>>>catinfo.dataPhysicalSize
|
| 0
|
|>>>catinfo.parentDirID
|
| 2026177
|
|
| in Files.h, both OS9 and OSX Carbon, the elements are UInt64:
|
| struct FSCatalogInfo {
| [...]
| UInt64  dataLogicalSize;
| UInt64  dataPhysicalSize;
| UInt64  rsrcLogicalSize;
| UInt64  rsrcPhysicalSize;
| [...]
| }
|
| in _Filemodule.c the spec looks to be 32 bit:
|
| static PyObject *FSCatalogInfo_get_dataLogicalSize(FSCatalogInfoObject
| *self, void *closure)
| {
|   return Py_BuildValue("l", self->ob_itself.dataLogicalSize);
| }
|
| I have, perhaps naively, just changed my local copy to use a BuildValue
| parameter of "L" instead of "l" for each of these get and set methods
| and this has survived my initial testing:
|
| static PyObject *FSCatalogInfo_get_dataLogicalSize(FSCatalogInfoObject
| *self, void *closure)
| {
|   return Py_BuildValue("L", self->ob_itself.dataLogicalSize);
| }
|
| But my questions are:
|
| Has anyone else seen this?
|
| Does this seem like the right fix?
|
| There is another routine in _Filemodule.c: FSCatalogInfo_tp_init() that
| also seems to hold information relevant to parameter size.  Should this
| be changed as well?
|
| If this is a bug, what's the best procedure to report this?
| Sourceforge?  This mailing list?
|
| I'm porting a MacOS9 application from C++ to python and I expect to be
| seeing a lot of these python macintosh filesystem extensions in the
| near future!
|
| Thanks for any help
|
| Don
|
You're most likely to get a good answer to this question on the
MacPython mailing list--give that a try if you don't get a response here.


- --
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDZmj8JmdQs+6YVcoRAtkTAJ9CEYbIRy6VLY7qp304JPmcl+iXUQCdHTMT
KmJljW7loFJNKFsjFkB2aNA=
=vEVV
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list


A Tcl/Tk programmer learns Python--any advice?

2005-11-07 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm a Tcl/Tk developer who has been dabbling with Python for some time,
but had not seen a compelling reason to really learn the language.
Programming in Tkinter seemed redundant to me since I already have
direct access to that toolkit via Tcl, and the other Python GUI toolkits
I tried--PyQt and wxPython--were frustrating with their learning curve.

Well, I have finally found a good reason to learn Python in more depth:
the language already directly supports things that I want to do in my
next project (specifically the Carbon modules in Mac OS X), whereas Tcl
would require a lot of extending in C before I could get started. I've
decided that it's probably less work to learn the Python way of doing
things, and if I stick with Tkinter, then the learning curve will be
reduced.

I've gotten all the approropriate resources for learning Python (docs,
books, tutorials), so my question is this: are there any "gotchas" that
Tcl programmers often encounter in learning Python? I'm thinking
specifically about habits that may require "unlearning," for instance,
such as grokking object orientation (Tcl procedures are now embedded
deep in my brain).

Any advice, particularly from other programmers with a lot of experience
in Tcl, is appreciated.

- --
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDb3sLJmdQs+6YVcoRAq5xAJoCbDYeMO58yRPqid4K5WTd1+PbcgCbBATL
0UppdVmVdcb+AfFUIsvrdrY=
=Hk8w
-END PGP SIGNATURE-
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PIL-> Tkinter

2005-11-09 Thread Kevin Walzer
Tuvas wrote:
> Is there a way to put an image loaded from PIL into a TKinter GUI?
> Without converting the image to a .bmp, and using a canvas? If that's
> the only way it'll work, I'll take it, but... It would be nice
> otherwise...
> 

Can you use PIL to convert it to a GIF? Tk can display GIF's natively.

-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pregunta sobre python

2005-11-14 Thread Kevin Walzer
Yves Glodt wrote:
>
> 
> puedes cerrer un programa con os.kill, pero depende de tu plataforma, 
> por ejemplo en linux (no se para windows):
> 
> os.kill(pid_del_proceso, 9)
> 

>>
Y tambien, algunas platformas necesita el mandato "sudo", como esto:

os.system('echo su_contraseña | sudo -S kill pid')


-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Not enough arguments for format string

2005-11-14 Thread Kevin Walzer
I'm getting an error in a Python script I'm writing: "not enough 
arguments for format string." The error comes at the end of the 
os.system command, referenced below. Any ideas?

---

import EasyDialogs
import os
import sys


password = EasyDialogs.AskPassword("To launch Ethereal, please enter 
your password:")
binpath = os.path.join(os.path.dirname(sys.argv[0]), 
'/opt/local/bin/ethereal')  

os.system('open -a X11.app; cd ~/; printenv; DISPLAY=:0.0; export 
DISPLAY;  echo %s | sudo -S %s; sudo -k' %password %binpath)

TypeError: not enough arguments for format string


-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Mac OSX oddities (compiling Python plus tkinter)

2005-11-23 Thread Kevin Walzer
MichaelW wrote:
> I've been Python (2.3.4) plus Tkinter happily under MacOX 10.3, having
> compiled them from scatch. (Tkinter is based on tcl/tk 8.4.1, which
> were compiled from source via Fink).
> 
> I then moved my laptop over the 10.4, and things are now breaking.
> Using the Python shipped with 10.4 (which has Tkinter based on tcl/tk
> 8.4.7) the window in a particular application looks completely
> different (more Apple-like) and the buttons no longer work properly.
> (Oddly, some icons have fallen off the buttons.) I therefore thought I
> might compile Python from scratch and that fell over with messages:
> 
> sem_init: Function not implemented
> sem_wait: Bad file descriptor
> sem_post: Bad file descriptor
> 
> reported at intervals. I assume the odd Tkinter behaviour is due to
> problems Apple created Apple-ising it?  Is that correct, or has there
> been a major change to the API between 8,4 and 8.7?. Is there any
> work-around? Secondly, can I assume that the compiler messages indicate
> a problem with the compiler (gcc select 3.3 makes no difference, BTW).
> 
> Your ideas would be appreciated.
> 
> Cheers
> MichaelW
> 
There were not huge changes between Tk 8.4.1 and 8.4.7. However, if you 
were using Tk from Fink before and now are using the Apple version of 
Tk, that may account for the difference. Tk from Fink is targeted for 
X11, while the Apple-installed Tk is targeted to the Aqua windowing 
environment. Tk itself is portable, but some of the extension packages 
for it (such as BLT, and presumably any Pythonesque wrappers for them) 
do not work on Aqua. Similarly, some bugs have arisen in Aqua's 
implementation of Tk (pixmaps do not display in menus, tearoff menus do 
not work properly), etc.

Also, did you compile Python as a Carbon framework build (makes use of 
the Apple's windowing environment)? What version are you now running?

-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tablelist-tcl-tk-tile

2005-11-27 Thread Kevin Walzer
malv wrote:
> Wanting to explore tk under python, I must say that it seems to be very
> difficult to find the required information in one single place.
> I would like to give tk a try but as I need as a test something
> equivalent of the Qt datagrid, I don't seem manage yet to get the
> latest releases of tablelist, tcl, tk and tile going.
> Did anybody manage to make the recent releases work in Python 2.4?
> I manged to do some things with tablelist v4.2 but with the 8.4
> versions of tcl/tk. However, for future work including tile, it would
> seem wise to start out from 8.5.
> In order to make tcl8.5, tk8.5 go, I suppose the 8.4 versions have to
> be removed.
> Do I have to remove and recompile python 2.4 as well? Is there any
> compact writup on how to get going without having to delve into the
> inner workings and wrapping of tcl?
> Thx.
> malv
> 
Tcl/Tk 8.5 has not yet been released--it's still in alpha testing. Last 
I heard the target release date was next spring or summer.

I'm coming to Python from the Tcl/Tk world, and the limited testing of 
Tile (v. 0.7.2) and tablelist (0.4.2) that I've done works fine (this is 
with Python 2.4.2 and Tcl/Tk 8.4.10).

-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Configuring Python for Tk on Mac (continued)

2005-01-27 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Martyn Quick wrote:
| From: Alex Martelli ([EMAIL PROTECTED])
|
|>No idea about any 10.2, sorry, but on 10.3 that's not the problem: Tk
|>support is there alright, it's Tcl/Tk which _isn't_.  Get MacPython, its
|>PackageManager will explain where to get Tcl/Tk Aqua from, as a prereq
|>for Tkinter and IDLE!
|
|
| Ok, I've installed MacPython.  It doesn't seem to work right though...
| for example, if I try to run the 00-HELLO-WORLD.py example then it
| crashes and tells me the IDE has unexpectedly crashed.
|
| I can't really see how to run things either.  (I'm used to just typing
| "python" in a terminal on Unix but that seems to just run the version
| that comes pre-installed.)
|
| Sorry for not knowing much about Macs and being a bit clueless.
|
| Martyn
You need to install Tk Aqua at this site:
http://tcltkaqua.sourceforge.net
You then need to install the tkinter bindings using Package Manager,
which comes as part of the Macpython distribution.
IDLE then should run fine.
Also, you can't run Python gui programs by typing "python" in the
console on the Mac: either double-click the script, or use "pythonw" as
the launching program in the terminal.
- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB+WXEJmdQs+6YVcoRAg5rAJ4zJYRVvEe0wvT3ZIJLwa79Am90CACdFeiv
NXU/lT4hYVCPCtU6bGEWc40=
=+Q7e
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: More newbie macosx user questions

2005-02-24 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
This link might help:
http://www.astro.washington.edu/owen/AquaEnvVar.html

Timothy Grant wrote:
| 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 results are identical with
| python. It doesn't look like my PYTHONPATH is getting prepended to the
| library path.
|
| Can anyone tell me what I'm doing wrong?
|
| ([EMAIL PROTECTED]) echo $PYTHONPATH
| /Users/timothygrant/code/lib
| ([EMAIL PROTECTED]) ls $PYTHONPATH
| NJB.pyNJB.pyc   _njb_c.so njb_c.py  njb_c.pyc
| ([EMAIL PROTECTED]) pythonw
| Python 2.3 (#1, Sep 13 2003, 00:49:11)
| [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
| Type "help", "copyright", "credits" or "license" for more information.
|
|>>>import NJB
|
| Traceback (most recent call last):
|   File "", line 1, in ?
| ImportError: No module named NJB
|
|>>>import sys
|>>>for p in sys.path:
|
| ... print p
| ...
|
| /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python23.zip
| /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-darwin
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/plat-mac/lib-scriptpackages
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-tk
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload
|
/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages
- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCHq1MJmdQs+6YVcoRAmVnAKCIL/ceAZVQXrvjIw/YE5OpeQTdcgCfc5FN
hJtbmQBCTnI/2wv4/CEuMcA=
=QxVP
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: PyQT Licensing and plugins/scripting

2004-12-03 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
PyQt on OS X is also available under a GPL version. I have a binary
installer available at http://www.wordtech-software.com/pyqt-mac.html

Fabio wrote:
| Hi all,
| I'm about to write an application, and I'd like to use PyQt, but before
| choosing this toolkit I would like to clarify some particular licensing
| issues; if some user has already touched these, I would like to hear from
| his experiences.
|
| This app should be cross-platform, so, given qt licensing policies, I
would
| buy a commercial PyQt license and a commercial Qt license.
|
| Could I license the application under the GPL for Gnu/Linux and under a
| commercial license for Windows and Mac OS X? If this is possible, I guess
| that contributions to the GPLed version could not be incorporated in the
| commercial version, but this would not be a big problem.
|
| The main issue with licensing is that I would like to give users of the
| application a scripting framework (for macros and the like), and
eventually
| a plugin framework; PyQT redistribution policy states that if an user can
| get in touch with PyQT directly it should have a commercial license
itself;
| how does this apply to those who want to develop commercial PyQT
| applications with a plugin/scripting framework?
|
| Thanks,
| Fabio
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBsO2QJmdQs+6YVcoRAmv5AKCClM58N6EgMVUkaVrp5gWzALxuCwCeI+Gt
5+gXRwfjtSPiu4DEnF5j86Q=
=WkvR
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: PyQt on MAC OS X

2004-12-13 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I've assembled a binary installer for the native version of PyQt. See
http://www.wordtech-software.com/pyqt-mac.html
I built it on Panther. Not sure if it will work on Jaguar, but you're
welcome to give it a try.

Michael McGarry wrote:
| Hi,
|
| I'm trying to get PyQt up and running under Mac OS X 10.2.8, but
| can't get past configuring sip.
|
| I installed fink's qt3-3.2.3-2 and restarted my shells to get
| qt3's environment variables QTDIR and QMAKESPEC.
|
| I downloaded sip-4.1 from
| http://www.river-bank.demon.co.uk,
| unpacked it, ran
|
| python configure.py
|
| and got this error:
|
| Error: /sw/share/qt3/mkspecs/darwin-g++/qmake.conf: macro
| 'QMAKE_LIBDIR/$(TARGET1)' is not defined.
|
|
| Any ideas?
|
| Michael
- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBvb9CJmdQs+6YVcoRAsv2AJ4rkwZ2kO8kPcBKoZ5h1F8vEof+lwCeNO8n
rK8yurwPQaJFH8yK6PlbOtg=
=0LQg
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: PyQt on MAC OS X

2004-12-13 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Michael McGarry wrote:
| Kevin Walzer wrote:
|
| I've assembled a binary installer for the native version of PyQt. See
| http://www.wordtech-software.com/pyqt-mac.html
|
| I built it on Panther. Not sure if it will work on Jaguar, but you're
| welcome to give it a try.
|
|
|
| Michael McGarry wrote:
| | Hi,
| |
| | I'm trying to get PyQt up and running under Mac OS X 10.2.8, but
| | can't get past configuring sip.
| |
| | I installed fink's qt3-3.2.3-2 and restarted my shells to get
| | qt3's environment variables QTDIR and QMAKESPEC.
| |
| | I downloaded sip-4.1 from
| | http://www.river-bank.demon.co.uk,
| | unpacked it, ran
| |
| | python configure.py
| |
| | and got this error:
| |
| | Error: /sw/share/qt3/mkspecs/darwin-g++/qmake.conf: macro
| | 'QMAKE_LIBDIR/$(TARGET1)' is not defined.
| |
| |
| | Any ideas?
| |
| | Michael
|
|
|>
| Kevin,
| thanks that did the trick!!!
| One problem is my Window created in Qt appears underneath all others on
| the screen and focus never goes completely onto this window. Kind of
weird.
| Any ideas?
| Michael
Michael,
Are you referring to the application you're developing, or the Eric3 IDE
that I bundled? I've observed that Eric3 hesitates for a second before
taking focus, though it eventually does if you click on the window. I've
observed this with other Qt apps in general, including some of the other
PyQt apps I've bundled on my own machine.
If the window never takes focus at all, it might be something as basic
as starting your application with "python" instead of "pythonw" if you
are launching it from the command line. You need to use "pythonw" to
correctly access the windowing system.
An easy way to start your app wtih the correct python command is simply
to double-click it instead of running it from terminal. That will
automatically call pythonw.
Hope this helps,
Kevin

- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBvmgNJmdQs+6YVcoRAvyaAJ49ngIqK467Z+4KilzZd/EnPGveWgCfZcfb
ot+z9Qf61R3ZhpqTRPAnnKc=
=Z3Bw
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: Best GUI for small-scale accounting app?

2004-12-20 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Diez B. Roggisch wrote:
|>Question for you, does Qt use the native Windows dialogs and widgets or
|>does it use its own?  If the latter, how close are they to the native
|>look?  Will they change appearance when a user chooses a different
|>theme in the Display Dialog?
|
|
| AFAIK they do all stuff themselves. And also AFAIK photoshop is created
| using qt.
|
|
PhotoShop is not created with Qt. I believe it's created with CodeWarrior.
PhotoShop Album is created with Qt--a very different beast.

- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBxzrmJmdQs+6YVcoRAtcDAJ96YHfTfxxHKU4HT3uteBnmh95diQCfd+D+
lAhzXIeXPmihJgmTFhC8wJU=
=RU7/
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: new to mac OS10

2005-04-16 Thread Kevin Walzer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
It's *not* a good idea to delete Apple's system Python. You will
probably need to reinstall the OS.
In addition to the mailing list that someone else posted (which is a
great resource!), here's a good site to check out:
http://pythonmac.org/
The site maintainer, Bob Ippolito, is one of the main developers of
Python on the Mac and maintains a lot of packages. This site also
includes lots of links to information.
Hope that helps,
Kevin
Thomas Nelson wrote:
| The main thing I would like is to be able to use tkinter with python on
| my mac.  will the command-line-style source allow this?  Does it come
| with IDLE?  How is the fink version different from the source i can
| download at python.org?  Here's the result of the requested commands on
| my Terminal.  It would appear that these links are broken, as
| Python.framework no longer exists.  Sorry to be so much trouble,
|
| THN
|
|
|
| Welcome to Darwin!
| ~ $ ls -all /usr/bin/python*
| lrwxr-xr-x  1 root  wheel9 20 Jun  2004 /usr/bin/python -> python2.3
| lrwxr-xr-x  1 root  wheel   72 20 Jun  2004 /usr/bin/python2.3 ->
| ../../System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
| lrwxr-xr-x  1 root  wheel   10 20 Jun  2004 /usr/bin/pythonw -> pythonw2.3
| -rwxr-xr-x  1 root  wheel  122  8 Jun  2003 /usr/bin/pythonw2.3
| ~ $ ls /System/Library/Framework/Python.framework
| ls: /System/Library/Framework/Python.framework: No such file or directory
| ~ $ cd /System/Library/Framework/Python.framwork
| -bash: cd: /System/Library/Framework/Python.framwork: No such file or
| directory
| ~ $
|
|
| Jorl Shefner wrote:
|
|> If you simply want the latest python to run from the command line, then
|> compiling the source code works fine on the mac.  I just installed
|> 2.4.1 on Os 10.3.8 last week without any problems.
|>
|> http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz
|>
|> "./configure"
|> "make"
|> "make install"
|>
|> J.S.
|>
- --
Cheers,
Kevin Walzer, PhD
WordTech Software--Open Source Applications and Packages for OS X
http://www.wordtech-software.com
http://www.smallbizmac.com
http://www.kevin-walzer.com
mailto:[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCYVSkJmdQs+6YVcoRAj2IAJ4/Pv0yJhs4flLOk1JgEHcUbNrJPwCeMeS9
ue7gNcVE8Kluw7LplS1bFGs=
=uqOO
-END PGP SIGNATURE-
--
http://mail.python.org/mailman/listinfo/python-list


Re: Suggest an open-source issue tracker, with github integration and kanban boards?

2013-11-17 Thread Kevin Walzer

On 11/13/13, 7:46 AM, Alec Taylor wrote:

Started to build this on my own; then was like, hang on! - This is
probably something very commonly requested…

Can you recommend an open source project (or two) written in Python;
which covers multi project + sub project issue tracking linked across
github repositories?

[on the github side, want to be able to reference "commit 
solved by patch from issue #"; fine to have that extra annotation only
present on my server]

Also would be perfect if it has kanban board support, issue
prioritisation and distribution/assignment amongst team members; as
well as related analytics.

Thanks for all suggestions! =)



Not written in Python, but Fossil (http://www.fossil-scm.org/) offers an 
all-in-one, lightweight DCVS/issue-tracking/wiki/blog package. Written 
the author of SQLite.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Getting the Appdata Directory with Python and PEP?

2013-12-02 Thread Kevin Walzer

On 11/26/13, 5:49 PM, Eamonn Rea wrote:

Maybe this module is of some use to you:
>
>https://pypi.python.org/pypi/appdirs
>
>
>
>It provides a unified Python API to the various OS specific 'user' directory 
locations.
>
>
>
>Irmen

I saw this, but I wanted to do it myself as I stated in the OP:)


This module appears to simply use hard-coded paths on Unix/Linux and OS 
X--not much to learn there, except which paths to code.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Packaging a proprietary Python library for multiple OSs

2013-12-05 Thread Kevin Walzer

On 12/5/13, 5:14 AM, Michael Herrmann wrote:

Even though I am not generating an EXE, I am using py2exe to obtain the distributable Zip 
file for my library. This "hack" is very convenient, as py2exe allows me to 
simply say which packages I require and does the work of performing a dependency analysis 
of the required libraries for me. py2exe automatically generates the Zip file with my 
(compiled) library code, and all dependencies.


If your library and their dependencies are simply .pyc files, then I 
don't see why a zip collated via py2exe wouldn't work on other 
platforms. Obviously this point is moot if your library includes true 
compiled (C-based) extensions.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Packaging a proprietary Python library for multiple OSs

2013-12-05 Thread Kevin Walzer

On 12/5/13, 10:50 AM, Michael Herrmann wrote:

As I said, I need to make my *build* platform-independent.


cx_Freeze is platform independent, but I'm not sure if it generates 
libraries or simply executables.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Packaging a proprietary Python library for multiple OSs

2013-12-06 Thread Kevin Walzer

On 12/5/13, 10:50 AM, Michael Herrmann wrote:

On Thursday, December 5, 2013 4:26:40 PM UTC+1, Kevin Walzer wrote:

On 12/5/13, 5:14 AM, Michael Herrmann wrote:
If your library and their dependencies are simply .pyc files, then I
don't see why a zip collated via py2exe wouldn't work on other
platforms. Obviously this point is moot if your library includes true
compiled (C-based) extensions.


As I said, I need to make my *build* platform-independent.


Giving this further thought, I'm wondering how hard it would be to roll 
your own using modulefinder, Python's zip tools, and some custom code. 
Just sayin'.


--Kevin


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Kevin Walzer

On 12/15/13, 5:06 PM, Chris Angelico wrote:


Yeah, but there's a difference between passing your GUI incantations
on to a library function (written in C but now just part of a binary
library) and feeding them to a completely different language
interpreter. When I write something with PyGTK, I can't, even in
theory, give it arbitrary C code to execute. From what I understand
here, that *is* true of Tcl, which means that the Python download
contains a Python interpreter and a Tcl interpreter. I'm not saying
that's a bad thing to do, but it is calculated to provoke remark.


Yes, a Tkinter app has both a Python interpreter and an underlying Tcl 
interpreter. Let's be clear about that.


The technical reason for this is that, during Python's early 
development, Tk was the simplest, most powerful and OSS-friendly GUI 
toolkit out there (compared to, let's say, Motif). Its reliance on Tcl 
was a plus because Tcl's C API is exceptionally clean and easy to 
embed/call from other C libraries (that was Tcl's original main focus, 
embedding in C).


Embedding the Tcl interpreter remains a sound decision today. It makes 
it trivial to keep Tkinter updated in sync with Tk updates, since the 
Tcl interpreter does most of the heavy lifting. The recent effort to 
wrap Tk's new themed widgets is a good one: nearly all of the work was 
done at the Python level. Compare this approach to Perl's original one, 
which stripped out Tcl and implemented Tk integration entirely in C. Any 
updates require heavy lifting in C and, in fact, Perl/Tk has not kept up 
with Tk's main line of development (it does not run natively on the Mac, 
for instance).


Calling through Tkinter to Tcl also provides some other conveniences. If 
you're writing a Tkinter app and want to access some platform-specific 
functionality that requires C calls, that may require a library 
extension written against Tcl/Tk's C API (i.e. the Mac's NSServices 
API--that can't be accessed using ctypes because it hooks into the 
window server). Fortunately, Tk is very easy to extend in C--much 
simpler than extending wxWidgets or Qt.


Finally, Tcl is itself a fully-featured, general programming language 
that is a peer to Python both generationally and in terms of its 
capabilities; the main way it lags is in the size of its development 
community. In other words, you are not handing the ball off to a 
90-pound weakling if you need to call into Tcl from Python via Tkinter. ;-)


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-16 Thread Kevin Walzer

On 12/16/13, 10:20 AM, Chris Angelico wrote:

Having made a tweak to gitk at one point, I have to say Tcl is
definitely inferior to Python.


Without starting a flame war, can you elaborate? I'm curious about your 
perspective.


(I studied PSL--Python as a Second Language--so develop in it with a 
slight accent. I'm a native Tcl developer, for better or worse.)


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: the Gravity of Python 2

2014-01-08 Thread Kevin Walzer

On 1/8/14, 9:30 AM, Mark Lawrence wrote:

But to be serious why not stick with 2.x if there's no compelling reason
to move?  Whatever happened to "if it ain't broke, don't fix it"?  And
before anyone says anything please don't start on about the bytes versus
string debate, I'm fairly certain that there are a substantial number of
application areas that don't run into these problems.


+1 to this.

I haven't updated my Python apps to 3.x because there's nothing in 3.x 
that offers benefits to my users.


I deal with constant API churn as a Mac developer. I have no interest in 
adding to this complexity and headaches by switching from 2.x to 3.x.


I imagine I'll update someday, but not anytime soon.

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GitHub's “pull request” is proprietary lock-in

2016-01-03 Thread Kevin Walzer

On 1/2/16 11:43 PM, Ben Finney wrote:

That and other vendor-locked workflow aspects of GitHub makes it a poor
choice for communities that want to retain the option of control over
their processes and data.


The Tcl community has moved to Fossil with great success:

http://www.fossil-scm.org

Lightweight DCVS, integrated bug tracking, rock-solid code (authored by 
D. Richard Hipp, uses SQLite as its store).


The transition was non-trivial: the Tcl core developers had to move over 
a decade of commit history from CVS at Sourceforge to Fossil, which they 
did, successfully. One of the reasons Fossil was chosen is exactly this: 
to maintain the code independent of a third-party platform. (At the time 
of the transition, in 2011, Sourceforge was removing support for CVS, 
they had a server outage for over a week, and other issues were giving 
the community pause on continuing to use SF for hosting.)


I'm not a hardcore Git user so have no substantive opinions on the 
merits of Git or Github per se: I have a Github account and have 
contributed code via pull requests to projects hosted on it. But I found 
learning Fossil very simple. And using Fossil does not preclude 
mirroring the codebase in Git; there is a Tcl/Tk mirror at Github.


Just a thought.

--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: OS X Menubar in Tkinter

2014-10-23 Thread Kevin Walzer

On 10/21/14, 1:58 AM, Mark Lawrence wrote:

I'm pleased to see that you have an answer.  In return would you please
access this list via
https://mail.python.org/mailman/listinfo/python-list or read and action
this https://wiki.python.org/moin/GoogleGroupsPython to prevent us
seeing double line spacing and single line paragraphs, thanks.


And admonitions of this type should be taken to 
comp.misc.propernntpformatting or 
groups.google.com/propergroupsformatting. They are OT for a list devoted 
to the Python programming language. I'd rather see flame wars over 
indenting vs. curly braces than this kind of constant policing of folks 
who come to us via Google: they greatly increase the noise I have to 
filter out.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI toolkit(s) status

2014-11-21 Thread Kevin Walzer

On 11/20/14, 4:04 AM, Christian Gollwitzer wrote:

Apple is a
moving target, they pulled the rug from under Tk's feet twice over the
past 10 years. Nobody knows if Tk will continue to exist on the mac if
Cocoa is withdrawn some day and replaced by a new and completely
different windowing framework.


There is indeed a lack of manpower and expertise for Tk/Mac:  I'm pretty 
much it, except when someone submits a patch to scratch a specific itch.


Apple has introduced Swift as a new systems language, but (as I 
understand it) the intent is to supersede Objective-C as a language, not 
the Cocoa frameworks per se. So I think the risk of a brand-new 
windowing system replacing Cocoa (and thus requiring yet another new 
implementation of Tk) is pretty small. There may be a larger risk with 
newer API's being expressed mainly in Swift, which would require 
conversion to Objective-C for legacy codebases, but that is a smaller 
hurdle to clear.


--Kevin
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI toolkit(s) status

2014-11-21 Thread Kevin Walzer

On 11/20/14, 11:34 PM, Terry Reedy wrote:

A possible solution for Tk is to replace the non-C Tcl parts of TK with
Python (or the CPython API functions as needed for speed).  I have no
idea how horrendous a project creating Py/Tk would be.


It would be very horrendous. See Perl/Tk as the example. They ripped out 
the Tcl interpreter and interfaced directly with Tk's C API. The result 
was a rigid, inflexible binding that was never ported to the Mac 
(because it required a C implementation) and could never be easily 
updated to take advantage of new features in Tk, because again it 
required a C implementation. Perl-Tk still exists, but more modern 
bindings like ActiveState's Tkx module have restored the Tcl 
interpreter, giving you access to all Tk advances and platforms "for free."


Apart from the ease of updating Tk features, from a design standpoint I 
think this is the right call. There may be a little extra overhead in 
having an extra interpreter embedded, but that is what Tcl was 
originally designed for: embedding. It handles this requirement more 
easily and with less pain than most languages. I think that's why Tk 
became the default GUI binding of choice for other scripting languages.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: GUI toolkit(s) status

2014-11-22 Thread Kevin Walzer

On 11/22/14, 3:59 AM, wxjmfa...@gmail.com wrote:

TeXLive (since 2014, if I'm not wrong) has a GUI installer
and package manager, I recognized a "tcl/tk/tkinter-like" - Perl
tool and contrary to Python it works.


That's Perl-Tk, which, as I said, is still around, but only runs on 
Windows and X11/Linux--no native Mac Port. And it hasn't been updated in 
years, it does not take advantage of recent advances in Tk.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: OT: This Swift thing

2014-06-03 Thread Kevin Walzer

On 6/3/14, 4:43 PM, Sturla Molden wrote:

Are Python apps still banned from AppStore, even if we bundle an
interpreter?


Python apps are not banned from the App Store. See 
https://itunes.apple.com/us/app/quickwho/id419483981?mt=12.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Simple Python script as SMTP server for outgoing e-mails?

2013-08-03 Thread Kevin Walzer

On 8/1/13 10:15 AM, Gilles wrote:

I already have a static IP, so the issue is more that remote MTAs
might not accept connections from MTAs running on users' PC instead of
ISP's.


For what it's worth, that hasn't been my experience.

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python GUI?

2013-09-13 Thread Kevin Walzer

On 9/11/13 4:55 PM, eamonn...@gmail.com wrote:

Tkinter -- Simple to use, but limited


With the themed widget introduced in Tk 8.5, Tkinter is now a peer to 
the other GUI toolkits in most respects, surpasses them in some (canvas 
widget), and lags behind in just two areas: printing (several 
platform-specific solutions but no cross-platform API) and HTML display 
(a few extensions but no standard widget set).


I've stayed with Tkinter because it fits my brain the best. Old 
complaints about it being ugly or limited no longer hold water.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-17 Thread Kevin Walzer

On 10/16/13 11:13 PM, Owen Jacobson wrote:

3. How can we reach out to the Ruby community and help *them* get past
the current crop of gender issues, and help them as a group to do better
next time?


The Ruby community seems to be a singular example of "brogrammer" 
culture: mostly young men, lots of drinking, lots of sex humor, extreme 
work intensity, arrogant intelligence, and a tendency to view women as 
people to get laid with, and a distinct lack of experience with working 
with women as equals or superiors. It's frat life transplanted to 
startup culture. I have no idea why this seems so endemic in the Ruby 
community; it probably has something to do with the huge popularity of 
Rails  and the resurgence of tech startups over the past several years: 
both have created a "gold rush" environment that has attracted huge 
numbers of young programmers with technical chops but who are shockingly 
undeveloped in other ways.  It's immature men meeting an immature 
business environment (i.e., a startup) without procedures in place to 
set an appropriate tone. Such behavior in most other fields would get 
them fired so fast it would make their heads spin, if not getting them 
drummed out of the field altogether.


I suspect that Python doesn't have these problems because it's an older, 
more established language, and the community is comprised of older and 
more mature individuals who have outgrown such shenanigans, or never 
embraced them in the first place. Python has grown steadily but never 
had the boom that Ruby on Rails had. I'm sure the Python community has 
its issues with institutionalized sexism, not least because computer 
fields in general have so few women, but I have seen no evidence of the 
overt, sexist hostility that pervades "brogrammer" culture.


As to what the Python community can do, I'm not sure what, apart from 
calling out the idiot "brogrammers" who perpetuate such hostility to 
women, and refusing to associate with it. The real opportunity to 
address this lies with the startup founders and executives who tolerate 
this kind of behavior, and don't send its perpetuators packing. Losing a 
job because you're a sexist jerk might get you thinking about the 
importance of treating all people with respect. If you're a startup 
founder who tolerates such behavior because you're afraid of losing your 
developers to other companies, then you're a coward; and if you simply 
don't see a problem with such behavior or deny that it exists, then you 
are worse than a coward, and you are worse than a jerk.


Let me reiterate: the overt sexism and hostility toward women that 
emanates from "brogrammer" culture is shocking to anyone who works in a 
more established field with a better balance between men and women. I've 
worked in marketing, editing, technical writing, and development, and at 
no place I have ever worked would such behavior be greeted with anything 
but immediate termination. Even the software startup I worked at did not 
have such issues; while the developers were all men, the company was 
founded by a husband-and-wife team, and the women who worked there (in 
technical writing and sales support) were treated with respect, because 
the founder would not tolerate anything else.


It would be great to see more leaders at big tech companies speak out 
against such garbage. What impact would it have if Larry Page, Mark 
Zuckerberg, Marissa Meyer, and others say, "If you do that crap here, 
you won't be here"? Or what if venture capitalists said, "We won't fund 
you if you don't provide an equitable work environment that puts jerks 
out on their rear end." Nothing short of some hard, painful experience 
is likely to have a large-scale change on the sexist culture that 
pervades so much of tech.


A bit off-topic perhaps, for which I apologize, but I've been following 
the whole "sexism in tech" subject with increasing disgust and dismay, 
and I wanted to strongly protest against it.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Sexism in the Ruby community: how does the Python community manage it?

2013-10-17 Thread Kevin Walzer

On 10/17/13 6:11 PM, Chris Angelico wrote:

On Fri, Oct 18, 2013 at 8:50 AM, Kevin Walzer  wrote:

I've worked in marketing, editing, technical writing, and development, and
at no place I have ever worked would such behavior be greeted with anything
but immediate termination.


That's all very well, but what if these gems were created, not by
someone at work (where termination is possible), but by a single guy
at home (and I mean "single" in two senses here)? He's not going to
lose his job over it - at least, I *hope* he wouldn't get fired for
what he did on his own time - so where's the incentive going to come
from?

ChrisA



Well, putting the package name on an official List of Asshattery is a 
good start.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Screenshots in Mac OS X

2013-10-22 Thread Kevin Walzer

On 10/22/13 4:15 PM, Pratik Mehta wrote:

Anyone there to help me out???



import os
os.system('screencapture', 'foo.png')


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Screenshots in Mac OS X

2013-10-22 Thread Kevin Walzer

On 10/22/13 6:08 PM, Kevin Walzer wrote:

On 10/22/13 4:15 PM, Pratik Mehta wrote:

Anyone there to help me out???



import os
os.system('screencapture', 'foo.png')



...and see 'man screencapture' for options.

I leave setting up a Tkinter GUI with proper key bindings as an exercise 
for the reader.


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Screenshots in Mac OS X

2013-10-22 Thread Kevin Walzer

On 10/22/13 8:19 PM, Pratik Mehta wrote:

Hey Kevin,

Thanks for reverting.

I know about the "screencapture" function and the parameters available.

But, how would I take the user input, as in, that is just command-line, as soon 
as I execute the program, it will take whatever kind of parameter is passed 
under screencapture.

I want that, in the same program, if the user presses Shift+Command+3, whole 
screenshot should be taken.

When, Shift + Command + 4 is pressed, a particular frame should be displayed to 
select the area / region.

Also, I want to create my own command : Shift + Command + 5 ==> this is 
specially for web browser, whenever I press this key on any of the web-page, the 
whole web page should be grabbed along with its snapshot, and snapshot's filename 
should be web-page's url which I am currently on.

Also, this process should be executing at the backend, so that, whenever these 
keys are pressed, it overrides the system's functionality and uses mine.



There are no simple answers to these questions.

With Tkinter, it's possible to code a basic UI and bind combinations of 
specific keys to trigger specific callbacks, which can fire specific 
sequences of arguments to the screencapture CLI tool. That's the quick 
and dirty way. I'm not going to write this code for you. Look at 
TkDocs.com and effbot's site for an introduction to Tkinter.


If you are not looking for a GUI app to do this, but some sort of 
system-level daemon, that requires a lower level of coding. You'll need 
to look at such system frameworks as CoreGraphics and Cocoa to find the 
API's you need. PyObjC (Python binding to Cocoa) can probably be helpful 
here. Frankly, I'm not sure Python is the best tool here, but if you go 
this route, you want a Python API that hews as closely to the 
system-level calls as possible, and PyObjC will likely be your best path 
here.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Will Python 3.x ever become the actual standard?

2013-10-23 Thread Kevin Walzer

On 10/23/13 7:57 AM, duf...@gmail.com wrote:

Years have passed, and a LARGE number of Python programmers has not even 
bothered learning version 3.x.


That's true for me. My own projects run just fine with 2.7.

I have no specific issue with 3.x, nor phobia of it, but my time as a 
developer is limited, and I'd rather use it to add features to my apps 
using the stable base of 2.7 rather than go through the headaches of 
modifying my codebase to accommodate the differences with 3.x.


This is something that's On My List to Do Someday, but right now there's 
no real upside to it for my apps. As long as 2.7 is supported, I'll 
probably continue to use it.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: beginners choice: wx or tk?

2015-07-11 Thread Kevin Walzer

On 7/11/15 10:48 AM, Laura Creighton wrote:

Unless I was misinformed 2 weeks or so ago when I asked, that is the
problem.  Tcl/Tk 8.6 works (and is shipped with) OSX, but tkinter
and idle don't work with it.  We will see what Ned Deily says
when he gets around to reading this.


You were misinformed. Tkinter has worked fine with Tk 8.6 for a long 
time. The issues with Tk on the Mac, owing to Apple's force migration of 
GUI libraries to Cocoa, have finally been more or less resolved, and Tk 
8.6.4 is now quite stable on OS X.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Which GUI?

2015-07-25 Thread Kevin Walzer

On 7/24/15 4:11 PM, Cecil Westerhof wrote:

Top-posting is (rightly) frowned upon in this group. Could you use
inline posting next time?


Meta is definitely NOT discouraged on this list, but it should be. 
Nothing like derailing an interesting thread with lectures on where to 
post. And someone will chime in with a diatribe against Google 
groups...wait for it...wait for it...


To address the OP's query, I recommend Tkinter. Plays very nicely with C 
and C++.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: pyinstaller and Python 3.5 on Windows?

2015-11-19 Thread Kevin Walzer

On 11/18/15 5:46 PM, Ulli Horlacher wrote:


ImportError: DLL load failed: The specified module could not be found.


Is there a solution available?



I understand that Python 3.5 has shipped how the MS dll's from Visual 
Studio are shipped, and perhaps the freezing tools (pyinstaller, py2exe) 
haven't yet caught up. Consider filing a bug with the pyinstaller 
developers.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Event handling for COM object with win32com (pywin32)

2014-06-22 Thread Kevin Walzer

On 6/22/14, 5:15 AM, peter.balazo...@emspin.com wrote:

Do I miss something in code or incorrectly handling the events or COM Object?


There is a pywin32 mailing list that may be able to offer more help here.

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-06-25 Thread Kevin Walzer

On 6/25/14, 1:49 AM, wxjmfa...@gmail.com wrote:

I can also add, tcl or tk or tkinter (8.6) is on Windows
quite buggy. In fact, simply*unusable*.


How so?

Please report bugs at http://core.tcl.tk/tcl/reportlist or 
http://core.tcl.tk/tk/reportlist, as needed.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3 is killing Python

2014-07-15 Thread Kevin Walzer

On 7/15/14, 9:00 AM, Chris Angelico wrote:

The problem isn't Python 2, nor Python 3, nor even the fact that there
are two Pythons. The problem is that a lot of people don't understand
when to choose one or the other, don't understand what the promises of
support are, and (perhaps worst of all) keep hearing FUD about how
Python 3 is killing Python. And so the confusion perpetuates.
Eventually the world will get past that, but in the meantime, we have
to deal with these sorts of storms-in-teacups from people who simply
cannot comprehend what's going on.


I think it's more than a tempest in a teacup.

The number of language revisions that result in deliberate, code-level 
incompatibility out there is pretty small. People rightly expect that 
code written for version 2.x of a language will continue to work with 
version 3.x, even if 3.x is designed to go in another direction.


I can only think of two widely used languages in the last decade where 
there was this type of major break in binary compatibility: Perl and 
Visual Basic. Perl 6 is kind of a moot point because it's never shipped 
(insert reference to Duke Nukem or GNU HURD here, as appropriate), and 
Perl 5 has not just seen continued development, but invigorated 
development in recent years. But the example of VB is instructive. 
VB.NET is similar, but not identical, to classic VB, and as far as I am 
aware its uptake has not been nearly as wide as classic VB. Microsoft 
was able to force what limited migration we've seen mainly because VB is 
not open source and they can simply drop support for it from Windows.


I've stayed with Python 2.7 because I've seen no benefit in 3.x that 
outweighs the hassle of going through my code line by line to make it 
compatible. As a Mac developer I deal with this kind of code/API churn 
with each release of Mac OS X, and I have no desire to increase my 
headaches.


Though I expect I will eventually update to 3.x, however, like many 
other developers I am also annoyed by the decision to break backwards 
compatibility in Python. The decision strikes me as arrogant. Cruft and 
backwards compatibility are an inevitable part of any mature programming 
language, and maintaining compatibility is important--more important 
than bolting on shiny new features, in my view. If shiny new features 
must be added, they should be added side-by-side with older API's.


I think the Python developers have undervalued the conservator part of 
their role. Yes, they have provided tools to help application and 
library developers migrate their code, but it should not be incumbent on 
third-party developers to re-architect stable, working code simply 
because the language has broken binary compatibility. Defenders of the 
3.x migration portray such developers as laggards, but I see Python 
3.x's failure to silently and successfully import 2.x code as a failure 
on the language's end.


I won't go so far as to say that Python 3 is killing Python. Python will 
survive. But the headaches of migration are substantial, and should not 
be necessary.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3 is killing Python

2014-07-15 Thread Kevin Walzer
"Top posting" is the practice of responding to an e-mail thread by 
putting your response at the top of the text you are quoting. It's 
standard practice in the corporate world...


On 7/15/14, 6:13 PM, Abhiram R wrote:

a) What is "top post"?Â


...but  Unix/newsgroup ettiquette says that it's gauche to do this, 
because it presents an unacceptable cognitive burden to the user trying 
to catch the context of the thread by forcing them to read your reply 
first, before they read the preceding quoted comments.


--Kevin
--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Python 3 is killing Python

2014-07-15 Thread Kevin Walzer

On 7/15/14, 6:38 PM, Mark Lawrence wrote:

   I did see your correction but it gave me an opportunity to mention
google groups, something that just can't be missed


If the newgroup had a filter to trim out complaints about Google groups, 
half the traffic would be gone. :-)


--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


Re: Mac python py2app problem

2014-07-15 Thread Kevin Walzer

On 7/15/14, 9:56 PM, Nicholas Cannon wrote:

Hey i have made an app and i have made a .msi for windows with py2exe and i 
have also exported it with py2app on mac. No problems here they all work fine. 
I then put the .msi on sourceforge and it works great but when i put the .app 
on there and download it it says something like i can open this on old 
architecture or something so i have to put it through google drive and i dont 
like this like i share the link and folder and people can download it there but 
it is dodgy. Could someone please help me out like if there is a .msi type 
thing for mac with py2exe?



It's hard to make sense of what you are asking for. Can you just zip up 
the app bundle that py2app produces and upload it that way? That works 
for many developers.


--Kevin

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com
--
https://mail.python.org/mailman/listinfo/python-list


  1   2   3   4   >