That's what I thought as well. Then I found https://bugs.python.org/issue19776
and it looks like this is a well known issue. Hopefully the patches are
working and will be accepted in the next release or so.
Given how often os.path.expanduser() is needed, I'm a little surprised that the
path
Ok, I'm guessing I'm doing something wrong, but I can't see what.
I'm playing around with pathlib (Python 3.4.2) on Mac OSX, Yosemite.
In the past I've used os.path.expanduser() to expand paths with ~. Based on
the description, I would have expected .resolve to do that automatically, but
it do
Hi Juan,
I don't know what platform you're on, but you've got several options.
Mac: setup a launchd job, I use http://www.soma-zone.com/LaunchControl/ to do
the setups
Linux/unix: setup a cron job, depending on your distro launchd may also be an
option.
Windows: setup a scheduled job in
I'm writing a little script that uses a REST API and I'm having a problem using
urllib in Python 3.
I had the basics working in Python 2.7, but for reasons I'm not clear on I
decided to update to Python 3. (I'm in the early phases, so this isn't
production by any stretch.)
Python version inf
I think the first question I would have is what kind of dynamic
content are you talking about? Is this a web app kind of thing, or
just a content pushing site?
While Django might not be v1.0 yet, it seems very solid and stable,
and perfect for quickly building powerful content based dynamic sites
On 16 May 2007 10:06:20 -0700, Victor Kryukov <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> The following behavior is completely unexpected. Is it a bug or a by-
> design feature?
>
> Regards,
> Victor.
>
> -
>
> from pickle import dumps
> from cPickle import dumps as cdumps
>
> prin
+1 for the pep
There are plenty of ways projects can enforce ASCII only if they are
worried about "contamination" and since Python supports file encoding
anyway, this seems like a fairly minor change.
pre-commit scripts can keep weird encoding out of existing projects
and everything else can be b
On 23 Apr 2007 17:19:15 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> So the question becomes: Why do Python dictionaries require keys
> to be of an immutable type?
Dictionary keys are hashed values. If you change the key, you change
the hash and lose the pointer to the referenced object.
Or:
Hi John,
I don't think eggs are a flop, however the pain they are trying to
solve is generally pretty minor in the Python world vs what we often
see with other languages. We're starting to see some push to move
more 3rd party libraries and frameworks to eggs (ie: Turbogears) and
as the developer
Hello all,
I've got an EDI parsing application written in Python that is becoming
unwieldy to maintain. At a high level here's what it does:
1. Loops through the EDI message 1 segment at a time (think SAX XML...)
2. Once it identifies what type of transaction is being processed it
creates a "s
You can also check out the pyExcelerator project.
http://sourceforge.net/projects/pyexcelerator
It seems to work reasonably well at direct Excel file manipulation.
However it isn't meant as a VBA replacement kind of thing.
Chris
On 11/9/06, at open-networks.net"@bag.python.org timmy <"timothy>
I tend to do a significant amount of EDI related work:-statistical analysis-X12->HTML formattingI've do a ton of customer DB reporting. I find it easier to use Python that Crystal reports for a lot of the stuff I do so I extract data and spit out CSV files for Excel to make it look pretty.
And I'm
On 28 Apr 2006 01:06:55 -0700, Julien Fiore <[EMAIL PROTECTED]> wrote:
I added "step A.5" to the guide and published it on the Python wiki, sothat anyone can update it easily:http://wiki.python.org/moin/PyrexOnWindows
--http://mail.python.org/mailman/listinfo/python-listThanks to Julien and everyon
Question background: I've been using Python as my primary language for several years now and have done all my non-trivial development in Python. I've now got a Mac and want to do some development using the Core * features in OS X in ObjC. I know I could use the PyObjC bindings, but ObjC seems to
On 23/01/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
Chris Cioffi wrote:> Q: If I have a file called "spreadsheet.xls" how can I launch it in what> ever program it is associated with? I don't care if that program is Excel> or OpenOffice Calc. I just want to
Q: If I have a file called "spreadsheet.xls" how can I launch it in what ever program it is associated with? I don't care if that program is Excel or OpenOffice Calc. I just want to launch the file.Since I want to just launch the new process, naturally I looked at
os.execl(). However, I can't
On 10 Nov 2005 07:19:30 -0800, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I've made the switch from tKinter to wxPython. I'm slowly trying to
> learn it, but I had a question - what is the appropriate object to
> subclass to create a "mega widget" ie A listbox with it's add/delete
> buttons a
As a point of style: the 'other' identifier should only be used in
Zen Metaclass programming as an implicit reference to the calling
object or as a list of references to all other instances of the class.
Context will make it both clear and obvious which use case is
desired.
On 03/11/05, bruno at
Hi Neal,
I don't believe that cpython currently does any of the optimizations you refer to below. That said, it is very reasonable to adopt "a style of coding that is highly readable, making the assumption that the compiler will do good things" when coding in Python. Python is one of the most h
On 10/08/05, Simon Brunning <[EMAIL PROTECTED]> wrote:
On 8/10/05, Chris Cioffi <[EMAIL PROTECTED]> wrote:
> I have lots of code that looks like:> keys = mydict.keys()> keys.sort()keys = sorted(mydict.keys())
While the sorted() built in addressed (yet another) comm
Lots and lots of people want ordered dicts it seems. Or at least, they want to be able to access their dictionary keys in order. It's in the FAQ (
http://www.python.org/doc/faq/programming.html#how-can-i-get-a-dictionary-to-display-its-keys-in-a-consistent-order) and has recently shown up as a re
One of my votes would be for something like:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303481 or
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303770.
We use something like these in the stdlib already (time_struct), but don't supply a ready solution for people to implement
Nope, numbers too. When you do:
a = 4
You are storing a reference to the literal 4 in a.
>>> a = 4>>> dir(a)['__abs__', '__add__', '__and__', '__class__', '__cmp__', '__coerce__', '__delattr__', '__div__', '__divmod__', '__doc__', '__float__', '__floordiv__', '__getattribute__', '__getne
wa
Check out http://docs.python.org/tut/node8.html#SECTION00840
Basically a package is a directory with one or more Python modules
along with the "special" module called __init__.py.
Chris
On 18/04/05, Mage <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I read about modules and pack
+1 on _that_ being a QOTW!
On 4/14/05, Simon Brunning <[EMAIL PROTECTED]> wrote:
[snip]
>
> Try and think of something else witty to say over the next day or two
> - I'm sure I can squeeze you into next week's. ;-)
--
"I was born not knowing and have had only a little time to change that
here
My first thought is what if the function you are using uses other
functions(maybe not exported by the module/package)? For example: if
some_func() makes a call to _some_weird_module_specific_func(), how
are you going to make sure you get the
_some_weird_module_specific_func function? This doesn'
Perhaps you're looking for the type() built in function and the types modules?
>>> type('aaa')
>>> type([])
>>> import types
>>> if type([]) is types.ListType:
... print 'is a list'
...
is a list
Chris
On Wed, 16 Feb 2005 07:10:56 -0800 (PST), alex
<[EMAIL PROTECTED]> wrote:
> Hi ther
I'd like to second this one...ZODB is *extremely* easy to use. I use
it in projects with anything from a couple dozen simple objects all
the way up to a moderately complex system with several hundred
thousand stored custom objects. (I would use it for very complex
systems as well, but I'm not wor
I've got 50 so if you want a GMail invite reply directly to me and
I'll send our an invite.
Chris Cioffi
--
"It is our responsibilities, not ourselves, that we should take
seriously." -- Peter Ustinov
--
http://mail.python.org/mailman/listinfo/python-list
At runtime there is nothing to say that the class hasn't been
subclassed again.
example:
class A(someclass):
def __init__(self):
super(self).__init__()
do_something()
class B(A):
"""No __init__"""
def blah(self):
pass
When you use class B, how does the super
I'd like to second this suggestion. While there are a few things you
need to be aware of when writing your code (mostly taken care of in
the latest release) it's a mostly trivial code change. (For me it was
replacing a few dictionaries with PersistentMap objects and changing
the base class of a f
31 matches
Mail list logo