I am pleased to announce version 2.7.0 of the Gtksourceview Python bindings.
Once the mirrors have sync correctly it will be available at:
http://ftp.gnome.org/pub/GNOME/sources/pygtksourceview/2.7/
The bindings are updated with the new Gtksourceview API
News in 2.7.0
=
o Add
On Mon, 17 Aug 2009 21:45:57 -0700, naveen wrote:
Is it possible to split up a class definition over multiple files?
Not exactly, but you can do variations of this:
In file A.py, create:
class Parent:
def method(self):
return Method
In file B.py, do this:
import A
class
inder wrote:
On Aug 17, 8:31 pm, John Posner jjpos...@optimum.net wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
http://codespeak.net/lxml/parsing.html#iterparse-and-iterwalk
Stefan
iterparse() is too big a hammer for
John Posner wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
iterparse() is too big a hammer for this purpose, IMO. How about this:
from xml.etree.ElementTree import ElementTree
tree = ElementTree(None, myfile.xml)
for elem in tree.findall('//book/title'):
Hi,
I know this is not the best way to do it. But I have to do it at least
to make it *hard* to decompile the python bytecode.
I want to distribute a software written in Python without the source.
So I compiled Python from source changing some opcode values (Taking
care of HAVE_ARGUMENT value)
Thanks everyone for the help. This script is just a one-shot thingie
on my work host, not as a web script or anything professional.
On Mon, 17 Aug 2009 17:05:28 -0700 (PDT), Jonathan Gardner
jgard...@jonathangardner.net wrote:
Unfortunately, there isn't any string to date parsers in the built-
Is it possible to split up a class definition over multiple files?
Not exactly, but you can do variations of this:
... [subclass a class]
Steven
Thanks Steven.
I guess I will just preprocess the script:
class.sh
cat partA.py class.py
cat partB class.py
python class.py
/class.sh
--
Gilles Ganault nos...@nospam.com writes:
Thanks everyone for the help. This script is just a one-shot thingie
on my work host, not as a web script or anything professional.
On Mon, 17 Aug 2009 17:05:28 -0700 (PDT), Jonathan Gardner
jgard...@jonathangardner.net wrote:
naveen naveen.g...@gmail.com writes:
I guess I will just preprocess the script:
class.sh
cat partA.py class.py
cat partB class.py
python class.py
/class.sh
This, to me, is a programming smell; not necessarily bad, but an
indicator of bad practice. What is the problem you're trying to
Sreejith K schrieb:
Hi,
I know this is not the best way to do it. But I have to do it at least
to make it *hard* to decompile the python bytecode.
I want to distribute a software written in Python without the source.
So I compiled Python from source changing some opcode values (Taking
care of
On Aug 18, 12:19 pm, Diez B. Roggisch de...@nospam.web.de wrote:
Did you try installing the egg *without* pyc-files in there? Because
naturally those shouldn't work. They shouldn't crash the interpreter
either, but then again - you *did* modify it.
Hi Diez, thanks for the immediate reply :)
On Tue, 18 Aug 2009 17:10:50 +1000, Ben Finney
ben+pyt...@benfinney.id.au wrote:
Luckily, you have access to the documentation to find out.
I never used groups before. Thanks for showing me.
At this point, the script is almost done, but the regex fails if the
month contains accented characters
Am 2009-08-17 21:10, schrieb kj:
I'm looking for a good Python package for visualizing
scientific/statistical data. (FWIW, the OS I'm interested in is
Mac OS X).
The users of this package will be experimental biologists with
little programming experience (but currently learning Python).
Could you let me know which platform this is on (Windows, *nix)? It may be a
locale encoding issue -- the locale.setlocale() function allows the second
argument to be a tuple of (locale_code, encoding), as below:
locale.setlocale(locale.LC_ALL, ('FR', 'UTF-8'))
Since this is for a one-shot
This is a repost from two weeks ago. It didn't get much feedback last
time. I still keep trying, reposting to python-list also this time.
In this thread, I'd like to collect things that ought to be done
but where Dirkjan has indicated that he would prefer if somebody else
did it.
Item 1
--
On Tue, 18 Aug 2009 01:11:20 -0700, Rami Chowdhury
rami.chowdh...@gmail.com wrote:
Could you let me know which platform this is on (Windows, *nix)? It may be a
locale encoding issue -- the locale.setlocale() function allows the second
argument to be a tuple of (locale_code, encoding), as below:
On Tue, Aug 18, 2009 at 10:12, Martin v. Löwismar...@v.loewis.de wrote:
In this thread, I'd like to collect things that ought to be done
but where Dirkjan has indicated that he would prefer if somebody else
did it.
I think the most important item here is currently the win32text stuff.
Mark
Hi,
I have to call a perl method which takes a hash as its argument from a python
module. Is there a way to convert python dictionary to perl hash ( not hash
ref)?
Thanks,
Srini
See the Web#39;s breaking stories, chosen by people like you. Check out
Yahoo! Buzz.
Hello Everyone,
I would like to know if it is possible to extract a sub-list from a
list ?
typically if :
L =[[1, 2, 3],[4, 5, 6],[3] ]
How to extract easily the elements 0 and 2 of L in order to get :
L2 =[[1, 2, 3],[3] ]
Moreover, I would like to know if it is possible to use logical
On 2009-08-17, Sjoerd Mullender sjo...@acm.org wrote:
Also in The Netherlands, ZIP codes are much more fine-grained than in
some other countries: ZIP code plus house number together are sufficient
to uniquely identify an address. I.e. you don't need the street name.
E.g., my work address has
هاني الموصلي schrieb:
Please could you lead me to a way or a good IDE that makes developing
huge projects in python more easier than what i found.Now i am using
eclips. Actually it is very hard to remember all my classes methods
and attributes or copy and paste them each time.
Thanks very much
http://www.stephenwolfram.com/publications/recent/mathml/index.html
i was trying to find the publication date and context, but didn't find
it last time after a couple min. Yesterday, on rereading, i did. The
article in question is:
«
Mathematical Notation: Past and Future (2000)
Stephen
On Mon, Aug 17, 2009 at 3:47 AM, srinivasan
srinivassri_anna...@yahoo.co.in wrote:
Hi,
I have to call a perl method which takes a hash as its argument from a python
module. Is there a way to convert python dictionary to perl hash ( not hash
ref)?
How are you calling the Perl method from
On 18 Aug, 05:19, ru...@yahoo.com wrote:
Yes, I agree. I should have mentioned this as an exception
in my wikis suck diatribe. Although it far better than
most wiki's I've seen, it is still pretty easy to find signs
of typical wiki-ness. On the Documentation page my first
click was on
Python doesn't like the above:
#locale.Error: unsupported locale setting
locale.setlocale(locale.LC_ALL, ('FR', 'UTF-8'))
Maybe it was introduced in more recent versions of Python?
Hmm, that's odd. According to the docs
(http://docs.python.org/library/locale.html#locale.setlocale) it's been
On Aug 18, 11:24 am, Stefan Behnel stefan...@behnel.de wrote:
inder wrote:
On Aug 17, 8:31 pm, John Posner jjpos...@optimum.net wrote:
Use the iterparse() function of the xml.etree.ElementTree package.
http://effbot.org/zone/element-iterparse.htm
Sreejith K wrote:
On Aug 18, 12:19 pm, Diez B. Roggisch de...@nospam.web.de wrote:
Did you try installing the egg *without* pyc-files in there? Because
naturally those shouldn't work. They shouldn't crash the interpreter
either, but then again - you *did* modify it.
Hi Diez, thanks for
On Tue, 18 Aug 2009 10:52:41 +0200, Gilles Ganault nos...@nospam.com
wrote:
I find it odd that the regex library can't handle European characters
:-/
Ha, found it! :-)
http://www.regular-expressions.info/python.html
=
# -*- coding: latin-1 -*-
import locale
import re
ru...@yahoo.com writes:
I took a look at the PHP docs last night which seem pretty well
done. The User Comments looked rather as I expected, there was
useful info but most did not contain documentation quality writing.
So if they are used as a source for improving the docs, there
clearly
inder wrote:
Is lxml part of standard python package ? I am having python 2.5 .
No, that's why I suggested ElementTree first.
I might not be able to use any additional package other than the
standard python . Could you please suggest something part of standard
python package ?
No, there
On Monday 17 August 2009 23:06:04 Carl Banks wrote:
On Aug 17, 10:03 am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
I'm no English native, but I already heard women/men referring to a
group as guys, no matter that group gender configuration. It's even
used for group composed
Gilles Ganault nos...@nospam.com writes:
dateinscription = 11 Août 2008
For any text string that's not ASCII, you should specify it as Unicode.
(Actually, you should specify text as Unicode anyway.) For a literal
text string:
dateinscription = u11 Août 2008
If you're using exclusively
On Tuesday 18 August 2009 06:45:39 Aahz wrote:
In article pan.2009.08.18.04.34...@remove.this.cybersource.com.au,
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
The comments were made a week ago -- why the sudden flurry of attention?
Mainly an opportunity to flog the new
I'm scripting a superkaramba theme using python and have intgrated output
from amarok. I have also would like to show the artist and song title from
a radio stream i've added to my playlist.
If I open a python console and add the following:
import urllib2
from urllib2 import urlopen
nowplaying
I'm scripting a superkaramba theme using python and have intgrated output
from amarok. I have also would like to show the artist and song title from
a radio stream i've added to my playlist.
If I open a python console and add the following:
import urllib2
from urllib2 import urlopen
nowplaying
On Mon, Aug 17, 2009 at 11:10:25AM -0700, seldan24 wrote:
I didn't even notice the higher level methods. I changed the
retrieval line to:
ftp.nlst(testfile*.txt)
This works great. The result is even captured in an array. I really
have no idea what the difference between a LIST and
On Tue, 18 Aug 2009 20:03:47 +1000, Ben Finney
ben+pyt...@benfinney.id.au wrote:
The principles of handling text in Python: Get it to internal Unicode
objects as soon as possible, handle it as Unicode for as long as
possible, and only encode it to some byte stream for output as late as
possible.
On Tue, 2009-08-18 at 08:46 +0200, Diez B. Roggisch wrote:
هاني الموصلي schrieb:
Please could you lead me to a way or a good IDE that makes developing
huge projects in python more easier than what i found.Now i am using
eclips. Actually it is very hard to remember all my classes methods
Gilles Ganault nos...@nospam.com writes:
On Tue, 18 Aug 2009 20:03:47 +1000, Ben Finney
ben+pyt...@benfinney.id.au wrote:
The principles of handling text in Python: Get it to internal Unicode
objects as soon as possible, handle it as Unicode for as long as
possible, and only encode it to
Hendrik van Rooyen hend...@microcorp.co.za writes:
On Tuesday 18 August 2009 06:45:39 Aahz wrote:
Mainly an opportunity to flog the new diversity list.
Here my English fails me - flog as in whip, or flog as in sell?
Yes :-)
--
\ “The most common of all follies is to believe
Xah Lee wrote:
This feature is important in practical ways. For example, when you
work with “tab separated line” files (CSV) that's a common format for
importing/exporting address books or spreadsheets.
CSV stands for comma separated values and the import facilities of any
spreadsheet
Sleepy Cabbage wrote:
I'm scripting a superkaramba theme using python and have intgrated output
from amarok. I have also would like to show the artist and song title from
a radio stream i've added to my playlist.
If I open a python console and add the following:
import urllib2
from
MRAB wrote:
Carl Banks wrote:
On Aug 17, 10:03 am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
I'm no English native, but I already heard women/men referring to a
group as guys, no matter that group gender configuration. It's even
used for group composed exclusively of women. Moreover
On 18/08/2009 6:20 PM, Dirkjan Ochtman wrote:
On Tue, Aug 18, 2009 at 10:12, Martin v. Löwismar...@v.loewis.de wrote:
In this thread, I'd like to collect things that ought to be done
but where Dirkjan has indicated that he would prefer if somebody else
did it.
I think the most important item
I think i found a good managable solution. Actually it is trivial but
may help (I used it now).
When i wnat to access the list then i assign the object which i want
to access to a variable ex:
1)x=AutomataBranch()
2)x=self.cfgAutomata[i]
The first line is used only to make the IDE knows that x is
On 03:56 am, tjre...@udel.edu wrote:
exar...@twistedmatrix.com wrote:
There's a lot of things in Python that I don't strictly *need*. That
doesn't mean that they wouldn't be welcome if I could have them.
Getting rid of the range/xrange dichotomy would improve things.
The developers agreed a
On Tue, Aug 18, 2009 at 13:32, Mark Hammondmhamm...@skippinet.com.au wrote:
I can make time, somewhat spasmodically, starting fairly soon. Might I
suggest that as a first task I can resurrect my old stale patch, and you can
arrange to install win32text locally and start experimenting with how
On Tue, 18 Aug 2009 13:21:59 +0200, Peter Otten wrote:
Sleepy Cabbage wrote:
I'm scripting a superkaramba theme using python and have intgrated
output from amarok. I have also would like to show the artist and song
title from a radio stream i've added to my playlist.
If I open a python
Ben Finney wrote:
The principles of handling text in Python: Get it to internal Unicode
objects as soon as possible, handle it as Unicode for as long as
possible, and only encode it to some byte stream for output as late as
possible.
Again, note that these recommendations hold for *any* text
Sleepy Cabbage wrote:
This is the script up to where the error seems to fall:
#!/usr/bin/env superkaramba
# -*- coding: iso-8859-1 -*-
import karamba
import subprocess
from subprocess import Popen, PIPE, STDOUT, call
import urllib
from urllib import urlopen
#this is called when
On Tue, 18 Aug 2009 13:36:49 +0200, Jean-Michel Pichavant wrote:
MRAB wrote:
Carl Banks wrote:
On Aug 17, 10:03 am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
I'm no English native, but I already heard women/men referring to a
group as guys, no matter that group gender
On Tue, 18 Aug 2009 12:12:14 +0200, Hendrik van Rooyen wrote:
On Tuesday 18 August 2009 06:45:39 Aahz wrote:
In article pan.2009.08.18.04.34...@remove.this.cybersource.com.au,
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote:
The comments were made a week ago -- why the sudden
Thanks for the time you've spent anyway Peter. I have superkaramba
installed and the rest of the script is running fine, it's only when I
put the urlopen part in that it comes back with errors. The quotes are
just to make it readable on here as my first attempt at posting muted the
text.
--
هاني الموصلي wrote:
I think i found a good managable solution. Actually it is trivial but
may help (I used it now).
When i wnat to access the list then i assign the object which i want
to access to a variable ex:
1)x=AutomataBranch()
2)x=self.cfgAutomata[i]
The first line is used only to
I need to compare a REST XML response with a 'gold standard' response (one
that we have already verified is correct). The problem is, sometimes the
REST response comes back and it is logically correct, but the order of
attributes and elements is different than what is in the 'gold standard'
file.
indicator of bad practice. What is the problem you're trying to solve?
Ben Finney
No major problem.
I was just trying to make some experimental changes to autokey. My
repo: http://github.com/tinku99/autokey.git/
Didn't want to subclass or reorganize a class just yet.
--
While refactoring some code, I ran across an opportunity to use a
conditional expression. Original:
if total P.BASE:
excessblk = Block(total - P.BASE, srccol, carry_button_suppress=True)
else:
excessblk = None
Is there any consensus on how to format a conditional expression that
Tinybooker 0.2.2 released at http://tinybooker.org/
Tinybooker is an accounting program offering the dual accounting
core functionality for moderate size accountings:
* Assisted establishing new accountings
* Localized scheme templates
* Easy entering and saving new entries
*
Hi,
The PySide team is pleased to announce the first public release of
PySide: Python for Qt!
PySide, its documentation, and developer resources are available at the
project website, http://www.pyside.org .
What is it?
---
PySide is a project providing an LGPL'd set of Python bindings
John Posner wrote:
While refactoring some code, I ran across an opportunity to use a
conditional expression. Original:
if total P.BASE:
excessblk = Block(total - P.BASE, srccol,
carry_button_suppress=True)
else:
excessblk = None
Is there any consensus on how to
Diez B. Roggisch wrote:
John Posner wrote:
While refactoring some code, I ran across an opportunity to use a
conditional expression. Original:
if total P.BASE:
excessblk = Block(total - P.BASE, srccol,
carry_button_suppress=True)
else:
excessblk = None
Is there any
On 2009-08-17, Carl Banks pavlovevide...@gmail.com wrote:
On Aug 17, 10:03?am, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
I'm no English native, but I already heard women/men referring to a
group as guys, no matter that group gender configuration. It's even
used for group composed
On 17 Aug, 17:19, Che M cmpyt...@gmail.com wrote:
Boa (Boa Constructor) is really nice for wxPython GUI
work, but it has some bugs when using Linux that might
be dealbreakers for the user. At least I have had
problems on Ubuntu 8.10 64 bit (but none or very few
I prefer wxFormBuilder over
On Tue, 18 Aug 2009 10:04:36 -0400, John Posner wrote:
While refactoring some code, I ran across an opportunity to use a
conditional expression. Original:
if total P.BASE:
excessblk = Block(total - P.BASE, srccol,
carry_button_suppress=True)
else:
excessblk = None
My choice would be
excessblk = None
if total P.BASE:
excessblk = ...
Diez and Jean-Michel,
Ha! Your suggestion above was my *original* coding. It looks like I'm
evolving backwards!
But doesn't it violate the DRY principle? The token excessblk appears
twice instead of once.
Thanks
hi all,
could you inform how to compose a py-file (for soft installation),
that will visit 3 subdirectories (eg subdir1, subdir2, subdir3) and
invoke a command python setup.py install in each subdirectory?
I know there should be a simple solution available in Python
documentation, but I have an
John Posner jjpos...@optimum.net wrote in message
news:mailman.26.1250604346.2854.python-l...@python.org...
if total P.BASE:
excessblk = Block(total - P.BASE, srccol, carry_button_suppress=True)
else:
excessblk = None
I wonder if it is appropriate to replace the None sentinel
How difficult is to create a program that will be executed when Windows
Vista is started? As Windows Calendar does, for example.
I am actually more interested in the Python tools that might be used for
this task. I hope that this question is not inappropriate for the list. :-\
--V
--
John Posner wrote:
My choice would be
excessblk = None
if total P.BASE:
excessblk = ...
Diez and Jean-Michel,
Ha! Your suggestion above was my *original* coding. It looks like I'm
evolving backwards!
But doesn't it violate the DRY principle? The token excessblk
appears twice
Robert Dailey:
[...]
It's a figure of speech. And besides, why would I want programming
advice from a woman? lol. Thanks for the help.
Sorry, Robert, simply not acceptable. Whether designed to be funny or
not it's the kind of inane remark I would be really happy never to see
again.
The
Virgil Stokes wrote:
How difficult is to create a program that will be executed when Windows
Vista is started? As Windows Calendar does, for example.
I am actually more interested in the Python tools that might be used for
this task. I hope that this question is not inappropriate for the
Virgil Stokes wrote:
How difficult is to create a program that will be executed when
Windows Vista is started? As Windows Calendar does, for example.
I am actually more interested in the Python tools that might be used
for this task. I hope that this question is not inappropriate for the
hi,
i have to work with mac OS 9.2 for legacy reasons...is there a
compiled version of python for this os ? i need to get input about
variable values from the user and then print out some text files that
make use of this input. a gui would be nice, but keyboard based input
would be ok too...
Virgil Stokes wrote:
How difficult is to create a program that will be executed when Windows
Vista is started? As Windows Calendar does, for example.
I am actually more interested in the Python tools that might be used for
this task. I hope that this question is not inappropriate for the
2009/8/17 Simon Forman sajmik...@gmail.com
You can use a little helper function to create your itemgetter like this:
def makeItemGetter(indexes):
I = itemgetter(*indexes)
if len(indexes) 1:
return I
return lambda thing: (I(thing),)
If indexes contains only one index the
Steve Holden wrote:
Robert Dailey:
[...]
It's a figure of speech. And besides, why would I want programming
advice from a woman? lol. Thanks for the help.
Sorry, Robert, simply not acceptable. Whether designed to be funny or
not it's the kind of inane remark I would be really
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class node_type_2(node):
specific properties by name including other node types
etc
(Class
could you inform how to compose a py-file (for soft installation),
that will visit 3 subdirectories (eg subdir1, subdir2, subdir3) and
invoke a command python setup.py install in each subdirectory?
I know there should be a simple solution available in Python
If you're executing python setup.py
ok, i found macpython 2.3 at this site:
http://homepages.cwi.nl/~jack/macpython/macpython-older.html
is this the best option for me in terms of using python on os 9.2 ?
thanks much !!
suresh
On Aug 18, 6:04 pm, madzientist madzient...@gmail.com wrote:
hi,
i have to work with mac OS 9.2
I wonder if it is appropriate to replace the None sentinel with one that is an
instance
of Block() e.g.
size = total - P.BASE
excessblk = Block(size, srccol, carry_button_suppress=True, empty_block=(size
= 0) )
In this particular case, Richard, I don't think so. The Block class is
an
Hi All,
I'm pleased to announce a new release of xlutils. This is a small
collection of utilities that make use of both xlrd and xlwt to process
Microsoft Excel files. The changes for this release are as follows:
- Add sheet density information and onesheet option to
xlutils.margins.
-
I'm looking for a way to parallelize my python script without using
typical threading primitives. For example, C++ has pthreads and TBB to
break things into tasks. I would like to see something like this for
python. So, if I have a very linear script:
doStuff1()
doStuff2()
I can parallelize it
John Posner wrote:
BTW, from the (admittedly few) responses to my original post, it seems
there's some sentiment that conditional expressions are a non-Pythonic
misfeature. Interesting ...
-John
I didn't read it that way. One of the (to me) core points of Pythonic
is readability. A
Robert Dailey wrote:
I'm looking for a way to parallelize my python script without using
typical threading primitives. For example, C++ has pthreads and TBB to
break things into tasks. I would like to see something like this for
python. So, if I have a very linear script:
doStuff1()
James Harris wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class node_type_2(node):
specific properties by name including other
On Aug 18, 2:09 pm, James Harris james.harri...@googlemail.com
wrote:
I am writing some code to form a tree of nodes of different types. The
idea is to define one class per node type such as
class node_type_1(node):
specific properties by name including other node types
class
On Mon, Aug 17, 2009 at 3:51 PM, David Brochubrochu...@gmail.com wrote:
I need to compare one xml document to another to see if the content matches.
Unfortunately, the formatting (spacing) and order of elements may change
between files from run to run. I have looked into xml dom minidom but
I want a dictionary that will transparently inherit from a parent
dictionary. So, for example:
a = InheritDict({1: one, 2: two, 4: four})
b = InheritDict({3: three, 4: foobar}, inherit_from=a)
a[1] # one
a[4] # four
b[1] # one
b[3] # three
b[4] # foobar
I've written something like this in
18-08-2009 Steven D'Aprano st...@remove-this-cybersource.com.au wrote:
On Tue, 18 Aug 2009 10:04:36 -0400, John Posner wrote:
[snip]
How about this:
excessblk = (Block(total - P.BASE, srccol, carry_button_suppress=True)
if total P.BASE else
None)
If you
18-08-2009 o 21:44:55 Pavel Panchekha pavpanche...@gmail.com wrote:
I want a dictionary that will transparently inherit from a parent
dictionary. So, for example:
a = InheritDict({1: one, 2: two, 4: four})
b = InheritDict({3: three, 4: foobar}, inherit_from=a)
a[1] # one
a[4] # four
b[1] #
On Tue, Aug 18, 2009 at 2:44 PM, Pavel Panchekha pavpanche...@gmail.comwrote:
I want a dictionary that will transparently inherit from a parent
dictionary. So, for example:
a = InheritDict({1: one, 2: two, 4: four})
b = InheritDict({3: three, 4: foobar}, inherit_from=a)
a[1] # one
a[4]
Hello,
I want to simply wrap a function up into an object so it can be called
with no parameters. The parameters that it would otherwise have taken
are already filled in. Like so:
print1 = lambda: print( Foobar )
print1()
However, the above code fails with:
File
Robert Dailey rcdai...@gmail.com wrote:
Hello,
I want to simply wrap a function up into an object so it can be called
with no parameters. The parameters that it would otherwise have taken
are already filled in. Like so:
print1 = lambda: print( Foobar )
print1()
However,
On Aug 18, 3:31 pm, Duncan Booth duncan.bo...@invalid.invalid wrote:
Robert Dailey rcdai...@gmail.com wrote:
Hello,
I want to simply wrap a function up into an object so it can be called
with no parameters. The parameters that it would otherwise have taken
are already filled in. Like so:
On Aug 18, 4:23 pm, Jan Kaliszewski z...@chopin.edu.pl wrote:
18-08-2009 o 21:44:55 Pavel Panchekha pavpanche...@gmail.com wrote:
I want a dictionary that will transparently inherit from a parent
dictionary. So, for example:
a = InheritDict({1: one, 2: two, 4: four})
b =
On Tue, Aug 18, 2009 at 1:57 AM, Steven
D'Apranoste...@remove.this.cybersource.com.au wrote:
On Mon, 17 Aug 2009 21:45:57 -0700, naveen wrote:
Is it possible to split up a class definition over multiple files?
Not exactly, but you can do variations of this:
In file A.py, create:
class
On Aug 18, 3:31 pm, Duncan Booth duncan.bo...@invalid.invalid wrote:
Robert Dailey rcdai...@gmail.com wrote:
Hello,
I want to simply wrap a function up into an object so it can be called
with no parameters. The parameters that it would otherwise have taken
are already filled in. Like so:
On Tue, Aug 18, 2009 at 1:32 PM, Robert Daileyrcdai...@gmail.com wrote:
On Aug 18, 3:31 pm, Duncan Booth duncan.bo...@invalid.invalid wrote:
Robert Dailey rcdai...@gmail.com wrote:
Hello,
I want to simply wrap a function up into an object so it can be called
with no parameters. The
18-08-2009 o 06:58:58 Xavier Ho cont...@xavierho.com wrote:
On Tue, Aug 18, 2009 at 2:45 PM, naveen naveen.g...@gmail.com wrote:
Is it possible to split up a class definition over multiple files?
-
Answer in short, I don't think so.
Why not?
-
File a.py:
class MyClass:
def
On Aug 18, 11:19 am, Robert Dailey rcdai...@gmail.com wrote:
I'm looking for a way to parallelize my python script without using
typical threading primitives. For example, C++ has pthreads and TBB to
break things into tasks. I would like to see something like this for
python. So, if I have a
1 - 100 of 216 matches
Mail list logo