> You still dream of this, isn't it? Type inference in dynamic languages
> doesn't scale. It didn't scale in twenty years of research on
> SmallTalk and it doesn't in Python. However there is no no-go theorem
type inference sure is difficult business, and I won't deny there are
scalability issues
On Apr 1, 4:59 pm, Duncan Smith <[EMAIL PROTECTED]> wrote:
> Hello,
> I am currently implementing (mainly in Python) 'models' that come
> to me as Excel spreadsheets, with little additional information. I am
> expected to use these models in a web application. Some contain many
> worksheets
Alex Martelli schrieb:
> Thomas Krüger <[EMAIL PROTECTED]> wrote:
>> def sorter(a, b):
>> return cmp(a.id, b.id)
>>
>> obj_lst.sort(sorter)
>
> A MUCH better way to obtain exactly the same semantics would be:
>
> def getid(a):
> return a.id
>
> obj_list.sort(key=getid)
Frankly speaking
"Bryan Olson" <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > Hendrik van Rooyen wrote:
> >> Are sockets full duplex?
> >>
> > Yes. But you have to use non-blocking calls in your application to use
> > them as full-duplex in your code.
>
> Hmmm... I'm missing something. Suppose I have one
I am accustomed to vi my pthon scripts with 'tab' indent. But when I
copy some code to my script, the indent may be 'spaces'. So I wanna a
way to substitute those 'spaces' to be 'tabs' conveniently.
For example, I:
expand -t4 test.py >/tmp/test2.py
vi /tmp/test2.py
Then in vim, the indents should
Thomas Krüger <[EMAIL PROTECTED]> wrote:
> Rehceb Rotkiv schrieb:
> > can I sort a multidimensional array in Python by multiple sort keys? A
> > litte code sample would be nice!
>
> You can pass a function as argument to the sort method of a list.
> The function should take two arguments and retu
asdf1234234 <[EMAIL PROTECTED]> wrote:
> My code is:
> -a.py-
> import b
>
> class A:
> def __init__(self):
> pass
Incidentally, these last two lines are totally, utterly useless. Do NOT
define special methods like this -- just omit the whole def statement
and you'll have identic
python unzip
At first, I tried to use 'os.popen3("unzip ...") like this:
fin, fout, ferr = os.popen3("unzip -o -d %s %s" % (dest, zipfile))
strerr = ferr.read()
# This makes the program hanging up
if strerr:
print >> sys.stderr, strerr
outlog.error(strerr)
I want to know is this caused by
On Apr 2, 2:52 am, "ken" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> i have the following code to load a url.
> My question is what if I try to load an invalide url
> ("http://www.heise.de/";), will I get an IOException? or it will wait
> forever?
>
Depends on why the URL is invalid. If the URL refers t
On Apr 1, 7:56 pm, "wswilson" <[EMAIL PROTECTED]> wrote:
> I am parsing a document which contains some lines with code I want to
> eval or exec. However, due to the complexity of the parsing, I am
> splitting it among different methods. So, if I eval something in one
> method, it won't be there if
John Machin wrote:
> On Apr 2, 1:59 am, Duncan Smith <[EMAIL PROTECTED]> wrote:
>
>>Hello,
>> I am currently implementing (mainly in Python) 'models' that come
>>to me as Excel spreadsheets, with little additional information. I am
>>expected to use these models in a web application. Some co
On Apr 1, 9:24 pm, "7stud" <[EMAIL PROTECTED]> wrote:
> On Apr 1, 7:43 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
>
>
>
> > asdf1234234 wrote:
> > > -a.py-
> > > import b
>
> > > class A:
> > > def __init__(self):
> > > pass
> > > def my_method(self):
> > > var = 1
On Apr 1, 7:43 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> asdf1234234 wrote:
> > -a.py-
> > import b
>
> > class A:
> > def __init__(self):
> > pass
> > def my_method(self):
> > var = 1
> > self.var = 2
> > b.set_var(self)
> > print
I am working on a Outlook COM project. For some reason
win32com.client.constants
quit working between runs of one of my test scripts. It's supposed to
acquire attributes for all constants defined in loaded COM servers
through its __dicts__ attribute,and did for awhile
Now it is throwing an At
On Apr 1, 7:56 pm, "wswilson" <[EMAIL PROTECTED]> wrote:
> On Apr 1, 9:43 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
>
>
>
> > asdf1234234 wrote:
> > > -a.py-
> > > import b
>
> > > class A:
> > > def __init__(self):
> > > pass
> > > def my_method(self):
> > > var
On 2007-04-02, Shane Geiger <[EMAIL PROTECTED]> wrote:
>>> how can i compare a string which is non null and empty?
>>>
>> [...]
>>
>>> In java,I do this:
>>> if (str != null) && (!str.equals(""))
>>>
>>> how can i do that in python?
>>
>> If you want to litterally do that, it's
>>
>>
On Apr 1, 7:56 pm, "wswilson" <[EMAIL PROTECTED]> wrote:
> On Apr 1, 9:43 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
>
>
>
> > asdf1234234 wrote:
> > > -a.py-
> > > import b
>
> > > class A:
> > > def __init__(self):
> > > pass
> > > def my_method(self):
> > > var
It is probably worth noting that the example is not executable code:
str() is a function.
[EMAIL PROTECTED]:~$ python
Python 2.4.4c0 (#2, Jul 30 2006, 15:43:58)
[GCC 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>
On Apr 2, 1:59 am, Duncan Smith <[EMAIL PROTECTED]> wrote:
> Hello,
> I am currently implementing (mainly in Python) 'models' that come
> to me as Excel spreadsheets, with little additional information. I am
> expected to use these models in a web application. Some contain many
> worksheets
On 2007-04-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> how can i compare a string which is non null and empty?
[...]
> In java,I do this:
> if (str != null) && (!str.equals(""))
>
> how can i do that in python?
If you want to litterally do that, it's
if (str != None) and (str != ""
Rehceb Rotkiv escreveu:
> Hello everyone,
>
> can I sort a multidimensional array in Python by multiple sort keys? A
> litte code sample would be nice!
class MyList(list):
# This is the index of the element to be compared
CmpIndex=0
# Comparision methods
@staticm
On Apr 1, 9:43 pm, Michael Hoffman <[EMAIL PROTECTED]> wrote:
> asdf1234234 wrote:
> > -a.py-
> > import b
>
> > class A:
> > def __init__(self):
> > pass
> > def my_method(self):
> > var = 1
> > self.var = 2
> > b.set_var(self)
> > print
asdf1234234 wrote:
> -a.py-
> import b
>
> class A:
> def __init__(self):
> pass
> def my_method(self):
> var = 1
> self.var = 2
> b.set_var(self)
> print var
> print self.var
>
> my_a = A()
> my_a.my_method()
>
> -b.py-
> de
My code is:
-a.py-
import b
class A:
def __init__(self):
pass
def my_method(self):
var = 1
self.var = 2
b.set_var(self)
print var
print self.var
my_a = A()
my_a.my_method()
-b.py-
def set_var(self):
var = 2
self.var
oscartheduck wrote:
> in a program I'm writing I have several commands I pass to the unix OS
> underneath the code.
>
> I want to perform error checking to make sure that the OS commands'
> exit gracefully, but I'm not seeing a simple python module to do this.
If you're using Python 2.5, you can
str != ""
returns true if str is NOT the empty string.
str is not None
returns true if str is null (or None as it's called in python).
To check to make sure a string is nonnull and nonempty, do:
str is not None and str != ""
--
http://mail.python.org/mailman/listinfo/python-list
Both methods work well, thank you!
--
http://mail.python.org/mailman/listinfo/python-list
7stud <[EMAIL PROTECTED]> wrote:
...
> I'm using python 2.3.5.
>
> On Mar 29, 9:34 am, [EMAIL PROTECTED] (Alex Martelli) wrote:
> > Simplest way:
> >
> > class smethod(object):
> > def __init__(self, f): self.f=f
> > def __call__(self, *a, **k): return self.f(*a, **k)
> >
> > Alex
>
> Inte
Hi folks,
in a program I'm writing I have several commands I pass to the unix OS
underneath the code.
I want to perform error checking to make sure that the OS commands'
exit gracefully, but I'm not seeing a simple python module to do this.
The closest I can see is system(), as detailed here:
htt
You posting in the wrong group, I'm sure to don't give a rats ass and that's
why no one will ever, in your life, take you seriously. I have my own
feelings on President Bush but I spend the time to get the facts (months and
sometimes years) and find a publisher. Get an education, quit shouting a
Getting the pid:
http://timgolden.me.uk/python/wmi_cookbook.html
List all running processes
import wmi
c = wmi.WMI ()
for process in c.Win32_Process ():
print process.ProcessId, process.Name
List all running notepad processes
import wmi
c = wmi.WMI ()
for process in c.Win32_Process (name=
I want to script the benchmarking of some compression algorithms on a
Windows box. The algorithms are all embodied in command line
executables, such as gzip and bzip2. I would like to measure three things:
1. size of compressed file
2. elapsed time (clock or preferably CPU)
3. memory used
The f
hlubenow wrote:
>
> enquiring mind wrote:
>
> > Running 2.4.1 Python (learning)
> > Running SUSE Linux 10
> >
> > At Chapter 5 is where the Pygame module is
> > introduced so I have a little time before I have to figure out what I
> > have to download and install.
>
> Are you asking for advice h
On Apr 2, 12:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> how can i compare a string which is non null and empty?
>
> i look thru the string methods here, but cant find one which does it?
>
> http://docs.python.org/lib/string-methods.html#string-methods
>
> In java,I do this:
> i
Gabriel Genellina wrote:
>
> En Sat, 31 Mar 2007 23:37:16 -0300, enquiring mind <"enquiring
> mind"@braindead.com> escribió:
>
> > Running 2.4.1 Python (learning)
> > Running SUSE Linux 10
> >
> > Am learning from a new books that mostly deals with windows python and
> > Pygames called "Game Prog
[EMAIL PROTECTED] schrieb:
> Hi,
>
> how can i compare a string which is non null and empty?
>
>
> i look thru the string methods here, but cant find one which does it?
>
> http://docs.python.org/lib/string-methods.html#string-methods
>
> In java,I do this:
> if (str != null) && (!str.equals("
[EMAIL PROTECTED] wrote:
>
> Hi,
>
> how can i compare a string which is non null and empty?
>
>
> i look thru the string methods here, but cant find one which does it?
>
> http://docs.python.org/lib/string-methods.html#string-methods
>
> In java,I do this:
> if (str != null) && (!str.equals
Hi,
how can i compare a string which is non null and empty?
i look thru the string methods here, but cant find one which does it?
http://docs.python.org/lib/string-methods.html#string-methods
In java,I do this:
if (str != null) && (!str.equals(""))
how can i do that in python?
--
http
Ulysse wrote:
> Hello,
>
> I have a python script which runs all the time (using of library
> threading). I would like this scipt to run on a remote linux Os using
> Putty. The problem is, when I close Putty command line window running
> on my Win PC, the python script stops to run too.
>
> I tri
I use a tree control in my application and was hoping to use use the
GetItemText method to read the new label of the tree item after the
user has edited it. So in the EVT_TREE_END_LABEL_EDIT event handler,
i call this method but the old label (previous value before the edti)
is returned.
Is there s
Hello,
I have a python script which runs all the time (using of library
threading). I would like this scipt to run on a remote linux Os using
Putty. The problem is, when I close Putty command line window running
on my Win PC, the python script stops to run too.
I tried to use cron tables instead.
On Apr 1, 1:38 pm, Rehceb Rotkiv <[EMAIL PROTECTED]> wrote:
> In the re documentation, it says that the matching functions return "non-
> overlapping" matches only, but I also need overlapping ones. Does anyone
> know how this can be done?
Perhaps lookahead assertions are what you're
looking for?
On Mar 28, 7:01 am, David Nicolson <[EMAIL PROTECTED]> wrote:
> Hi John,
>
> That was an excellent idea and it was the cause problem. Whether this
> is a bug inshutilI'm not sure.
>
> Here is the traceback, Python 2.4.3 on Windows XP:
>
>
>
>
>
> > C:\Documents and Settings\Güstav>C:\python243\py
John Nagle wrote:
> Michael B. Trausch wrote:
>> In short: How do I create a string that contains raw binary content
>> without Python caring? Is that possible?
>
>Given where we're now at with strings in Python, Python should
> really have a "byte" type and a way to deal with arrays of byt
[EMAIL PROTECTED] wrote:
> Hi there,
>
> I'd like to send emails from a Python program using Simple MAPI. I've
> tried this code:
> http://mail.python.org/pipermail/python-list/2004-December/298066.html
> and it works well with Outlook Express 6 and Thunderbird 1.5, but it
> doens't work at all w
Hi,
i have the following code to load a url.
My question is what if I try to load an invalide url ("http://
www.heise.de/"), will I get an IOException? or it will wait forever?
Thanks for any help.
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
urllib2.install_opener(opener)
OMG, I was starting to reconsider Ruby.
Maël Benjamin Mettler wrote:
Is this supposed to be a joke?
First of April? Likely.
--
Shane Geiger
IT Director
National Council on Economic Education
[EMAIL PROTECTED] | 402-438-8958 | http://www.ncee.net
Leading the Campaign for Econ
kj <[EMAIL PROTECTED]> writes:
> I'm looking for a collection of useful programming projects, at
> the "hobbyist" level.
>
> My online search did turn up a few collections (isolated projects
> are less useful to me at the moment), but these projects are either
> more difficult than what I'm lookin
Hello,
I need to clean the string like this :
string =
"""
bonne mentalité mec!:) \nbon pour
info moi je suis un serial posteur arceleur dictateur ^^*
\nmais pour avoir des resultats probant il
faut pas faire les mariolles, comme le "fondateur" de b
On Apr 1, 8:47 am, Thorsten Kampe <[EMAIL PROTECTED]> wrote:
> I guess the culprit is this snippet from optparse.py:
>
> # used by test suite
> def _get_encoding(self, file):
> encoding = getattr(file, "encoding", None)
> if not encoding:
> encoding = sys.getdefaultencoding()
>
> I'm looking for a collection of useful programming projects, at
> the "hobbyist" level.
>
> My online search did turn up a few collections (isolated projects
> are less useful to me at the moment), but these projects are either
> more difficult than what I'm looking for (e.g. code a C compiler)
>
On Apr 1, 9:38 pm, Rehceb Rotkiv <[EMAIL PROTECTED]> wrote:
> In the re documentation, it says that the matching functions return "non-
> overlapping" matches only, but I also need overlapping ones. Does anyone
> know how this can be done?
Something like the following:
import re
s = ""
p
Hi folks,
Please, I don´t understand exactly what this function CRC CCITT UPDATE
in C++ AVR can be ported to Python..
uint16_t
crc_ccitt_update (uint16_t crc, uint8_t data)
{
data ˆ= lo8 (crc);
data ˆ= data << 4;
return uint16_t)data << 8) | hi8 (crc)) ˆ (uint8_t)(data >> 4)
ˆ ((uin
In the re documentation, it says that the matching functions return "non-
overlapping" matches only, but I also need overlapping ones. Does anyone
know how this can be done?
Regards,
Rehceb Rotkiv
--
http://mail.python.org/mailman/listinfo/python-list
Kay Schluehr wrote:
> On Apr 1, 6:07 pm, John Nagle <[EMAIL PROTECTED]> wrote:
>
>>Kay Schluehr wrote:
>>
>>>Indeed. The only serious problem from an acceptance point of view is
>>>that Mark tried to solve the more difficult problem first and hung on
>>>it. Instead of integrating a translator/comp
Steve Holden wrote:
> Hendrik van Rooyen wrote:
>> Are sockets full duplex?
>>
> Yes. But you have to use non-blocking calls in your application to use
> them as full-duplex in your code.
Hmmm... I'm missing something. Suppose I have one thread (or
process) reading from a blocking-mode socket whi
+18446744073709551616 from me too.
This also fits nicely in with my plan to abandon the python-dev and
python-3000 mailing lists. Mailing lists are so 20th century! I
propose that from now on, all Python development should be carried out
on blogs, so that readers can use customized RSS feeds to re
Thorsten Kampe napisał(a):
>>> Under Windows I get " File "G:\program files\python\lib\encodings
>>> \cp1252.py", line 12, in encode
>>>return codecs.charmap_encode(input,errors,encoding_table)"
>> I'm not very experienced with internationalization, but if you change::
>>
>> gettext.insta
On 1 Apr 2007 07:56:04 -0700, Ulysse <[EMAIL PROTECTED]> wrote:
> I have seen the Beautiful Soup online help and tried to apply that to
> my problem. But it seems to be a little bit hard. I will rather try to
> do this with regular expressions...
>
If you think that Beautiful Soup is difficult tha
* Thorsten Kampe (Sun, 1 Apr 2007 20:22:51 +0100)
> * Thorsten Kampe (Sun, 1 Apr 2007 20:08:39 +0100)
> > * Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100)
> > > Yes, I could do that but I'd rather know first if my code is wrong or
> > > the optparse code.
> >
> > It might be the bug mentioned in
On 2007-04-01, Ene <[EMAIL PROTECTED]> wrote:
> On Apr 1, 11:44 am, John Nagle <[EMAIL PROTECTED]> wrote:
>> Michael B. Trausch wrote:
>> > In short: How do I create a string that contains raw binary content
>> > without Python caring? Is that possible?
>>
>> Given where we're now at with strings
On Apr 1, 6:07 pm, John Nagle <[EMAIL PROTECTED]> wrote:
> Kay Schluehr wrote:
> > Indeed. The only serious problem from an acceptance point of view is
> > that Mark tried to solve the more difficult problem first and hung on
> > it. Instead of integrating a translator/compiler early with CPython,
http://home.inklingmarkets.com/market/show/4018
(Interesting site by the way - although a bit heavily weighted towards
US politics for my tastes).
Anyway, I know which way my money is going :-)
Fuzzyman
http://www.voidspace.org.uk/python/articles.shtml
--
http://mail.python.org/mailman/listinf
* Thorsten Kampe (Sun, 1 Apr 2007 20:08:39 +0100)
> * Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100)
> > Yes, I could do that but I'd rather know first if my code is wrong or
> > the optparse code.
>
> It might be the bug mentioned in
> http://mail.python.org/pipermail/python-dev/2006-May/06545
[EMAIL PROTECTED] writes:
> > I don't see how that can be--we're talking about a GCC-based compiler,
> > right?
>
> no, Shed Skin is a completely separate entity,
I was referring to GNAT.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 1, 11:44 am, John Nagle <[EMAIL PROTECTED]> wrote:
> Michael B. Trausch wrote:
> > In short: How do I create a string that contains raw binary content
> > without Python caring? Is that possible?
>
> Given where we're now at with strings in Python, Python should
> really have a "byte"
enquiring mind wrote:
> Running 2.4.1 Python (learning)
> Running SUSE Linux 10
>
> At Chapter 5 is where the Pygame module is
> introduced so I have a little time before I have to figure out what I
> have to download and install.
Are you asking for advice how to install pygame on SuSE 10 ?
Wel
* Thorsten Kampe (Sun, 1 Apr 2007 19:45:59 +0100)
> Yes, I could do that but I'd rather know first if my code is wrong or
> the optparse code.
It might be the bug mentioned in
http://mail.python.org/pipermail/python-dev/2006-May/065458.html
The patch although doesn't work. From my unicode-chars
* Steven Bethard (Sun, 01 Apr 2007 10:26:54 -0600)
> Thorsten Kampe wrote:
> > I guess the culprit is this snippet from optparse.py:
> >
> > # used by test suite
> > def _get_encoding(self, file):
> > encoding = getattr(file, "encoding", None)
> > if not encoding:
> > encoding = sy
Michael B. Trausch wrote:
> In short: How do I create a string that contains raw binary content
> without Python caring? Is that possible?
Given where we're now at with strings in Python, Python should
really have a "byte" type and a way to deal with arrays of bytes,
independent of the stri
Hi folks,
in a program I'm writing I have several commands I pass to the unix OS
underneath the code.
I want to perform error checking to make sure that the OS commands' exit
gracefully, but I'm not seeing a simple python module to do this. The
closest I can see is system(), as detailed here:
ht
* Steven Bethard (Sun, 01 Apr 2007 10:21:40 -0600)
> Thorsten Kampe wrote:
> > * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600)
> >> Thorsten Kampe wrote:
> >>> I've written a script which uses Optik/Optparse to display the
> >>> options (which works fine). The text for the help message is local
"kj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
|
|
|
| I'm looking for a collection of useful programming projects, at
| the "hobbyist" level.
|
| My online search did turn up a few collections (isolated projects
| are less useful to me at the moment), but these projects are eit
"Michael B. Trausch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| The protocol calls for binary data to be transmitted, and I cannot seem
| to be able to do it, because I get this error:
| UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0:
| ordinal not in r
> I don't see how that can be--we're talking about a GCC-based compiler,
> right?
no, Shed Skin is a completely separate entity, that outputs C++ code.
it's true I only use GCC to test the output, and I use some GCC-
specific extensions (__gnu_cxx::hash_map/hash_set), but people have
managed to c
On Apr 1, 5:23 am, [EMAIL PROTECTED] wrote:
> On Apr 1, 6:12 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > But when 'data' does not contain pattern, it just hangs at
> > 're.findall'
>
> > pattern = re.compile("(.*) > re.S)
>
> That pattern is just really slow to evaluate. What you wan
Michael B. Trausch wrote:
>
> I never said it did. It just happens to be the context with which I am
> working. I said I wanted to concatenate materials without regard for
> the character set. I am mixing binary data with ASCII and Unicode, for
> sure, but I should be able to do this.
The probl
On Sun, 2007-04-01 at 06:09 -0300, Gabriel Genellina wrote:
> > When putting the MIME segments (listed line-by-line in a Python list)
> > together to transmit them. The files are typically JPG or some other
> > binary format, and as best as I understand the protocol, the binary data
> > needs to
On 911 Yank mother fuckers of IVY LEAGUE killed their own people and
blamed on other people. The mother fucker, Thomas Eager of MIT
Materials Science Department and welding lab, was the first to defend
the lies of the government by an IDIOTIC pancake theory. Then we have
the BASTARD of Harvard, Sam
[EMAIL PROTECTED] wrote:
> Hi,
>
> I work on a project that is built entirely using python and Tkinter.
> We are at the point where we would like to give access to our
> functionality to others via some sort of API. People who would use
> our API develop in all kinds of languages from C/C++ to P
Duncan Smith wrote:
> Hello,
> I am currently implementing (mainly in Python) 'models' that come
> to me as Excel spreadsheets, with little additional information. I am
> expected to use these models in a web application. Some contain many
> worksheets and various macros.
>
> What I'd like
On Apr 1, 5:48 pm, Peter Otten <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson wrote:
> > Hi, I'm trying to pickle an object instance of a class that is like a
> > dict but with a __getattr__ and I'm getting pickling errors.
> > This is what happens when I'm trying to be clever:
>
> import cPickl
Peter Bengtsson wrote:
> Hi, I'm trying to pickle an object instance of a class that is like a
> dict but with a __getattr__ and I'm getting pickling errors.
> This is what happens when I'm trying to be clever:
>
import cPickle as pickle
class Dict(dict):
> ... def __getattr__(self
On 4/1/07, Georg Brandl <[EMAIL PROTECTED]> wrote:
[snip several pages of excellent ideas]
>
> The mapping between types and declarators is not static. It can be completely
> customized by the programmer, but for convenience there are some predefined
> mappings for some built-in types:
>
>
Hi, I'm trying to pickle an object instance of a class that is like a
dict but with a __getattr__ and I'm getting pickling errors.
This works but is not good enough.
$ python2.4
>>> import cPickle as pickle
>>> class Dict(dict):
... pass
...
>>>
>>>
>>> friend = Dict(name='Zahid', age=40)
>>>
Thorsten Kampe wrote:
> I guess the culprit is this snippet from optparse.py:
>
> # used by test suite
> def _get_encoding(self, file):
> encoding = getattr(file, "encoding", None)
> if not encoding:
> encoding = sys.getdefaultencoding()
> return encoding
>
> def print_help(se
Robert Kern <[EMAIL PROTECTED]> writes:
> ZMY wrote:
> > I am trying to convert some old Fortran code into Python program and
> > get them work on a QNX 4.25 system. Since the program requires speed,
> > I think using Numpy is really necessary. But I haven't found anything
> > on web about using n
Thorsten Kampe wrote:
> * Steven Bethard (Sat, 31 Mar 2007 20:08:45 -0600)
>> Thorsten Kampe wrote:
>>> I've written a script which uses Optik/Optparse to display the
>>> options (which works fine). The text for the help message is localised
>>> (with german umlauts) and when I execute the script
On Apr 1, 6:59 pm, Duncan Smith <[EMAIL PROTECTED]> wrote:
> Hello,
> I am currently implementing (mainly in Python) 'models' that come
> to me as Excel spreadsheets, with little additional information. I am
> expected to use these models in a web application. Some contain many
> worksheets
Kay Schluehr wrote:
> Indeed. The only serious problem from an acceptance point of view is
> that Mark tried to solve the more difficult problem first and hung on
> it. Instead of integrating a translator/compiler early with CPython,
> doing some factorization of Python module code into compilable
Hello,
I am currently implementing (mainly in Python) 'models' that come
to me as Excel spreadsheets, with little additional information. I am
expected to use these models in a web application. Some contain many
worksheets and various macros.
What I'd like to do is extract the data and busi
.eps ==> vector ; not bitmap
--
http://mail.python.org/mailman/listinfo/python-list
Richard Jones <[EMAIL PROTECTED]> writes:
[...]
> And of course I'll reiterate the same line I always do: the Cheese Shop was
> set up by a volunteer, enhanced by some other volunteers and exactly
> nothing more will get done unless more volunteers offer their time.
PyPI has "just worked" for me,
I guess the culprit is this snippet from optparse.py:
# used by test suite
def _get_encoding(self, file):
encoding = getattr(file, "encoding", None)
if not encoding:
encoding = sys.getdefaultencoding()
return encoding
def print_help(self, file=None):
"""print_help(file : f
Supposing that I have a directory tree like so:
a/
__init__.py
b/
__init__.py
c.py
and b.py has some method (let's call it d) within it. I can, from python, do:
from a.b.c import d
d()
And, that works. Now, suppose I want to have a zipped module under a,
called b.zip. Is there any
On Apr 1, 2:57 pm, "aspineux" wrote:
>
> A context in python is no more than 2 dictionaries ( globals() and
> locals()).
> You can easily serialize both to store them.
I don't think it will work with objects defined by extension modules,
except if they somehow support serialization, will it? I gue
Hi,
I work on a project that is built entirely using python and Tkinter.
We are at the point where we would like to give access to our
functionality to others via some sort of API. People who would use
our API develop in all kinds of languages from C/C++ to Pascal.
Ideas that come to mind that a
"ken" <[EMAIL PROTECTED]> writes:
> How to remove specified cookie (via a given name) in cookie jar?
>
> I have the following code, but how can I remove a specified cookie in
> the cookie jar?
> cj = cookielib.LWPCookieJar()
>
> if cj is not None:
> if os.path.isfile(COOKIEFILE):
>
I'm looking for a collection of useful programming projects, at
the "hobbyist" level.
My online search did turn up a few collections (isolated projects
are less useful to me at the moment), but these projects are either
more difficult than what I'm looking for (e.g. code a C compiler)
or not te
"Steve Holden" <[EMAIL PROTECTED]>
> Hendrik van Rooyen wrote:
> > <[EMAIL PROTECTED]> wrote:
> >
> >
> >> hg> My issue with that is the effect on write: I only want a timeout on
> >> hg> read ... but anyway ...
> >>
> >> So set a long timeout when you want to write and short timeout w
1 - 100 of 133 matches
Mail list logo