Brian schrieb:
I'd like to load a library that expects executables which link against
it to provide a particular symbol. Is there a way to do the inverse
of the in_dll() operation? I'd prefer to avoid creating a brand new
library on the fly just to satisfy this one dependency.
Maybe elmer can
On Apr 5, 9:48 pm, Dennis Lee Bieber wrote:
> On Sun, 05 Apr 2009 12:54:45 +0200, Francesco Bochicchio
> declaimed the following in
> gmane.comp.python.general:
>
> > If yor threads are not set as 'deamons' using Thread.setDaemon method,
> > then your main program at its termination should call T
Hi,
I'm trying to write a program that monitor Internet Explorer events - creating/deletion of the process, loading pages, creating tabs etc. I managed to monitor creation/deletion by using WMI, but I couldn't find a way to monitor the rest of the events. Is there a way to do this ?
Thanks.
On 6 Apr, 05:25, ericwoodwo...@gmail.com wrote:
> On Apr 5, 11:07 pm, Dennis Lee Bieber wrote:
>
>
>
>
>
> > On Sun, 5 Apr 2009 17:27:15 -0700 (PDT), imageguy
> > declaimed the following in
> > gmane.comp.python.general:
>
> > > In threading.Event python 2.5 docs say;
> > > "This is one of the si
On 03.04.2009 15:58, Dave Angel wrote:
Wolfgang Forstmeier wrote:
Ok, but do you really use idlelib for something? Or it's just some
random code you found somewhere and drop into your application?
Ah yes, I really use this. I create some message boxes for a little
GUI application that c
Hi, I am trying to test the business part of a web service. For this I
am using unittest & nose.
I wrote a decorator that should handle the xml test file retrieval, but
it seems I can't get it working with nose.
Here's the code:
* MyApp.py -- base test class *
import os
import unittest
from
"azrael" wrote:
> I guess that this is not an option because of the case that the
> calculation of the needed statistics takes not always the same time
> nad I am afraid tht using sleep() would after a couple of time periods
> skip a meassurement.
If I understand correctly what you are attempti
On Sun, Apr 5, 2009 at 8:17 AM, Good Z wrote:
> Dear all,
> I am using Python 2.4.3 for my project. We need to use HTTPS with
> python2.4.3 unfortunately it seems httplib is not working fine for me. Below
> is small code that works well with Python2.6.1 but not with Python2.4.3.
> Unfortunately i
Grant Edwards wrote:
> [I swear I've asked this question before, but Google can't find
> it.]
My Google is better than yours then:
http://mail.python.org/pipermail/python-list/2008-July/669582.html
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Werner F. Bruhin wrote:
I see the following exception with a string formating problem.
TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
msg = self.format(record)
File "/usr/lib
Hi All,
I am unable to set the python default encoding.
i used the following proccess to set the python encoding
import sys
reload(sys)
sys.setdefaultencoding('latin-1')
but it is giving me the same error :
args = ('utf8', "MEDICINE '\xc4 ", 10, 12, 'invalid data',
>)
encoding = 'utf
On Apr 6, 7:49 am, "Diez B. Roggisch" wrote:
> The CPython-specific answer is that the GIL takes care of that for you
> right now anyway. So unless you plan for a distant future where some
> kind of swallows fly around that don't have a GIL, you are safe to
> simply read and write in threads witho
> "Emanuele D'Arrigo" (ED) wrote:
>ED> Hi everybody,
>ED> I'm having a threading-related design issue and I suspect it has a
>ED> name that I just don't know. Here's a description.
>ED> Let's assume a resource (i.e. a dictionary) that needs to be accessed
>ED> by multiple threads. A simple
On Mon, 06 Apr 2009 11:11:37 +0200, Werner F. Bruhin wrote:
> Werner F. Bruhin wrote:
>> I see the following exception with a string formating problem.
>>
>> TypeError: not all arguments converted during string formatting
>> Traceback (most recent call last):
>> File "/usr/lib/python2.5/logging/_
grbgooglefan writes:
> Regarding PyTuple_New, when I pass this tuple with variable values
> set to some evaluation function like PyObject_CallObject, do I need
> to increment reference for this tuple & then decrement again after
> the call returns?
You don't. It is assumed that you already own
> -It would be nice if decorators were passed a function's AST instead
> of a function object. As it is I have to use inspect.getsource to
> retrieve the source for the function in question, and then use
> ast.parse, which is a bit inefficient because the cpython parser has
> to already have done t
Hi,
I'm working on a pretty large class and I'd like to group several
methods under a attribute.
Its not convenient to chop up the class in several smaller classes,
nor would mixins really solve the issue.
So, what is a pythonic way of grouping several methods under a
attribute?
Many thanks in ad
Lakshman wrote:
> Whats is the python urllib2 equivallent of
>
> curl -u username:password status="abcd" http://example.com/update.json
>
> I did this:
>
> handle = urllib2.Request(url)
> authheader = "Basic %s" % base64.encodestring('%s:%s' % (username,
> password))
> handle.add_header("Author
Whats is the python urllib2 equivallent of
curl -u username:password status="abcd" http://example.com/update.json
I did this:
handle = urllib2.Request(url)
authheader = "Basic %s" % base64.encodestring('%s:%s' % (username,
password))
handle.add_header("Authorization", authheader)
Is there a be
Hi all,
This might be a newbie question. I am trying to implement a simple
string decoder/encoder algorithm. Just suppose I am substrcating some
values from the string passed as a parameter to the function and I
want the function to return encoded/decoded version of the string.
Here is the call:
Werner F. Bruhin wrote:
> Werner F. Bruhin wrote:
>> I see the following exception with a string formating problem.
>>
>> TypeError: not all arguments converted during string formatting
>> Traceback (most recent call last):
>> File "/usr/lib/python2.5/logging/__init__.py", line 744, in emit
>>
Sorry, Here is the correct output:
>>> ss= esauth.penc('s')
>>> print ss
╣
>>> esauth.pdec(ss)
'\xb9'
>>> print ss
s --> Works fine!!!
>>> ss= esauth.penc('s')
>>> print ss
s
>>> ss = esauth.pdec(ss)
>>> print ss
╣ --> how did this happen if the param and return values are same? I
cannot understan
On Apr 6, 3:45 am, bieff...@gmail.com wrote:
> On 6 Apr, 05:25, ericwoodwo...@gmail.com wrote:
>
>
>
> > On Apr 5, 11:07 pm, Dennis Lee Bieber wrote:
>
> > > On Sun, 5 Apr 2009 17:27:15 -0700 (PDT), imageguy
> > > declaimed the following in
> > > gmane.comp.python.general:
>
> > > > In threading.
jelle wrote:
> Hi,
>
> I'm working on a pretty large class
Can you describe what its purpose is?
> and I'd like to group several methods under a attribute.
That doesn't work in Python without bending the Python.
> Its not convenient to chop up the class in several smaller classes,
But that's
k3xji wrote:
> Hi all,
>
> This might be a newbie question. I am trying to implement a simple
> string decoder/encoder algorithm. Just suppose I am substrcating some
> values from the string passed as a parameter to the function and I
> want the function to return encoded/decoded version of the st
I am fully aware that the problem is in my code, however as getMessage
in logging.__init__.py does not catch the exception it is pretty
difficult to find the problem without manually inspecting any
logging.something statements.
My hack of logging.py is really a hack and I know that this can no
Martin v. Löwis wrote:
Chris Withers wrote:
Martin v. Löwis wrote:
I propose the following PEP for inclusion to Python 3.1.
Please comment.
Would this support the following case:
I have a package called mortar, which defines useful stuff:
from mortar import content, ...
I now want to dist
On Thu, Apr 2, 2009 at 4:33 PM, M.-A. Lemburg wrote:
> On 2009-04-02 17:32, Martin v. Löwis wrote:
>> I propose the following PEP for inclusion to Python 3.1.
>
> Thanks for picking this up.
>
> I'd like to extend the proposal to Python 2.7 and later.
>
-1 to adding it to the 2.x series. There wa
On Apr 6, 12:44 pm, Piet van Oostrum wrote:
> 3. See also http://code.activestate.com/recipes/465156/
Thank you for the useful suggestions Piet. In particular I just had a
look at the SharedLock class provided through the link above and it
seems to fit the bill quite nicely. I'll give it a go!
T
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Apr 6, 2009, at 9:21 AM, Jesse Noller wrote:
On Thu, Apr 2, 2009 at 4:33 PM, M.-A. Lemburg wrote:
On 2009-04-02 17:32, Martin v. Löwis wrote:
I propose the following PEP for inclusion to Python 3.1.
Thanks for picking this up.
I'd like to e
Werner F. Bruhin wrote:
I am fully aware that the problem is in my code, however as getMessage
in logging.__init__.py does not catch the exception it is pretty
difficult to find the problem without manually inspecting any
logging.something statements.
My hack of logging.py is really a hack an
Hi, I am looking for an old school friend of mine, Demos Economacos. Are
you perhaps the Demos who completed schooling 1979 at Kroonstad SA.
Groete/Greetings
Hermann Wehrmeyer
Tel: 012 342 3710
Fax: 012 342 3775
--
http://mail.python.org/mailman/listinfo/python-list
Gerhard Häring wrote:
> char* buf = strdup(s);
> if (!buf) {
> PyErr_SetString(PyExc_MemoryError, "Out of memory: strdup failed");
> return NULL;
> }
>
> /* TODO: your string manipulation */
Don't forget to free(buf). ;)
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Hi, all
I have a simple script.
Can you improve algorithm of following 10 line script, with a view point
of speed ?
Following script do exactly what I want but I want to improve the speed.
This parse a file and accumulate lines till a line match a given regular
expression.
Then, when a line m
Hyunchul Kim wrote:
Hi, all
I have a simple script.
Can you improve algorithm of following 10 line script, with a view point
of speed ?
Following script do exactly what I want but I want to improve the speed.
This parse a file and accumulate lines till a line match a given regular
expression
hyperboreean writes:
> From: hyperboreean
> Subject: decorators don't play nice with nose?
> Newsgroups: comp.lang.python
> To: python-list@python.org
> Date: Mon, 06 Apr 2009 11:01:04 +0300
>
> Hi, I am trying to test the business part of a web service. For this I
> am using unittest & nose.
>
In article ,
wrote:
>
>I know that killing threads is hard in any language (I'm facing now
>the issue in a C++ program I'm writing at work), expecially doing in a
>platform-independent way, but Java managed to do it.
That's not my understanding:
http://www.roseindia.net/javatutorials/shutting_d
In article <685a59cd-9f02-483f-bc59-b55091a18...@u9g2000pre.googlegroups.com>,
imageguy wrote:
>Aahz:
>>
>>For more info, see the slides from my thread tutorial:
>>http://pythoncraft.com/OSCON2001/
>
>Aahz, thanks for this reference and link to your presentation. At the
>risk of highjacking the
I am considering teaching an "introduction to programming" course for
continuing education adults at a local community college. These would
people with no programming experience, but I will require a reasonable
facility with computers.
What would be a good book to use as the text for the course?
On 2009-04-06, Peter Otten <__pete...@web.de> wrote:
> Grant Edwards wrote:
>
>> [I swear I've asked this question before, but Google can't find
>> it.]
>
> My Google is better than yours then:
>
> http://mail.python.org/pipermail/python-list/2008-July/669582.html
It certainly is. All I could com
On Apr 6, 7:37 am, grkunt...@gmail.com wrote:
> I am considering teaching an "introduction to programming" course for
> continuing education adults at a local community college. These would
> people with no programming experience, but I will require a reasonable
> facility with computers.
>
> What
hi,
I have the following problem: I have two objects, say, A and B, which
are both legitimate stand-alone objects with lives of their own.
A contains B as a property, so I often do
A.B.foo()
the problem is that some functions inside of B actually need A
(remember I said they were both standalon
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Apr 6, 2009, at 9:21 AM, Jesse Noller wrote:
>
>> On Thu, Apr 2, 2009 at 4:33 PM, M.-A. Lemburg wrote:
>>> On 2009-04-02 17:32, Martin v. Löwis wrote:
I propose the following PEP for inclusion to Python 3.1.
>>>
>>> Thanks for picking t
> Whatever it is, you should find a better way instead of cramming
> everything into a single class. That smells of the God Object
> antipattern (http://en.wikipedia.org/wiki/God_object).
Thanks Gerard, I'll take your advice.
-jelle
--
http://mail.python.org/mailman/listinfo/python-list
At 02:00 PM 4/6/2009 +0100, Chris Withers wrote:
Martin v. Löwis wrote:
Chris Withers wrote:
Would this support the following case:
I have a package called mortar, which defines useful stuff:
from mortar import content, ...
I now want to distribute large optional chunks separately, but ideal
Hyunchul Kim:
> Following script do exactly what I want but I want to improve the speed.
This may be a bit faster, especially if sequences are long (code
untested):
import re
from collections import deque
def scanner1(deque=deque):
result_seq = deque()
cp_regular_expression = re.compile
bearophile:
> cp_regular_expression = re.compile("^a complex regular expression
> here$")
> for line in file(inputfile):
> if cp_regular_expression.match(line) and result_seq:
Sorry, you can replace that with:
cp_regular_expression = re.compile("^a complex regular expression
h
P.J. Eby wrote:
See the third paragraph of
http://www.python.org/dev/peps/pep-0382/#discussion
Indeed, I guess the PEP could be made more explanatory then 'cos, as a
packager, I don't see what I'd put in the various setup.py and
__init__.py to make this work...
That said, I'm delighted to
On Mon, Apr 6, 2009 at 9:26 AM, Barry Warsaw wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On Apr 6, 2009, at 9:21 AM, Jesse Noller wrote:
>
>> On Thu, Apr 2, 2009 at 4:33 PM, M.-A. Lemburg wrote:
>>>
>>> On 2009-04-02 17:32, Martin v. Löwis wrote:
I propose the following
[disclaimer - this is just guessing from general knowledge of regular
expressions; i don't know any details of python's regexp engine]
if your regular expression is the bottleneck rewrite it to avoid lazy
matching, references, groups, lookbacks, and perhaps even counted repeats.
with a little th
Grant Edwards wrote:
> On 2009-04-06, Peter Otten <__pete...@web.de> wrote:
>> Grant Edwards wrote:
>>
>>> [I swear I've asked this question before, but Google can't find
>>> it.]
>>
>> My Google is better than yours then:
>>
>> http://mail.python.org/pipermail/python-list/2008-July/669582.html
>
Reckoner wrote:
> hi,
>
> I have the following problem: I have two objects, say, A and B, which
> are both legitimate stand-alone objects with lives of their own.
>
> A contains B as a property, so I often do
>
> A.B.foo()
>
> the problem is that some functions inside of B actually need A
> (r
On Apr 6, 5:40 am, jelle wrote:
> Hi,
>
> I'm working on a pretty large class and I'd like to group several
> methods under a attribute.
> Its not convenient to chop up the class in several smaller classes,
> nor would mixins really solve the issue.
> So, what is a pythonic way of grouping several
On Apr 6, 9:53 am, Reckoner wrote:
> hi,
>
> I have the following problem: I have two objects, say, A and B, which
> are both legitimate stand-alone objects with lives of their own.
>
> A contains B as a property, so I often do
>
> A.B.foo()
>
> the problem is that some functions inside of B actua
Reckoner wrote:
> hi,
>
> I have the following problem: I have two objects, say, A and B, which
> are both legitimate stand-alone objects with lives of their own.
>
> A contains B as a property, so I often do
>
> A.B.foo()
>
> the problem is that some functions inside of B actually need A
> (
reetesh nigam wrote:
> Hi All,
> I am unable to set the python default encoding.
> i used the following proccess to set the python encoding
>
> import sys
> reload(sys)
> sys.setdefaultencoding('latin-1')
>
> but it is giving me the same error :
>
> args = ('utf8', "MEDICINE '\xc4 ", 10,
Hi All in the list,
I've embedded python v2.6.x engine into my application without any problem.
Now I would like to inject some additional functions after importing a
python module.
So, basically I'm importing a python module via PyImport_ImportModule()
function.
The python module is a simple set
Hello,
How to model this problem as a python code:
Starting with a general condition A, we enter a statement 'p' , if p
satisfy A which is always the case, then split A to three sub-conditions
A1,A2,A3. And we enter
again a statement p1: if p1 satisfy A:
if p1 satis
Hi,
I am very new to python. I have my cgi script written in Python. My CGI script
should call a C program and collect the value returned by this program and pass
it to the browser.
Can anyone help me out in this. How can I execute the c program and collect the
return value.
I tried,
import
On Apr 6, 12:02 pm, Aaron Brady wrote:
> On Apr 6, 5:40 am, jelle wrote:
>
> > Hi,
>
> > I'm working on a pretty large class and I'd like to group several
> > methods under a attribute.
> > Its not convenient to chop up the class in several smaller classes,
> > nor would mixins really solve the i
> bearophileh...@lycos.com (b) wrote:
>b> gideon:
>>> I've recently finished my Master's thesis on the semantics of Python.
>>> In my thesis I define the semantics of Python by rewriting an abstract
>>> machine. The sources that are used to produce my thesis can also be
>>> compiled into a wor
On Apr 4, 7:09 am, Tim Golden wrote:
> ... Now I think about it, try searching
> for "xplorer2" ...
I'll second that. It's one of the few non-open source bits of software
that I'll willingly pay a license for. Have used it for around 5 or 6
years now. It's by a little 1 man company called Zabkat.
Reckoner wrote:
hi,
I have the following problem: I have two objects, say, A and B, which
are both legitimate stand-alone objects with lives of their own.
A contains B as a property, so I often do
A.B.foo()
the problem is that some functions inside of B actually need A
(remember I said they w
Dennis Lee Bieber wrote:
I don't know what Komodo is coded in, but if it is using wx, you may
be failing from having two "mainloop" processes... (same problem as
trying to run a Tkinter application from inside IDLE, and probably
trying to run a win32gui application from PythonWin)
No, K
The delicious api requires http authorization (actually https). A
generic delicious api post url is "https://
username:passw...@api.api.del.icio.us/v1/posts/add?url=http://
example.com/&description=interesting&tags=whatever".
This works fine when entered in the Firefox address bar. However
urllib2
anyone use pycap based on popcap gaming lib.. http://www.farbs.org/pycap.html??
(not to be confused with the other pycap) I was trying to figure out
why the mouse works in the example I didn't see any python code for it
but It seem to have an effect in the example..
--
http://mail.python.org/mail
On Apr 6, 1:58 pm, "Werner F. Bruhin" wrote:
> I am fully aware that the problem is in my code, however as getMessage
> inlogging.__init__.py does not catch the exception it is pretty
> difficult to find the problem without manually inspecting
> anylogging.something statements.
>
> My hack oflogg
Chris Rebert wrote:
On Sun, Apr 5, 2009 at 1:04 AM, robert wrote:
Is there a API/possibilty for reading&writing (live) in the mail box tree of
Thunderbird/Seamonkey with Python?
From what I can google, they're already in mbox format, so you can use
mailbox.mbox to read/write to them.
See ht
Bill wrote:
The delicious api requires http authorization (actually https). A
generic delicious api post url is "https://
username:passw...@api.api.del.icio.us/v1/posts/add?url=http://
example.com/&description=interesting&tags=whatever".
This works fine when entered in the Firefox address bar. H
vishakha vaibhav wrote:
Hi,
I am very new to python. I have my cgi script written in Python. My
CGI script should call a C program and collect the value returned by
this program and pass it to the browser.
Can anyone help me out in this. How can I execute the c program and
collect the return
Hi,
What is a good way to learn Python?
Do you recommend going by a book (suggestions welcome) or learning
with tutorials? Both?
Thanks in advance,
Avi
--
http://mail.python.org/mailman/listinfo/python-list
Hi:
I have this code:
x = 1
while x <= bitties:
file = open(p + str(x) + ".txt")
for line in file:
print line
print eval(bits[x - 1])
x += 1
which throws this error:
[Mon Apr 06 12:07:29 2009] [error] [client 190.166.0.221] PythonHandler
mod_python.cgihandler: Traceback (most recent
On Mon, Apr 6, 2009 at 12:08 PM, Avi wrote:
> Hi,
>
> What is a good way to learn Python?
>
> Do you recommend going by a book (suggestions welcome) or learning
> with tutorials? Both?
The official Python tutorial is pretty darn good:
http://docs.python.org/tutorial/
If you want a book as well, I
I'm new to python, so keep that in mind.
I have a tk Canvas that I'm trying to draw on, and I want to start my
drawing at an offset (from 0) location. So I can tweak this as I code, I
set this offset as a class level variable:
def ClassName:
OFFSET = 20
def __init__(self, master)):
I am wondering where the limitation of filesize comes from when i
upload a large file.
it uploads when the filesize is less than 20 MB (but not if larger).
the script does not limit the filesize so it is either an HTTP
specification or a webserver limit, right?
maybe my connection to the server is
Hi Aaron,
Thanks a lot for your suggestions.
I wasnt familiar with the __get__ magic, which seems interesting.
So, finally it seems that the cleanest pattern is:
class ClsA( object ):
def __init__( self, other ):
self.inst= other
def submethA( self, arg ):
print( 'submet
On Apr 6, 10:53 am, Reckoner wrote:
> hi,
>
> I have the following problem: I have two objects, say, A and B, which
> are both legitimate stand-alone objects with lives of their own.
>
> A contains B as a property, so I often do
>
> A.B.foo()
>
> the problem is that some functions inside of B actu
Avi wrote:
> What is a good way to learn Python?
>
> Do you recommend going by a book (suggestions welcome) or learning
> with tutorials? Both?
how do you like to learn and how much experience do you have programming
in other languages?
andrew
--
http://mail.python.org/mailman/listinfo/python-l
I personally learned a lot from www.diveintopython.org
On Mon, Apr 6, 2009 at 2:08 PM, Avi wrote:
> Hi,
>
> What is a good way to learn Python?
>
> Do you recommend going by a book (suggestions welcome) or learning
> with tutorials? Both?
>
> Thanks in advance,
> Avi
> --
> http://mail.python.or
I was able to get a friend into Python over a Google Chat. I pointed
him to the downloads page, waited for him to install, then covered the
basics in quite a few steps (syntax, conditionals, loops, function
definition and application, classes and methods, lists, dicts and
comprehensions).
He
That's more of a general API design question but I'd like to get an
idea if and how things are different in Python context. AFAIK it's
generally considered bad form (or worse) for functions/methods to
return values of different "type" depending on the number, type and/or
values of the passed parame
Hi All,
I just downloaded and compiled Python 2.6 on a Gentoo Linux, IBM NetVista.
After going through the usual steps (./configure, make), I ran a test (make
test), and got some unexpected issues, which are detailed here:
# ./python Lib/test/test_tcl.py
Traceback (most recent call last):
Fi
A BIG Thanks to Chris and Andrew for suggestions.
This is an awesome place.
namekuseijin: haha...got a friend hooked to Python on chat? hilarious!
--
http://mail.python.org/mailman/listinfo/python-list
hyperboreean schrieb:
Hi, I am trying to test the business part of a web service. For this I
am using unittest & nose.
I wrote a decorator that should handle the xml test file retrieval, but
it seems I can't get it working with nose.
Here's the code:
* MyApp.py -- base test class *
import os
I'm trying to print a simple string to a network printer. This is what I
have so far:
import os
printer_path = "192.168.200.139"
p = os.popen(printer_path, 'w')
p.write("this is a printer test")
p.close()
I'm trying to call the printer from its IP address. When I run the script I
get:
sh: 192.16
This is a classical synchronization problem with a classical solution:
You treat the readers as a group, and the writers individually. So you
have a write lock that each writer has to acquire and release, but it is
acquired only by the first reader and released by the last one.
Therefore you need
On Mon, Apr 6, 2009 at 2:24 PM, Ronn Ross wrote:
> I'm trying to print a simple string to a network printer. This is what I
> have so far:
>
> import os
>
> printer_path = "192.168.200.139"
> p = os.popen(printer_path, 'w')
> p.write("this is a printer test")
> p.close()
>
> I'm trying to call the
Python's approach with the GIL is both reasonable and disappointing.
Reasonable because I understand how it can make things easier for its
internals. Disappointing because it means that standard python cannot
take advantage of the parallelism that can more and more often be
afforded by today's com
Avi escreveu:
A BIG Thanks to Chris and Andrew for suggestions.
This is an awesome place.
namekuseijin: haha...got a friend hooked to Python on chat? hilarious!
True story. But he was already a programmer. Only Pascal Delphi though.
--
a game sig: http://tinyurl.com/d3rxz9
--
http://mail.p
George Sakkis wrote:
That's more of a general API design question but I'd like to get an
idea if and how things are different in Python context. AFAIK it's
generally considered bad form (or worse) for functions/methods to
return values of different "type" depending on the number, type and/or
valu
Chris Rebert wrote:
> On Mon, Apr 6, 2009 at 2:24 PM, Ronn Ross wrote:
> > I'm trying to print a simple string to a network printer. This is what I
> > have so far:
> >
> > import os
> >
> > printer_path = "192.168.200.139"
> > p = os.popen(printer_path, 'w')
> > p.write("this is a printer test")
Tim Shannon wrote:
I'm new to python, so keep that in mind.
I have a tk Canvas that I'm trying to draw on, and I want to start my
drawing at an offset (from 0) location. So I can tweak this as I
code, I set this offset as a class level variable:
def ClassName:
OFFSET = 20
def __i
Hi,
I was trying to extract wikipedia Infobox contents which is in format
like given below, from the opened URL page in Python.
{{ Infobox Software
| name = Bash
| logo = [[Image:bash-org.png|165px]]
| screenshot = [[Image:Bash demo.png|250px]]
| cap
Google's automatic chat logging is nice too. My first online python
tutorial for someone who never saw it before (sorry for not being in
english):
14/09/08
00:50 KALEL: I'm on Phyton Shell
00:52 me: cool
let's go
type it: 2
just to get rid of your fears... :)
KALEL: Hah hah hah hah
me:
Sorin Schwimmer wrote:
> I just downloaded and compiled Python 2.6 on a Gentoo Linux, IBM NetVista.
>
> After going through the usual steps (./configure, make), I ran a test (make
> test), and got some unexpected issues, which are detailed here:
>
> # ./python Lib/test/test_tcl.py
> Traceback (
Hi Folks,
I copied code from book:
class ScrolledText(Frame):
def __init__(self, parent=None, text='', file=None):
Frame.__init__(self, parent)
self.pack(expand=YES, fill=BOTH)
self.makeWidgets()
self.settext(text, file)
I notice the online docs (at docs.python.org/3.0/index.html) were
updated today. It seems some of the top-level pages, like
Tutorial, "Using Python", "Language Reference" are truncated
after the first few paragraphs.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 2009-04-06 at 15:11 -0400, Victor Subervi wrote:
> Hi:
> I have this code:
>
> x = 1
> while x <= bitties:
> file = open(p + str(x) + ".txt")
> for line in file:
> print line
> print eval(bits[x - 1])
> x += 1
>
> which throws this error:
>
> [Mon Apr 06 12:07:29 2009] [error
On Mon, 06 Apr 2009 23:12:14 +0100, Anish Chapagain
wrote:
Hi,
I was trying to extract wikipedia Infobox contents which is in format
like given below, from the opened URL page in Python.
{{ Infobox Software
| name = Bash
| logo = [[Image:bash-org.png|165px
If no internet connection:
if have files:
run anyway, with warning
else:
ERROR
else:
if error getting hash/files:
if have files:
run anyway, with warning
else:
ERROR
else:
run
--
http://mail.python.org/mailman/listinfo
1 - 100 of 130 matches
Mail list logo