On Nov 6, 5:45 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> > If you had a class that wanted to acquire some external resources that
> > must be released at some point, how would you rewrite the code from my
> > example?
>
> If you *can*, use a context. Use __enter__ and __exit__. Try really
python version 2.5 in module copy
we all know that copy have two method: copy() and deepcopy().
and the explain is
- A shallow copy constructs a new compound object and then (to the
extent possible) inserts *the same objects* into it that the
original contains.
- A deep copy constructs a new
On Nov 7, 3:13 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 6, 2008 at 11:06 PM, <[EMAIL PROTECTED]> wrote:
> > I always have no idea about how to express "conclude the entire word"
> > with regexp, while using python, I encountered this problem again...
>
> > for example, if I wan
Hello
I'm using the urllib2 module and Tor as a proxy to download data
from the web.
Occasionnally, urlllib2 returns 404, probably because of some issue
with the Tor network. This code doesn't solve the issue, as it just
loops through the same error indefinitely:
=
for id in rows:
On 04 Nov 2008 22:34:49 GMT, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
>for i in range(1, 100):
>if i in (4, 34, 40, 44, 48, 54, 57, 67, 76, 83, 89):
>continue
>do_rest_of_processing
Thanks for the sample.
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 4 Nov 2008 15:55:06 -0800 (PST), alex23 <[EMAIL PROTECTED]>
wrote:
> exclusions = [04, 34, 40, 44, 48, 54, 57, 67, 76, 83, 89]
> for i in (x for x in xrange(1,100) if x not in exclusions):
Thanks guys.
--
http://mail.python.org/mailman/listinfo/python-list
Dan Moskowitz wrote:
> I'm using PIL to tint and composite images together. Here's how I'm
> currently tinting images, it's really slow and I know there's got to
> be a better way:
>
> def TintImage( im, tintColor ):
> tint = (tintColor[0]/255.0, tintColor[1]/255.0, tintColor[2]/255.0,
> t
On Thu, 06 Nov 2008 13:08:59 -0800, Dan Moskowitz wrote:
> I'm using PIL to tint and composite images together. Here's how I'm
> currently tinting images, it's really slow and I know there's got to be
> a better way:
>
> def TintImage( im, tintColor ):
> tint = (tintColor[0]/255.0, tintCol
On Thu, Nov 6, 2008 at 11:59 PM, yoma <[EMAIL PROTECTED]> wrote:
> python version 2.5 in module copy
>
> we all know that copy have two method: copy() and deepcopy().
> and the explain is
> - A shallow copy constructs a new compound object and then (to the
> extent possible) inserts *the same obje
> Thanks for the quick reply. Could you provide a link to more
> information on the debug build you refer to?
A modified version of this algorithm should do the trick for my
purposes, it finds the non-containers that gc ignores. I don't care
how long it takes to compute, I just don't want the proc
On Fri, Nov 7, 2008 at 12:05 AM, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> Hello
>
>I'm using the urllib2 module and Tor as a proxy to download data
> from the web.
>
> Occasionnally, urlllib2 returns 404, probably because of some issue
> with the Tor network. This code doesn't solve the
>
> Well, if Python's not installed, the next step is _getting_ it installed --
> whether having your admin install it globally (I mean, who *doesn't* install
> python?! ;-) or you install it locally in your home directory as detailed
> at [1] where you download the source and compile from scratch
On Thu, 06 Nov 2008 23:59:51 -0800, yoma wrote:
> import copy
>
> class A:
> i = 1
>
> class B:
> a = A()
>
>
> b = B()
>
> x=copy.copy(b)
>
> y=copy.deepcopy(b)
>
> print id(x.a), id(b.a)
>
> print id(y.a), id(y.a)
>
> the result:
> 14505264 14505264
> 14505264 14505264
>
> So m
On Nov 6, 8:33 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> On Thu, Nov 6, 2008 at 12:18 PM, SimonPalmer <[EMAIL PROTECTED]> wrote:
> > On Nov 6, 8:11 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote:
> >> On Thu, Nov 6, 2008 at 12:04 PM, SimonPalmer <[EMAIL PROTECTED]> wrote:
> >> > Hi, I am lookin
brasse wrote:
> with nested(Foo('a'), Foo('b', True)) as (a, b):
> print a.tag
> print b.tag
If been watching this thread for a while, and I think that your problems
will go away if you write actual nested with-blocks:
with Foo("a") as a:
with Foo("b") as b:
print a.tag
Hi, I'm using a script.py to write a file in a dir on the server. Mod_python
work but i get:
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line 299,
in HandlerDispatch
result = objec
On Fri, 07 Nov 2008 00:44:21 -0500, Steve Holden wrote:
> Steven D'Aprano wrote:
>> On Thu, 06 Nov 2008 09:59:37 -0700, Joe Strout wrote:
> [...]
>> And by definition, "call by value" means that the parameter is a copy.
>> So if you pass a ten megabyte data structure to a function using
>> call-by
On Fri, 07 Nov 2008 16:05:22 +0530, devi thapa wrote:
> I am using the command
>
> recv(..) to receive a message from client.
>
> retval = recv(my_socket, *buf, len(buf) , 0)
>
> and its giving this error
>
> File "./server1.py", line 31
> retval = recv(my_socket, *buf, len(buf) , 0)
>
SELL OUT land area with 12,681 ha, located at the entrance to the town
of Pazardzhik(Bulgaria) in city limits and has 106 meters
individual . "Dimcho Debelyanov (Miryansko road). A plot in the new
economic zone of the city - in the vicinity has built industrial
enterprises, shops and warehouses. U
On 2008-11-07 11:48, [EMAIL PROTECTED] wrote:
> On Nov 7, 11:20 am, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>
>>> What I am trying to do is to execute it "step-by-step", so that I can
>>> capture the exception if one line (or multi-line statement) fails, print
>>> a warning
I am trying to simulate the execution of some PLC ladder logic in
python.
I manually modified the rungs and executed this within python as a
proof of concept, but I'd like to be able to skip the modification
step. My thought was that this might be able to be completed via
overloading, but I am n
Hey!
My name is Richard
Carlsen. I am trying to create a program/game with the following
plot/requirement in Python (a basic river-crossing game). I have just begun
programming and have read a basics book on Python, but av having problems
getting started with this. I would very much apprecia
Yesterday, I installed PythonCE on my cellphone whose OS is Windows
Mobile 5.I wanted to use numpy as calculation tool.But after I copy
numpy module in my desktop computer into my phone,I find many file
names in directory \numpy were changed into capital letters.For
example:
__init__.py
was chaged
On Nov 7, 10:33 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> brasse wrote:
> > with nested(Foo('a'), Foo('b', True)) as (a, b):
> > print a.tag
> > print b.tag
>
> If been watching this thread for a while, and I think that your problems
> will go away if you write actual nested with-blocks:
On Thu, 06 Nov 2008 03:27:53 -0800, gregory.lielens wrote:
> Hi,
>
> I am using a small python file as an input file (defining constants,
> parameters, input data, ...) for a python application. The input file is
> simply read by an exec statement in a specific dictionary, and then the
> applicat
Hello,
I need some help getting output values from my stored procedures when
using adodbapi. There's an example
testVariableReturningStoredProcedure in adodbapitest.py, and that
works for my system. But my stored procedure also inserts and
accesses a table in the database. Here's what I have it
On Thu, Nov 6, 2008 at 11:00 PM, Ben Finney
<[EMAIL PROTECTED]> wrote:
> Yes, the main reason is that it kills duck typing. The initialiser
> should *use* the parameters passed, and allow exceptions to propagate
> back to the caller if the parameters don't behave as expected.
>
> Another good reaso
On Nov 6, 9:53 pm, Aaron Brady <[EMAIL PROTECTED]> wrote:
> Check out the InteractiveConsole and InteractiveInterpreter classes.
> Derive a subclass and override the 'push' method. It's not documented
> so you'll have to examine the source to find out exactly when and what
> to override.
Thanks,
On Nov 7, 2:40 pm, Holger <[EMAIL PROTECTED]> wrote:
> This is what it looks like in DOS:
> ===
> C:\production>python
> ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
> Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit
> (Intel)] on
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritance
Thanks,
Aaron
--
http://mail.python.org/mailman/listinfo/python-list
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritance
Yes
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 7:48 am, [EMAIL PROTECTED] wrote:
> I am trying to simulate the execution of some PLC ladder logic in
> python.
>
> I manually modified the rungs and executed this within python as a
> proof of concept, but I'd like to be able to skip the modification
> step. My thought was that this mi
darrenr wrote:
Thanks for the quick reply. Could you provide a link to more
information on the debug build you refer to?
Here you are:
http://svn.python.org/projects/python/branches/release25-maint/Misc/SpecialBuilds.txt
--
http://mail.python.org/mailman/listinfo/python-list
On 2008-11-07 15:04, [EMAIL PROTECTED] wrote:
> Hello,
>
> I need some help getting output values from my stored procedures when
> using adodbapi. There's an example
> testVariableReturningStoredProcedure in adodbapitest.py, and that
> works for my system. But my stored procedure also inserts an
On Fri, Nov 7, 2008 at 8:48 AM, <[EMAIL PROTECTED]> wrote:
> I am trying to simulate the execution of some PLC ladder logic in
> python.
>
> I manually modified the rungs and executed this within python as a
> proof of concept, but I'd like to be able to skip the modification
> step. My thought
In article <[EMAIL PROTECTED]>,
Tim Golden <[EMAIL PROTECTED]> wrote:
> Aaron Gray wrote:
> > Wikipedia says Python has Multiple Inheritance, is this true ?
> >
> > http://en.wikipedia.org/wiki/Multiple_inheritance
> >
> > Thanks,
> >
> > Aaron
>
> Good grief. You can use Wikipedia but yo
On Nov 7, 3:50 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> Aaron Gray wrote:
> > Wikipedia says Python has Multiple Inheritance, is this true ?
>
> > http://en.wikipedia.org/wiki/Multiple_inheritance
>
> > Thanks,
>
> > Aaron
>
> Good grief. You can use Wikipedia but you can't use Google?
>
> ht
Mr.SpOOn <[EMAIL PROTECTED]> wrote:
> Now I must pass a and b to the main constructor and calculate them in
> the classmethods.
>
> class foo:
> def __init__(self, a, b):
> self.a = a
> self.b = b
>
> @classmethod
> def from_string(self, ..):
> ...
>
Hello.
I'm trying to make a daemon and I want to log to a file its activity.
I'm using logging module with a configuration file for it (loaded via
fileConfig()).
And now I want to read logging config file before daemonize the program
because the file might not be accessible after daemonization. O
On Nov 2, 6:19 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
> Learning the handful of constructs is the same as learning a handful of
> API calls. The same goes for idiosyncrasies of e.g. inserting
> sub-templates or dealing with repeating content.
I'm not sure I agree with you.
1 - the c
Is there any way to hide portions of an exception stack trace? When
users get exceptions when using pyparsing, there are usually many
layers of pyparsing-internal stack messages that are not at all
helpful in diagnosing the problem - the intervening messages just
divert the user's attention from t
"Roy Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>,
> Tim Golden <[EMAIL PROTECTED]> wrote:
>
>> Aaron Gray wrote:
>> > Wikipedia says Python has Multiple Inheritance, is this true ?
>> >
>> > http://en.wikipedia.org/wiki/Multiple_inheritan
On Fri, 07 Nov 2008 15:16:29 +, Duncan Booth wrote:
> 'from_string' is a bad name here for your factory method: you should try
> to make it clear what sort of string is expected.
When I use a `from_string()` factory I usually make sure it can parse the
`str()` form of that type or that there
Aaron Gray wrote:
"Roy Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
Tim Golden <[EMAIL PROTECTED]> wrote:
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritan
On Nov 6, 2008, at 10:35 PM, Steve Holden wrote:
That's good to hear. Your arguments are sometimes pretty good, and
usually well made, but there's been far too much insistence on all
sides
about being right and not enough on reaching agreement about how
Python's well-defined semantics for ass
Hi all,
Perhaps it's not supposed to work like this but I thought if you
supplied a width to pprint it would nicely format a list to the
width.
KEYS = ['search_keys', 'Section', 'site', 'Employee', 'JobClassCode',
'XBoss', 'Department',
'LocationDesc', 'cn', 'Division', 'Fax', 'Secti
On Nov 7, 4:38 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> Seriously, though, although Python does indeed support multiple inheritance,
> I have the impression from comments over the years that it's used a lot less
> than in other languages where it is more of a common idiom. Certainly in my
> own
Steven D'Aprano wrote:
> On Fri, 07 Nov 2008 00:44:21 -0500, Steve Holden wrote:
>
>> Steven D'Aprano wrote:
>>> On Thu, 06 Nov 2008 09:59:37 -0700, Joe Strout wrote:
>> [...]
>>> And by definition, "call by value" means that the parameter is a copy.
>>> So if you pass a ten megabyte data structur
Aaron Gray wrote:
Wikipedia says Python has Multiple Inheritance, is this true ?
http://en.wikipedia.org/wiki/Multiple_inheritance
Thanks,
Aaron
Good grief. You can use Wikipedia but you can't use Google?
http://www.google.co.uk/search?q=python+multiple+inheritance
TJG
--
http://mail.p
On Thu, 06 Nov 2008 21:31:16 -0700, Joe Strout wrote:
>> You're wrong, Python variables don't contain *anything*. Python
>> variables are names in a namespace.
>
> I think we're saying the same thing. What's a name? It's a string of
> characters used to refer to something. That which refers to
On Nov 8, 1:25 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> Is there any way for me to suppress these non-value-added API-internal
> traceback levels?
Hey Paul,
Have you taken a look at the traceback module?
print_tb(sys.last_traceback, ) or
extract_tb(sys.last_traceback, limit) could do the tr
On Fri, 07 Nov 2008 10:50:55 -0500, Steve Holden wrote:
> I am probably egregiously misunderstanding. The practical difficulty
> with the "moving huge blocks of data" approach would appear to emerge
> when a function that gets passed an instance of some container then
> calls another function that
On Fri, Nov 7, 2008 at 4:16 PM, Duncan Booth
<[EMAIL PROTECTED]> wrote:
> There is a really big advantage to being explicit in this situation: you no
> longer have to make sure that all your constructors use a unique set of
> types. Consider:
>
> class Location(object):
>def __init__(self, lat,
Paul McGuire wrote:
> Is there any way to hide portions of an exception stack trace? When
Add a try...except at the appropriate level. Why do you want to do anything
more complex?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Thanks for that excellent pointer!
I was able to do just what you said with
But if my procedure has an insert statement in its midst, it doesn't
work. The cursor.fetchall() gets an exception.
Any ideas?
--Li
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Fri, 07 Nov 2008 10:50:55 -0500, Steve Holden wrote:
>
>> I am probably egregiously misunderstanding. The practical difficulty
>> with the "moving huge blocks of data" approach would appear to emerge
>> when a function that gets passed an instance of some container then
On Nov 7, 6:36 am, Dan Bishop <[EMAIL PROTECTED]> wrote:
> On Nov 6, 3:46 pm, Astley Le Jasper <[EMAIL PROTECTED]> wrote:
>
> > I've been getting errors recently when using pysqlite. I've declared
> > the table columns as real numbers to 2 decimal places (I'm dealing
> > with money), but when doing
Marc 'BlackJack' Rintsch wrote:
> On Fri, 07 Nov 2008 16:05:22 +0530, devi thapa wrote:
>
>> I am using the command
>>
>> recv(..) to receive a message from client.
>>
>> retval = recv(my_socket, *buf, len(buf) , 0)
>>
>> and its giving this error
>>
>> File "./server1.py", line 31
>> retval
On 7 Nov, 03:02, sturlamolden <[EMAIL PROTECTED]> wrote:
> On Nov 7, 12:22 am, Walter Overby <[EMAIL PROTECTED]> wrote:
>
> > I read Andy to stipulate that the pipe needs to transmit "hundreds of
> > megs of data and/or thousands of data structure instances." I doubt
> > he'd be happy with memcpy
Hello, there.I am using Python 2.5. I used py_compile and made a .pyc file.
However, it runs but never stops. What is the best way tocompile a .py file.I
am trying to customise the attached script to do the following:calling an
external Python script and passing parameters into it.And run the
On Nov 7, 11:20 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> > What I am trying to do is to execute it "step-by-step", so that I can
> > capture the exception if one line (or multi-line statement) fails, print
> > a warning about the failure, and continue the execution fo th
darrenr wrote:
Thanks for the quick reply. Could you provide a link to more
information on the debug build you refer to?
A modified version of this algorithm should do the trick for my
purposes, it finds the non-containers that gc ignores. I don't care
how long it takes to compute, I just don't
Dear All,
I am using Python 2.5 and used py_compile to produce a .pyc file. The
script runs well. However, the .pyc keeps running and never stops.
Advices will be deeply appreciated.
Regards.
David
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 7, 10:30 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Paul McGuire wrote:
> > Is there any way to hide portions of an exception stack trace? When
>
> Add a try...except at the appropriate level. Why do you want to do anything
> more complex?
>
> Peter
I thought I tried that, and now in ret
On Fri, 7 Nov 2008 04:27:04 -0800 (PST), "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
>SELL OUT land area with 12,681 ha, located at the entrance to the town
>of Pazardzhik(Bulgaria) in city limits and has 106 meters
>individual . "Dimcho Debelyanov (Miryansko road). A plot in the new
>economic
This is what it looks like in DOS:
===
C:\production>python
ActivePython 2.5.2.2 (ActiveState Software Inc.) based on
Python 2.5.2 (r252:60911, Mar 27 2008, 17:57:18) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more i
> Here you
> are:http://svn.python.org/projects/python/branches/release25-maint/Misc/S...
Excellent, thank you.
--
http://mail.python.org/mailman/listinfo/python-list
2008/11/7 Robert Singer <[EMAIL PROTECTED]>:
> Now, don't get me wrong if this is a trivial question, or even an
> apsurd one. I'm new to python, so my mileage may vary.
>
> I have several exe files, console applications that pretty much run on
> the principle:
> first.exe
> Enter file name: start
On Fri, 07 Nov 2008 08:48:19 -0700, Joe Strout wrote:
> I think of it this way: every variable is an object reference; no
> special syntax needed for it because that's the only type of variable
> there is. (Just as with Java or .NET, when dealing with any class type;
> Python is just a little mor
On Fri, 07 Nov 2008 18:10:00 +0100
Mario Testinori <[EMAIL PROTECTED]> wrote:
> Unless you're breeding pythons there, you're offtopic.
Arrggghhh!!! Stop responding to spam! Please!
--
D'Arcy J.M. Cain <[EMAIL PROTECTED]> | Democracy is three wolves
http://www.druid.net/darcy/
On Fri, 07 Nov 2008 11:37:28 -0500, Steve Holden wrote:
> Steven D'Aprano wrote:
>> On Fri, 07 Nov 2008 10:50:55 -0500, Steve Holden wrote:
>>
>>> I am probably egregiously misunderstanding. The practical difficulty
>>> with the "moving huge blocks of data" approach would appear to emerge
>>> whe
Astley Le Jasper wrote:
I've been getting errors recently when using pysqlite. I've declared
the table columns as real numbers to 2 decimal places (I'm dealing
with money),
MySQL doesn't have any MONEY type. All it has is INTEGER, REAL, TEXT,
BLOB and NULL types.
but when doing division on
Ok, solved: apache is unable to follow relative paths from the script.
Putting ol absolute paths it's ok!
Simo D wrote:
>
> Hi, I'm using a script.py to write a file in a dir on the server.
> Mod_python work but i get:
> Mod_python error: "PythonHandler mod_python.publisher"
>
> Traceback (most
On Nov 7, 7:48 am, [EMAIL PROTECTED] wrote:
> I am trying to simulate the execution of some PLC ladder logic in
> python.
>
> I manually modified the rungs and executed this within python as a
> proof of concept, but I'd like to be able to skip the modification
> step. My thought was that this mi
On Nov 7, 11:46 am, Paul Boddie <[EMAIL PROTECTED]> wrote:
> As far as I can tell, he wants to keep the data in one place and just
> pass a pointer around between execution contexts.
This would be the easiest solution if Python were designed to do this
from the beginning. I have previously state
Lech Karol Pawłaszek <[EMAIL PROTECTED]> writes:
> Hello.
>
> I'm trying to make a daemon and I want to log to a file its activity.
> I'm using logging module with a configuration file for it (loaded via
> fileConfig()).
>
> And now I want to read logging config file before daemonize the program
>
On Thu, Nov 6, 2008 at 11:00 PM, Ben Finney
<[EMAIL PROTECTED]> wrote:
> Yes, the main reason is that it kills duck typing. The initialiser
> should *use* the parameters passed, and allow exceptions to propagate
> back to the caller if the parameters don't behave as expected.
>
> Another good reaso
Now, don't get me wrong if this is a trivial question, or even an
apsurd one. I'm new to python, so my mileage may vary.
I have several exe files, console applications that pretty much run on
the principle:
first.exe
Enter file name: start.dat
second.exe
Enter file name: filename.dat
... y
On Fri, 07 Nov 2008 17:23:21 +0100, Mr.SpOOn wrote:
> On Fri, Nov 7, 2008 at 4:16 PM, Duncan Booth
> <[EMAIL PROTECTED]> wrote:
>> There is a really big advantage to being explicit in this situation:
>> you no longer have to make sure that all your constructors use a unique
>> set of types. Consid
On Fri, 07 Nov 2008 11:37:28 -0500, Steve Holden wrote:
> Steven D'Aprano wrote:
>> On Fri, 07 Nov 2008 10:50:55 -0500, Steve Holden wrote:
>>
>>> I am probably egregiously misunderstanding. The practical difficulty
>>> with the "moving huge blocks of data" approach would appear to emerge
>>> whe
I use Flex (from adobe) for the client side and turbogears for the
server side and pass xml or json in between. It gives you a Flash
client which is very Sexy and browser independent and very simple
turbogears code in Python.
Flex is essentially open source, but the IDE is about $295, although
the
On Fri, Nov 7, 2008 at 2:28 AM, Chris Rebert <[EMAIL PROTECTED]> wrote:
>
> On Fri, Nov 7, 2008 at 12:05 AM, Gilles Ganault <[EMAIL PROTECTED]> wrote:
> > Hello
> >
> >I'm using the urllib2 module and Tor as a proxy to download data
> > from the web.
> >
> > Occasionnally, urlllib2 returns
Hi,
I am using the command
recv(..) to receive a message from client.
retval = recv(my_socket, *buf, len(buf) , 0)
and its giving this error
File "./server1.py", line 31
retval = recv(my_socket, *buf, len(buf) , 0)
^
SyntaxEr
Dear All,
I am looking for a nitty-gritty Python Ajax script to fire off a
number of processing programmes, periodically checking their
operations, sending messages back to an HTML div form by sending back
the links of generated data files, to be downloaded by end users. I am
using .NET IIS 6.0 an
SELL OUT land area with 12,681 ha, located at the entrance to the town
of Pazardzhik(Bulgaria) in city limits and has 106 meters
individual . "Dimcho Debelyanov (Miryansko road). A plot in the new
economic zone of the city - in the vicinity has built industrial
enterprises, shops and warehouses. U
On Nov 7, 10:40 am, Shao <[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I am using Python 2.5 and used py_compile to produce a .pyc file. The
> script runs well. However, the .pyc keeps running and never stops.
> Advices will be deeply appreciated.
>
> Regards.
>
> David
perhaps you should include t
On Nov 7, 2008, at 10:29 AM, Steven D'Aprano wrote:
Note: I tried to say "name" above instead of "variable" but I
couldn't
bring myself to do it -- "name" seems to generic to do that job.
Lots
of things have names that are not variables: modules have names,
classes
have names, methods hav
You should be able to pass a PyTime or datetime.datetime object.
Roger
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I cannot get the following code to work
>
> import win32com.client
> import time
>
> engine = win32com.client.Dispatch("DAO.DBEngine.36")
> db=en
On Nov 7, 9:45 am, rh0dium <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Perhaps it's not supposed to work like this but I thought if you
> supplied a width to pprint it would nicely format a list to the
> width.
>
> KEYS = ['search_keys', 'Section', 'site', 'Employee', 'JobClassCode',
> 'XBoss', 'Depar
On Nov 7, 12:17 am, Thomas Christensen <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] writes:
> > I took a look to the logging module which was quite sexy at a first
> > sight, but then i finally realized the following : the Logger class
> > can't be extended since a Logger is created only with get
http://www.python.org/doc/2.5.2/lib/module-contextlib.html has this example:
from contextlib import contextmanager
@contextmanager
def tag(name):
print "<%s>" % name
yield
print "" % name
contexlib.contextmanager doc string (2.5.1) says:
Typical usage:
@contextmanager
This is done via a drop handler.
Add registry key
HKCR\Python.File\shellex\DropHandler
with a default value of
{86C86720-42A0-1069-A2E8-08002B30309D}
Roger
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello people,
>
> I'd like to have the functionality known from "r
Joe Strout wrote:
On Nov 6, 2008, at 10:35 PM, Steve Holden wrote:
Note: I tried to say "name" above instead of "variable" but I couldn't
bring myself to do it -- "name" seems to generic to do that job.
Python has two types of names. Some complex objects -- modules,
classes, and functions,
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I need some help getting output values from my stored procedures when
> using adodbapi. There's an example
> testVariableReturningStoredProcedure in adodbapitest.py, and that
> works for my system. But my stored procedure
J Kenneth King wrote:
[...]
> Depends.
>
> For *NIX systems, it's a good idea to use the syslog daemon for logging
> where it's available.
True, however it's more convenient to have certain application logs in
its own place sometimes.
> I believe the logging module can be configured to log to th
> Hi Senior,
>
> There was a case for web site that will be public to Internet for me. I like
> python so I do not consider the use of Ruby on Rails.
>
> I searched more web framework of python from Google. The good solution just
> only there are Django, TurboGears and Pylons.
>
> Just from my pref
> Yes but in the other hand
> :http://docs.python.org/library/logging.html#logger-objects
> "Note that Loggers are never instantiated directly, but always through
> the module-level function logging.getLogger(name)."
That is part of the power of the logging module. If you ask for a
logger of the
Steven D'Aprano wrote:
> On Fri, 07 Nov 2008 11:37:28 -0500, Steve Holden wrote:
>
>> Steven D'Aprano wrote:
>>> On Fri, 07 Nov 2008 10:50:55 -0500, Steve Holden wrote:
>>>
I am probably egregiously misunderstanding. The practical difficulty
with the "moving huge blocks of data" approach
Lech Karol Pawłaszek wrote:
> Hello.
>
> I'm trying to make a daemon and I want to log to a file its activity.
> I'm using logging module with a configuration file for it (loaded via
> fileConfig()).
>
> And now I want to read logging config file before daemonize the program
> because the file m
Steven D'Aprano wrote:
On Fri, 07 Nov 2008 08:48:19 -0700, Joe Strout wrote:
Unfortunately, the term "name" is *slightly* ambiguous in Python. There
are names, and then there are objects which have a name attribute, which
holds a string. This attribute is usually called __name__ but sometimes
1 - 100 of 158 matches
Mail list logo