> IIRC a pyd file is really a DLL, but for a built-in its included into in this
> case python26.dll.
Mystery solved! Thanks Mark!
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Is the best pratice way to detect internet connectivity under
Windows (using Python 2.6) simply to attempt to access a known
internet website using urllib or urlib2 wrapped in a try/except
construct?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Ken,
Check out Zed Shaw's very cool Lamson project.
http://lamsonproject.org/
Malcolm
- Original message -
From: "Ken Seehart"
To: python-list@python.org
Date: Thu, 04 Mar 2010 21:33:26 -0800
Subject: IMAP mail filters tool
I'm thinking of possibly making a simple
We've decided to build a re-usable *general purpose* PY2EXE
"runtime" that can be shared by a number of scripts vs.
distributing a monolithic EXE for each of our scripts.
A list of the Python 2.6.4 compatible modules/packages we decided
to include (and exclude) in our "
We've decided to build a re-usable *general purpose* PY2EXE
"runtime" that can be shared by a number of scripts vs.
distributing a monolithic EXE for each of our scripts.
A list of the Python 2.6.4 compatible modules/packages we decided
to include (and exclude) in our "
Are there any downsides to UPX-ing my 32-bit Python 2.6.4
development environment EXE/PYD/DLL files?
The reason I'm asking is that I frequently use a custom PY2EXE
script that UPX's copies of these files on every build.
Yes, I could get fancy and try to cache UPXed files, but I think
Robin,
> do you of an alternate compilter it doesn't work (py2exe) on my windows 7 box
I can assure you that Py2exe does work on Windows 7 (my firm develops
commercial Python applications packaged using Py2exe running on Windows
7), but it does take a bit of fiddling and some patience.
Michael,
> Or you could use a real debugger, like pdb
> http://docs.python.org/library/pdb.html
Any reason you prefer PDB over WinPDB?
http://winpdb.org/
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Jonathan,
> I summarised a all the alternatives to py2exe I could find, here:
> http://spreadsheets.google.com/pub?key=tZ42hjaRunvkObFq0bKxVdg&output=html
Really great work - thanks for sharing this with all of us!!!
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
>> Any reason you prefer PDB over WinPDB?
>> http://winpdb.org/
> Yes. I don't have Windows except one one PC :P
WinPDB runs on non-Windows platforms :)
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
I have a few dozen simple Python CGI scripts.
Are there any advantages or disadvantages to rewriting these CGI
scripts as WSGI scripts?
Apologies if my terminology is not correct ... when I say WSGI
scripts I mean standalone scripts like the following simplified
(as an example) template:
import
Hidura,
> Hello list, i am in a project what need hosting, who give
hosting to python3?
Check out www.webfaction.com. I'm extremely pleased with this
vendor.
Highly recommended!
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Sebastian/John,
Thank you very much for your feedback.
John: I initially missed the nuance of WSGI scripts being function
calls. I suspect your tip has saved me a lot of pain :)
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Is there a way to open a file for shared write mode under
Windows?
I have 2 processes that will write to different regions of this
shared file.
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
olm
--
http://mail.python.org/mailman/listinfo/python-list
> scripts against the same py2exe backend.
Yes you can, but with our technique we only build and distribute our
py2exe backend *once*.
Our goal was to build a custom Python runtime that we could build and
deploy once and then augment with the many scripts we distribute and
update. By including
ring processing).
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Emile,
> target = 'spam and eggs '
> stripped = target.strip()
> replaced = target.replace(stripped,"%s" % stripped)
Brilliant! That's just the type of clever solution I was looking for.
Thank you!
Malcolm
- Original message -----
From: &q
etecting one of these 5 header types and then calling
codecs.open() with the appropriate encoding= parameter?
Note: I'm only interested in Unicode encodings. I am not
interested in any of the non-Unicode encodings supported
by the codecs module.
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
erate this table
through some form of module introspection.
Ideas?
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
il.python.org/mailman/listinfo/python-list
Type[ key ] )
aliases = ', '.join( aliases )
print '%-20s%s' % ( key, aliases )
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
message -
From: "Gabriel Genellina"
To: python-list@python.org
Date: Wed, 24 Mar 2010 14:39:20 -0300
Subject: Re: Programmatically discovering encoding types supported by
codecsmodule
En Wed, 24 Mar 2010 13:17:16 -0300, escribió:
> Is there a way to programmatically discover t
gt;> import locale
>>> locale.getdefaultlocale()[1]
'cp1252'
Any ideas?
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel,
Thank you for your analysis - very interesting. Enjoyed your fromlist
choice of names. I'm still in my honeymoon phase with Python so I only
know the first part :)
Regards,
Malcolm
- Original message -
From: "Gabriel Genellina"
To: python-list@python.org
Da
Pick an arbitrary point in time, and begin reading this mailing
list's archives. I guarantee you will learn alot.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
eturn output
test = 'cat, dog, big fish, goat and puppy and horse'
print to_list( test )
Outputs:
['cat', 'dog', 'big fish', 'goat', 'puppy', 'horse']
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
I had planned on subclassing Tkinter.Toplevel() using property()
to wrap access to properties like a window's title.
After much head scratching and a peek at the Tkinter.py source, I
realized that all Tkinter classes are old-style classes (even
under Python 2.7).
1. Is there a technical r
pass
Michele - your technique is *exactly* what I was searching for (and
works well so far!). Terry - your explanation why Tkinter still uses old
style classes (for compatibility with existing code) makes sense.
Thank you both.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
://mail.python.org/mailman/listinfo/python-list
Python 2.7 or higher: Looking for reasons/scenarios where one
should use the codecs vs. io module.
Are there use cases that favor one specific module over the other
module?
My understanding is that the io module is much faster than the
codecs module (and can be used interchangably), but the
> You may want to take a look at Dabo
> http://dabodev.com/
+1
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Eric,
Besides style support, what are the advantages of ttk.Frame vs.
Tkinter.Frame?
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
I have a routine in Python which is extracting information from a
website. This information is read and inserted into objects.
I currently have all the validations and checks implemented in the
routines which are reading the HTML and creating the objects. It is
however also possible to move all
Sridhar,
Do the Windows versions of ActivePython 2.7.1.3 have different versions
of Tcl/Tk, sqlite3(.dll), and/or openssl (_ssl.pyd?) than the python.org
builds of Python 2.7.1?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Sridhar,
> You can find the versions used in ActivePython here,
> http://docs.activestate.com/activepython/2.7/whatsincluded.html
Thank you - that page answered my questions.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
option for us since we're using Python 2.7.
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Mark,
Congratulations on your latest release!
How well do python extension modules created with ShedSkin work
with applications that expose a GUI, eg. Tkinter or wxPython
apps?
Can ShedSkin code be run in a thread and communicate with the
main interpreter thread through a Queue or Lock? (Or
Is text processing with dicts a good use case for Python
cross-compilers like Cython/Pyrex or ShedSkin? (I've read the
cross compiler claims about massive increases in pure numeric
performance).
I have 3 use cases I'm considering for Python-to-C++
cross-compilers for generating 32-
> I now remember this idiom as the "break else" construct: either the loop
> breaks, or the "else:" suite is executed.
A perfect description.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Rolf,
> I'm writing a very small TCP server (written in Python) and now I want to
> host it on some ISP so that it can be accessed anywhere from the Internet.
> I've never done that before so I thought I should ask for some advice. Do you
> guys know any good ISP that ca
Randy,
Tkinter is a viable GUI platform with Python 3.1's (and Python
2.7's) support for ttk (Tile). The new ttk module supports theme
aware controls so that you can build beautiful GUI's that match
your underlying platform's standards. Ttk also includes theme
aware treeview a
sole works)
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
).start()
Thank you for your help - really appreciated!
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Tk
app is ugly, that's a reflection on the developer, not the toolkit***
+1 (emphasis added)
Other tk/ttk benefits:
- Very stable
- Cross platform (w/native look and feel via Python 2.7/3.1 ttk)
- Light weight
- Easy to distribute
- Extensible
Regarding lack of print support: All GUI fr
en reader products ... to make their Tkinter
applications accessible to low vision/blind users.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Rick,
> However, now Tkinter just looks old and dumpy.
Have you taken a look at the ttk module (based on tile) that ships with
Python 2.7/3.1? This adds native/theme-aware widgets to Tkinter. And it
adds additional widgets such as a treeview (which can also be used as a
grid), noteb
e can take advantage of so calls to
open() would work?
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Azakai/Gerry,
> Errors when using Firefox 3.6.3:
I'm running Firefox 3.6.1.3 and the interpreter is running fine.
I'm on Windows 7 Pro 64-bit.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Alex,
I think this type of documentation is incredibly useful!
Is there some type of key which explains symbols like !, *, f, etc?
Thanks for sharing this work with the community.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
/mail.python.org/mailman/listinfo/python-list
hat tools like dogtail and Accerciser can see them. Tka11y uses Papi,
the Python Accessibility Programming Interface, which in turn uses ATK,
the GNOME Accessibility Toolkit, to expose Tkinter widgets to AT-SPI,
the Assistive Technologies Service Provider Interface. This allows a
Tkinter application&
the presence of a sub-optimal gui kit that no one is required
> to use ...
+1 (very well said)
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
back to Tkinter. How's that for an odd
trend?! :)
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
h the community
to make Tkinter accessable under Windows.
That sounds a lot easier than trying to fight for wxWidgets as a Tkinter
replacement when so many good arguments have been made against this
strategy.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Wondering if there's a Python library or algorithm for
determining the order in which a group of calculations should be
performed when some calculations reference the result of other
equations. I don't need anything as fancy as a spreadsheet
engine, however I do need to detect recursive
Ian,
> A google search for "python topological sort" returns lots of results.
Perfect!! That's exactly what I was looking for but couldn't manage to
put a name to.
Cheers,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
ue and I'm looking for master references for
both sets of code.
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Jorge,
It's been a while since I felt the need to use a Python debugger, but I
could swear that most (all?) Python debuggers allow you to watch a
specific variable.
Check out the debuggers on the following page:
http://wiki.python.org/moin/PythonDebuggers
Malcolm
--
http://mail.pytho
interpretation, anyway.
I'm a big fan of your wxPython and GUI builder contributions!!
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Paul,
> How about skipping the whole xml thing? You can dynamically import any python
> module, even if it does not have a python filename.
Great example!
Can you do the same with a cStringIO based file that exists in memory
vs. on disk? Your example requires a physical file on disk.
Thank you Robert!
Regards,
Malcolm
- Original message -
From: "Robert Kern"
To: python-list@python.org
Date: Mon, 12 Apr 2010 17:20:54 -0500
Subject: Re: What license/copyright text to include and where to include
it when selling a commercial Python based application?
On 201
lcolm
--
http://mail.python.org/mailman/listinfo/python-list
I just stumbled across the following page which seems to indicate that
the MS VC 2008 runtime files[1] required to distribute Python
applications compiled with Py2exe and similar tools can be shipped
without the license restriction many previously thought.
See: Updated License Term Agreement for
e:
> I just stumbled across the following page which seems to indicate that
> the MS VC 2008 runtime files[1] required to distribute Python
> applications compiled with Py2exe and similar tools can be shipped
> without the license restriction many previously thought.
>
> See: Updated
free. Correct me if I'm wrong here?
--
http://mail.python.org/mailman/listinfo/python-list
rily malicious.
:)
Regards,
Malcolm
- Original message -
From: "Tim Roberts"
To: python-list@python.org
Date: Fri, 16 Apr 2010 00:31:35 -0700
Subject: Re: Updated License Term Agreement for VC Redistributable in VS
2008 SP1
Andrej Mitrovic wrote:
>
>I don't think this li
Lie,
> Does it makes sense to be able to install a library in other's computer, but
> not redistribute it? Hmm... I'll have to consult a lawyer.
See Tim Robert's response (I can't remember which Python mailing list)
The license agreement change fixes a problem that w
Hi Peter,
> Just a quick reminder: UTF-8 is not the same as unicode. Python3 works in
> unicode and by default uses UTF-8 to read from or write into files.
I'm not the OP, but wanted to make sure I was fully understanding your
point.
Are you saying all open() calls in Python tha
Hi Peter,
>> Are you saying all open() calls in Python that read text files,
>> automatically convert UTF-8 content to Unicode in the same manner as the
>> following might when using Python 2.6?
>>
>> codecs.open( fileName, mode='r', encoding='UTF8
Ryan,
Your withhacks module looks very interesting.
http://pypi.python.org/pypi/withhacks
What are your specific concerns about its use? Are there portability
concerns?
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Ryan,
> So if you don't care about portability or about that dirty feeling you get
> from messing with the Python internals, then have at it :-)
Warnings aside, its very clever code. Thanks for sharing!
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Is there a OS portable way to have a Python script detect when
its operating system is shutting down or a user is logging out?
If not, any Windows specific tips on how to detect these events?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Hi Tim,
> Doubt v. much if there's anything x-platform. I recently wrote-up
> the work done my Klaas Tjebbes (sp?) which I think will do what
> you want:
http://timgolden.me.uk/python/win32_how_do_i/track-session-events.html
Looks good - I'll study this code. Thanks fo
I have a bunch of 3rd party packages loaded in my site-packages
folder. Will these packages be affected if I upgrade my Python
(32-bit Windows) installation from 2.6.4 to 2.6.5?
Are there any gotchas I should watch out for when performing this
type of upgrade? Does it ever make sense (and is it
path
or re-inventing the wheel.
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
ng an 'append binary' mode, but I can
use NotePad to read the file while I'm using it:
fd = open( r'a-temp-file.dat', 'ab' )
My environment is Python 2.6.4 (32-bit) under Windows, but I'm
looking for a cross-platform solution if that's possible.
Terry,
> So here is my updated (3.1) proof-of-concept version.
Very clever! An excellent example of how to use the 'with' statement
with something besides the traditional file open example.
Not the original OP, but thank you anyway.
Malcolm
--
http://mail.python.org/mailman/li
Chris, Philip, Christian, John and others,
Thank you all for your replies.
Regards,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
In a recent thread ("Movable Python or ActivePython), Sridhar Ratnakumar
pointed out that the ActiveState Python releases can be downloaded as
ZIP files vs. MSI files. (Great idea - thank you ActiveState!)
> The .MSI installer does require installation, but there is also a .ZIP
> pa
st
>> file as well).
>>
>> Can anyone explain why the ActiveState release uses different MS Visual
>> C runtime files than the official Python Foundation's release of Python?
> It doesn't. We use the same MSVC version as the python.org builds.
>
&g
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
om: "Trent Mick"
To: pyt...@bdurham.com
Cc: python-list@python.org
Date: Thu, 06 May 2010 09:33:05 -0700
Subject: Re: ActiveState using different MS runtime files than official
Python release? (was Re: Movable Python or ActivePython)
On 10-05-05 5:30 PM, pyt...@bdurham.com wrote:
> Hi Tre
Balzer,
I took a look at the zip version of ActiveState's Python.
There's a related thread in on this mailing list where I asked if the
zip files are missing the Microsoft VC runtime files required by the
Python interpreter.
According to Trent from ActiveState, this is indeed th
Balzer,
> I just need test a few python scripts.
I recommend you look at Movable Python or Portable Python.
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Terry,
> ... word[0:1] does the same thing. All Python programmers should learn to
> use slicing to extract a char from a string that might be empty.
Is there an equivalent way to slice the last char from a string (similar
to an .endswith) that doesn't raise an exception when a stri
Superpollo,
> word[len(word)-1:]
Perfect! Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Jerry,
> If you use negative indexes in the slice, they refer to items from the end of
> the sequence instead of the front. So slicing the last character from the
> string would be:
>
> word[-1:]
Perfect! Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
Martin,
If we install over an existing version of Python 2.6.5, will our PTH
files and site-packages be preserved?
Or do we need to back out our 3rd party packages, install Python 2.6.5
and then manually restore our 3rd party packages?
Thank you,
Malcolm
--
http://mail.python.org/mailman
I would like to convert datetime.ctime() values to Unicode.
Using Python 2.6.4 running under Windows I can set my locale to
Spanish like below:
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'esp' )
Then I can pass %a, %A, %b, and %B to ctime() to
>>> codePage = locale.getpreferredencoding()
... in my original post's code (original post follows my signature).
Malcolm
- Original message -
From: pyt...@bdurham.com
To: python-list@python.org
Date: Mon, 17 May 2010 13:54:27 -0400
Subject: Converting datetime.ctime() values to Unicode
I would li
Windows version of Python 2.6.4: Is there any way to determine if
subprocess.Popen() fails when using shell=True?
Popen() successfully fails when shell=False
>>> import subprocess
>>> p = subprocess.Popen( 'Nonsense.application', shell=False )
Traceback (most recent c
For the archives - solution posted at
http://stackoverflow.com/questions/2861548/how-to-determine-subprocess-popen-failed-when-shelltrue
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
ote, hex encoded and unicode encoded chars?
I know I can do this explictly via a series of .replace()
methods, but certainly there must be a built-in way to do this on
a generic basis?
Thank you,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
lcolm
--
http://mail.python.org/mailman/listinfo/python-list
Hi Chris,
> That's not what the notion of raw strings in Python technically means, but
> anyway...
Agree - I was having a difficult time trying to describe my dilemma -
thanks for hanging in there with my rather awkward intro :)
> I'll assume you're quoting the file
Python 2.6: Is there a programming technique or 3rd party
formatting module that supports string.Template.safe_substitute()
type string substituion with % type formatting rules for width,
decimals, justification, etc?
Or do I need to use a 3rd party template engine to get the best
of both worlds
x27;s Translator Toolkit, LaunchPad,
Mygengo, etc. to find translations for common strings?
I've tried to google this topic without success.
Example: public domain po (translation|translations)
Thanks,
Malcolm
--
http://mail.python.org/mailman/listinfo/python-list
I'm evaluating Babel 0.9.5 [1] under Windows (Python 2.6) and
have the following questions that I haven't been able to solve
through reading the documentation or googling.
1. I would like to use an _ like abbreviation for ungettext. Is
there a concencus on whether one should use n_
We're using the Python based Babel gettext utilities. Is there
any technique we can use to make sure that translator comments
and old ("obsolete") translations (marked with #~) in PO files
are preserved across PO file updates?
Thanks,
Malcolm
--
http://mail.python.org/mailman/
401 - 500 of 5083 matches
Mail list logo