Michael Torrie wrote:
Gabriel wrote:
On Fri, Feb 5, 2010 at 9:08 PM, William Gaggioli wrote:
I'm working on setting up some software for a Peruvian non-profit to help
them organize their incoming volunteers. One of the features I'd like to add
is a calendar-like view of the different v
Steve Holden wrote:
Shashwat Anand wrote:
LOL
pow(funny, sys.maxint)
Yes, funny, but it overlooks the point that Xah is a nuisance to
multiple communities, not just to ours, and quite often concurrently.
I'm all in favor of tolerance, but I'd like to see some evidence that
rehabilitat
danielx wrote:
Is there a convention for how to document function (or method)
parameters in doc strings? Recently, I've been doing alot of PHP
programming, and in PHPdoc, you'd do it like this:
/*
* @param type $foo Description.
*
* @return type Description.
*/
function bar($foo) {
...
}
Klaus Neuner wrote:
Hello,
I am writing a program that analyzes files of different formats. I
would like to use a function for each format. Obviously, functions can
be mapped to file formats. E.g. like this:
if file.endswith('xyz'):
xyz(file)
elif file.endswith('abc'):
abc(file)
...
Y
Aahz wrote:
In article <0efe23a6-b16d-4f92-8bc0-12d056bf5...@z26g2000yqm.googlegroups.com>,
OdarR wrote:
and with eval(), did you try ?
WARNING: eval() is almost always the wrong answer to any question
Some say that eval is evil !
JM
--
http://mail.python.org/mailman/listinfo/py
Carl Banks wrote:
On Feb 8, 12:20 pm, spike wrote:
Has anyone been able to come across a Python logic map or Python logic
flow chart?
An example can be seen on the right under
History:http://en.wikipedia.org/wiki/Usenet#History
This would be very helpful for all users.
Begin
|
I use this one:
Begin
|
|
V
Start Mail client
|
|
V
Ask python-list <-+
| |
| |
Vwhat a bunch of dumbass wait 2 min|
| |
| | No.
V |
Did you get any answer
Jordan Apgar wrote:
I have a simple tcp server and client where the server sits and waits
for a message and then processes it, my client sends its first message
to the server. On the server I receive:
socket.error: [Errno 107] Transport endpoint is not connected
when calling
msg = self.socket.r
Jordan Apgar wrote:
I found my car ;)
here's the server:
class commServer:
"""Class to hold a tcp server and interact with with it
allows for a wrapper around socket class to keep code clean"""
def __init__ (self, host, hostid, port, buff =1024):
self.host = host
se
CyclingGuy wrote:
Can anyone recommend a PostgreSQL driver for Python that supports
selecting and inserting bytea types?
I'm not looking to write server functions in Python, just client
applications.
Thank you
Eric.
Did you try any ?
I know about pgdb, and since it has a function called esca
Jordan Apgar wrote:
http://docs.python.org/library/socketserver.html
JM
each time a handler is spawned is it client specific? in other words
when two clients send something to the server do handlers spawn for
each of them or does everything just go into a single handler?
docstring of
Grant Edwards wrote:
What's the correct way to measure small periods of elapsed
time. I've always used time.clock() in the past:
start = time.clock()
[stuff being timed]
stop = time.clock()
delta = stop-start
However on multi-processor machines that doesn't work.
Sometimes I get
Jordan Apgar wrote:
thanks JM,
at this point i switched over to this scheme and now I'm getting an
error durring instantiation of the server:
Server.py:
from Crypto.PublicKey import RSA
from ServerNegotiator import ServerNegotiator
from sharedComs import *
f = open("hostid")
tup = stringToTuple
Quin wrote:
s = f.readline()
if 'mystring' in s: print 'foundit'
if 'mystring' not in s: print 'not found'
if 'mystring' in s:
print 'processing'
this generates output:
not found
processing
so, it doesn't find the substring, but goes into processing code anyway.
This is using IronPython
Th
Quin wrote:
Thanks guys, I'm thinking it's a problem with IronPython. I'm
switching to PyScripter and will test tomorrow.
I'm willing to bet money that it is not. If ironPython had a broken if
statement, don't you think we would have known, already ?
There's a rule when test writing/testin
Quin wrote:
Well, now you know!
"Jean-Michel Pichavant" wrote in message
news:mailman.2286.1265797348.28905.python-l...@python.org...
Quin wrote:
Thanks guys, I'm thinking it's a problem with IronPython. I'm
switching to PyScripter and will test tomorrow.
I
Quin wrote:
You know, Jack, that was the point of my original post: to determine
why things weren't working. Do you still want to bet money that it
is? I can screenshot you TD.
Another flaming war starting...
IronPython implements python 2.5 and you're still complaining about your
py3 cod
Vision wrote:
hi all,
I am doing some stuffs with some software, which has similar layout
like this:
Editbox1
Editbox2
Editbox3
_OK_
___
|output|
|output|
|output|
|output|
|output
Jordan Apgar wrote:
I'm trying to right a server that needs specific information for each
client accessing it. The easiest way I could think of doing this is
keeping this information based on ip address (the information is only
valid for a short time). I know there is no was to get the client's
Stephen Hansen wrote:
On Wed, Feb 10, 2010 at 5:36 PM, Jean-Michel Pichavant
mailto:jeanmic...@sequans.com>> wrote:
I don't know exactly what you are trying to do, but if your server
requires informations from the client, it would be better to ask
explicitly the clien
Bob Martin wrote:
in 16 20100212 034121 Paul Rubin wrote:
See http://en.wikipedia.org/wiki/Colossus_computer
That was almost at the end of the war though.
Colossus was working by the end of 1943 - the year that the Americans first
dropped
bombs on Germany ;-)
sept 1939 -
PeroMHC wrote:
Hi All, I have a simple problem that I hope somebody can help with. I
have an input file (a fasta file) that I need to edit..
Input file format
name 1
tactcatacatac
name 2
acggtggcat
name 3
gggtaccacgtt
I need to concatenate the sequences.. make th
Martin wrote:
Hi,
I am trying to come up with a more generic scheme to match and replace
a series of regex, which look something like this...
19.01,16.38,0.79,1.26,1.00 ! canht_ft(1:npft)
5.0, 4.0, 2.0, 4.0, 1.0 ! lai(1:npft)
Ideally match the pattern to the right of the "!" sign (e.g
Martin wrote:
On Feb 15, 2:03 pm, Jean-Michel Pichavant
wrote:
Martin wrote:
Hi,
I am trying to come up with a more generic scheme to match and replace
a series of regex, which look something like this...
19.01,16.38,0.79,1.26,1.00 ! canht_ft(1:npft)
5.0, 4.0, 2.0
Benedict Verheyen wrote:
Hi,
i wanted to ask how you guys structure your code.
I mainly have scripts that automate small tasks.
These scripts use a common set of utility code.
My code is structured like this, for example:
script_1.py
script_2.py
script_3.py
tools\
|->__init__.py
|->logu
Paulo Repreza wrote:
Greetings,
I'm having problems with a little script that I'm trying to finish, I
don't know if I'm in the right track but I know somebody is going to
help me.
The script:
# Import modules random for function randint
import random
# Generating a constant.
var = 65
#
mierdatutis mi wrote:
Hi,
I have this:
pe="http://www.rtve.es/mediateca/videos/20100211/saber-comer---patatas-castellanas-costillas-11-02-10/691046.shtml";
I would like to extract this: 691046.shtml
But is dynamically. Not always have the same lenght the string.
Could you help me how could
Arnaud Delobelle wrote:
Leo Breebaart writes:
Chris Rebert writes:
On Mon, Feb 15, 2010 at 10:29 AM, Leo Breebaart wrote:
I have a base class Foo with a number of derived classes FooA,
FooB, FooC, etc. Each of these derived classes needs to read
(upon initialisation) text
Benedict Verheyen wrote:
sstein...@gmail.com wrote:
On Feb 16, 2010, at 3:28 AM, Benedict Verheyen wrote:
python_scripts
|
|-->trunk
..|-> my big script 1
|-> setup.py
..|-> my big script 2
|-> setup.py
..|-> database
R (Chandra) Chandrasekhar wrote:
Dear Folks,
I am currently developing a python program, let us call it
"generic.py", and I am testing out the functions therein by testing
them out interactively in the python interpreter by invoking python
and doing
import generic
Once I hit an error, I ne
mk wrote:
Stephen Hansen wrote:
You don't have to (and can't) refer to the class within the body.
Class statements are sort of... odd. They are code which is directly
executed, and the results are then passed into a
metaclass/type/whatever and a class object is created. While within
the clas
Sreejith K wrote:
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
On Feb 17, 10:48 pm, Sreejith K wrote:
Hi everyone,
I need to implement custom import hooks for an application
(http://www.python.org/dev/peps/pep
Sreejith K wrote:
On Feb 18, 3:49 pm, Jean-Michel Pichavant
wrote:
Sreejith K wrote:
On Feb 18, 1:57 pm, Steven D'Aprano
wrote:
On Thu, 18 Feb 2010 00:03:51 -0800, Jonathan Gardner wrote:
On Feb 17, 10:48 pm, Sreejith K wrote:
Hi eve
Andrey Fedorov wrote:
It may be intuitive to you, but its not true, written down
anywhere, nor assumed by the language, and the mathematical
meaning of the operators doesn't matter to Python. Python
purposefully does not enforce anything for these methods.
Right, so neither is
SiWi wrote:
On Feb 19, 5:10 pm, "D'Arcy J.M. Cain" wrote:
On Fri, 19 Feb 2010 07:52:59 -0800 (PST)
SiWi wrote:
So I wondered if it was possible to send the Python code I'm
developing on the netbook to the workstation pc via wlan, let the
script execute on the workstation pc and write
Steven D'Aprano wrote:
I have a convention when writing unit tests to put the target of the test
into a class attribute, as follows:
class MyTest(unittest.TestCase):
target = mymodule.someclass
def test_spam(self):
"""Test that someclass has a spam attribute."""
self.fa
Hi!
> Symbolic links are available in NTFS starting with Windows Vista.
No.
Hardlink come with NTFS, and already exists in W2K (and NT with specifics
utilities).
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
Where (directory) are you, when the problem come?
Have you try with UAC disabled?
@+
--
MCI
--
http://mail.python.org/mailman/listinfo/python-list
Arnaud Delobelle wrote:
lallous writes:
Hello
How can I do something similar to pure virtual functions in C++ ?
Let us consider this:
class C1:
# Pure virtual
def cb(self, param1, param2):
"""
This is a callback
@param param1: ...
@param param2:
Michael Rudolf wrote:
Just a quick question about what would be the most pythonic approach
in this.
In Java, Method Overloading is my best friend, but this won't work in
Python:
>>> def a():
pass
>>> def a(x):
pass
>>> a()
Traceback (most recent call last):
File "", line 1, in
Michael Rudolf wrote:
First: Thanks for all the replies so far, they really helped me.
Am 24.02.2010 11:28, schrieb Jean-Michel Pichavant:
>>> def a(x=None):
if x is None:
pass
else:
pass
This is the way to do it python, and it has its advantages: 1 docstri
Jean-Michel Pichavant wrote:
Michael Rudolf wrote:
First: Thanks for all the replies so far, they really helped me.
Am 24.02.2010 11:28, schrieb Jean-Michel Pichavant:
>>> def a(x=None):
if x is None:
pass
else:
pass
This is the way to do it python, and i
lallous wrote:
I still prefer not to call at all, even if it was an empty function.
Regards,
Elias
Is there any way we could convince you that there is no point caring
about this ? Even if you were trying to optimize speed, it would still
require proof that an empty function is part of th
lallous wrote:
Thank you all for the replies.
The solution using Python 3's syntax look very intuitive.
Thanks Tim, Arnaud for the idea (I am using 2.x)
--
Elias
On Feb 25, 1:28 pm, lallous wrote:
Hello
I am still learning Python, and have a question, perhaps I can shorten
the code:
L =
Joan Miller wrote:
When a package is imported, it gets the dosctring to store it in
*__doc__*.
Does that funcion is built in python? because I would want use it to
get the docstring without import a package
Epydoc, a documentation builder is able to do so with the --parse-only
option. You co
Andreas Waldenburger wrote:
On Thu, 25 Feb 2010 12:51:00 -0800 (PST) John Roth
wrote:
On Feb 24, 1:23 pm, Andreas Waldenburger
wrote:
a company that works with my company writes a lot of of their code
in Python (lucky jerks). I've seen their code and it basically
looks like this:
""
Andreas Waldenburger wrote:
On Fri, 26 Feb 2010 09:09:36 -0600 Tim Daneliuk
wrote:
On 2/24/2010 2:23 PM, Andreas Waldenburger wrote:
[stuff]
Reminiscent of:
mov AX,BX ; Move the contents of BX into AX
Well, there might be some confusion there as to what
Roy Smith wrote:
In article ,
Tim Daneliuk wrote:
On 2/24/2010 2:23 PM, Andreas Waldenburger wrote:
Hi all,
a company that works with my company writes a lot of of their code in
Python (lucky jerks). I've seen their code and it basically looks like
this:
"""Function that does stuff
MRAB wrote:
Gregory Ewing wrote:
Mel wrote:
You could think of it as a not bad use of the design principle
"Clear The Simple Stuff Out Of The Way First". Destinations are
commonly a lot simpler than sources
That's not usually true in assembly languages, though,
where the source and destina
Gabor Urban wrote:
Hi guys,
I am building a nested data structure with the following compontens:
<>
class Item:
def __init__(self, pId, pChange, pComment):
self.ID = pId
self.Delta = pChange
self.Comment = pComment
def PrintItem(self):
str = '%s,%s,%s'%
Andreas Waldenburger wrote:
On Tue, 02 Mar 2010 03:18:30 +1100 Lie Ryan wrote:
On 03/02/10 00:09, Andreas Waldenburger wrote:
On Mon, 1 Mar 2010 05:01:49 -0800 (PST) alex23
wrote:
Andreas Waldenburger wrote:
But as I said: a) I am (we are) not in a position to imp
Roy Smith wrote:
>From inside a module, I want to add a key-value pair to the module's
__dict__. I know I can just do:
FOO = 'bar'
at the module top-level, but I've got 'FOO' as a string and what I
really need to do is
__dict__['Foo'] = 'bar'
When I do that, I get "NameError: name '__dict__'
Andreas Waldenburger wrote:
On Tue, 02 Mar 2010 09:48:47 +1100 Ben Finney
wrote:
It's not our concern.
Then I don't see what that problem is.
There is none. I was griping about how stupid they are. That is a
personal problem I have with their *code* (not software), and I tho
Wanderer wrote:
On Mar 3, 2:33 pm, Robert Kern wrote:
On 2010-03-03 11:39 AM, Wanderer wrote:
Pylint W0221 gives the warning
Argument number differs from overridden method.
Why is this a problem? I'm overriding the method to add additional
functionality.
There are exce
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is exited
via an exception." This is precisely what the try: finally: syntax is
for.
You'd have to nest it. That's ugly. And more importantly,
Alf P. Steinbach wrote:
* Jean-Michel Pichavant:
Alf P. Steinbach wrote:
From your post, the scope guard technique is used "to ensure some
desired cleanup at the end of a scope, even when the scope is
exited via an exception." This is precisely what the try: finally:
syntax is for
Michael Rudolf wrote:
Am 04.03.2010 17:32, schrieb Jean-Michel Pichavant:
It looks like to me that 'with' statements are like decorators:
overrated.
Oh no, you just insulted my favourite two python features, followed
immediately by generators, iterators and list comprehensions /
Pete Emerson wrote:
I've written my first python program, and would love suggestions for
improvement.
I'm a perl programmer and used a perl version of this program to guide
me. So in that sense, the python is "perlesque"
This script parses /etc/hosts for hostnames, and based on terms given
on t
Robert Kern wrote:
On 2010-03-04 15:12 , Mike Kent wrote:
On Mar 4, 12:30 pm, Robert Kern wrote:
He's ignorant of the use cases of the with: statement, true.
Ouch! Ignorant of the use cases of the with statement, am I?
Odd, I use it all the time.
No, I was referring to Jean-M
Duncan Booth wrote:
Jean-Michel Pichavant wrote:
You've already been given good advices.
Unlike some of those, I don't think using regexp an issue in any way.
Yes they are not readable, for sure, I 100% agree to that statement, but
you can make them readable very easily.
# no
Kamil Wasilewski wrote:
Hi,
Ive got an issue where a variable name needs to have a minus sign (-) in it.
#Python 2.6
from SOAPpy import WSDL
wsdlFile = "http://webapi.allegro.pl/uploader.php?wsdl";
server = WSDL.Proxy(wsdlFile)
server.soapproxy.config.argsOrdering = {'doGetCountries': ['country
Steven D'Aprano wrote:
On Fri, 05 Mar 2010 18:14:16 +0100, mk wrote:
isinstance(False, int)
True
>>>
>>> isinstance(True, int)
True
Huh?
Yes. Do you have an actual question?
>>> issubclass(bool, int)
True
Huh?!
Exactly.
Bools are a late-comer to Python.
Pete Emerson wrote:
On Mar 5, 1:14 pm, Chris Rebert wrote:
On Fri, Mar 5, 2010 at 12:25 PM, Pete Emerson wrote:
On Fri, Mar 5, 2010 at 12:17 PM, Chris Rebert wrote:
On 3/5/10, Pete Emerson wrote:
In a module, how do I create a conditional that will do something
bas
Johny wrote:
I have this directory structure
C:
\A
__init__.py
amodule.py
\B
__init__.py
bmodule.py
\D
__init__.py
dmodule.py
and I want to import bmodule.py
C:\>cd \
C:\>python
Python 2.5 (r25:51908, S
News123 wrote:
Jean-Michel Pichavant wrote:
Johny wrote:
I have this directory structure
C:
\A
__init__.py
amodule.py
\B
__init__.py
bmodule.py
\D
__init__.py
dmodule.py
and I want to import
Daniel Klein wrote:
Hey,
I did a little searching and couldn't really find much recent on this.
The only thing I found was this:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/a696624c92b91181/5b7479fdc3362b83?lnk=gst&q=break+named+loop#5b7479fdc3362b83
Basically I'm wond
Lars Stavholm wrote:
Hi all,
has anyone managed to integrate pexpect and logging?
I.e., I'd like to be able to pick up the dialog,
commands sent and responses received, in my logging.
I know about the pexpect logfile, and I can log things
to stdout or stderr, but I really need to log using the
JEHERUL wrote:
Dear All
I am trying to telnet to a Cisco router . Following is my code .
#code router.py
import getpass
import sys
import telnetlib
HOST = "router address" # router address is ommitted for
security reason
user = raw_input("Username : ")
password = getpass.getpa
Hellmut Weber wrote:
Hi Vinay Sajip,
I'm very glad discoverd your logging module ;-)
(That's what I would have liked 25 years ago when I was working as a
technical software developper!)
Now I'm writing just some personal tools, I like python and want to
use logging on a regular basis.
Loggi
PEYMAN ASKARI wrote:
Hello
I need some help dynamically reloading modules. As it turns out, it is
not as simple as calling reload, as outlined here
http://pyunit.sourceforge.net/notes/reloading.html
Is there builtin support for this? The example they gave does not seem
to work for me, and I
Hi !
Install a resident soff (script) by task-planified, in Administrator
rights. Then, call this script from current work, for bypass UAC.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
News123 wrote:
Jonathan Gardner wrote:
On Thu, Mar 11, 2010 at 6:57 AM, gb345 wrote:
And even when we've had volunteers, hardly anyone shows up!
Any suggestions would be appreciated.
Two things: One, only you and your friend really care. Let that sink
in. No one is going to c
Luis M. González wrote:
On Mar 12, 10:59 am, hiral wrote:
Hi,
Is there any way to create variables which name matches with dict key?
For example:
dict1 = {"abc":'1", "def":"2"}
Now I am looking to have variable name abc and it's value be '1' etc.
Pl. suggest.
Thank you.
Check out
JLundell wrote:
I've got a subclass of fractions.Fraction called Value; it's a mostly
trivial class, except that it overrides __eq__ to mean 'nearly equal'.
However, since Fraction's operations result in a Fraction, not a
Value, I end up with stuff like this:
x = Value(1) + Value(2)
where x is
Am Montag, den 15.03.2010, 05:42 -0700 schrieb Michael.Lausch:
On Mar 15, 11:40 am, Steven D'Aprano wrote:
On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote:
Hi,
I managed to get confused by Python, which is not such an easy task.
The problem i have is root
Steve Holden wrote:
pyt...@bdurham.com wrote:
Any reason you prefer PDB over WinPDB?
http://winpdb.org/
Yes. I don't have Windows except one one PC :P
WinPDB runs on non-Windows platforms :)
One might reasonably argue that it has a pretty couter-intuitive name, then.
vsoler wrote:
Hello,
I am still learning python, thus developnig small scripts.
Some of them consist only of the main module. While testing them
(debugging) I sometimes want to stop the script at a certain point,
with something likestop, break, end or something similar.
What statement ca
Jean-Michel Pichavant wrote:
vsoler wrote:
Hello,
I am still learning python, thus developnig small scripts.
Some of them consist only of the main module. While testing them
(debugging) I sometimes want to stop the script at a certain point,
with something likestop, break, end or
samb wrote:
Hi,
I've found a work around, inspired from Rob Williscroft :
class ReMatch(object):
"""
Object to be called :
1st time : do a regexp.match and return the answer (args:
regexp, line)
2nd time : return the previous result (args: prev)
"""
def __cal
Hellmut Weber wrote:
Am 11.03.2010 12:14, schrieb Peter Otten:
Hellmut Weber wrote:
Logging works very well giving the filename and line number of the
point
where it is called. As long as I use the loggers directly.
BUT when I have to wrap the logger call in some other function, I
always
ge
Peter Otten wrote:
Jean-Michel Pichavant wrote:
Hellmut Weber wrote:
Am 11.03.2010 12:14, schrieb Peter Otten:
Hellmut Weber wrote:
Logging works very well giving the filename and line number of the
point
where it is called. As long as I use the loggers directly
Spencer Pearson wrote:
Hi!
This might be more of a personal-preference question than anything,
but here goes: when is it appropriate for a function to take a list or
tuple as input, and when should it allow a varying number of
arguments? It seems as though the two are always interchangeable. For
News123 wrote:
Hi,
I wondered about the best way, that a module's function could determine
the existance and value of variables in the __main__ module.
What I came up with is:
### main.py ##
import mod
A = 4
if __name__ == "__main__": mod.f()
### mod.py ##
def
kj wrote:
I have a list of items L, and a test function is_invalid that checks
the validity of each item. To check that there are no invalid
items in L, I could check the value of any(map(is_invalid, L)).
But this approach is suboptimal in the sense that, no matter what
L is, is_invalid will be
kj wrote:
Arguably, Knuth's "premature optimization is the root of all evil"
applies even to readability (e.g. "what's the point of making code
optimally readable if one is going to change it completely next
day?")
The guy who will change it will have to read it. The only waste would be
if the
Peter Otten wrote:
Vinay Sajip wrote:
Sorry I'm a little late to this discussion. I could add a _findCaller
function to the module (not part of the public API, but replaceable by
someone who really needs to) which does the heavy lifting, and
Logger.findCaller just calls it. Then those who ne
C. B. wrote:
Hi everyone,
I'm currently coding a C library which provides several modules and
objects.
Let's say that some of these objects are classes called AAA and BBB.
The constructor of AAA needs to get BBB as argument.
So I can run the following code :
from mymodule import AAA
from mymo
Ovidiu Deac wrote:
Then I tried this:
file = logging.FileHandler(logFileBasename, 'w')
file.setLevel(logging.INFO)
# set a format which is simpler for console use
formatter = logging.Formatter('%(asctime)s %(name)-12s
%(levelname)-8s %(message)s',)
# tell the handler to use th
Ovidiu Deac wrote:
You set le level of your handler, but did not set the level of the logger
itself.
Replace file.setLevel(logging.INFO) by
logging.getLogger().setLevel(logging.INFO)
Log events are matched versus the logger level 1st, then the handler level
(if applicable). Most of the time you
kj wrote:
What's the word on using "classes as namespaces"? E.g.
class _cfg(object):
spam = 1
jambon = 3
huevos = 2
breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos)
Granted, this is not the "intended use" for classes, and therefore
could be viewed as a misuse ("that's what dic
Jonathan Hartley wrote:
On Mar 26, 6:26 pm, Luis M. González wrote:
On 26 mar, 11:49, kj wrote:
What's the word on using "classes as namespaces"? E.g.
class _cfg(object):
spam = 1
jambon = 3
huevos = 2
breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos)
C. B. wrote:
[snip]
It takes time to write the relative importations, that's ok, but I
think it could be more pleasant for the end-user to not have to write
a huge list of "from mymodule import xxx" if it is possible to take
advantage of automatic importations.
Cheers,
In that particular ca
John Nagle wrote:
Jonathan Hayward wrote:
I've posted "Usability, the Soul of Python: An Introduction to the
Python Programming Language Through the Eyes of Usability", at:
http://JonathansCorner.com/python/
No, it's just a rather verbose introduction to Python, in dark brown
type on a
Richard Lamboj wrote:
Hello,
are there any python bindings for libpst?
http://www.five-ten-sg.com/libpst/
https://alioth.debian.org/projects/libpst/
Kind Regards
Richi
http://www.lmgtfy.com/?q=libpst+python
3rd hit
Cheers,
JM
--
http://mail.python.org/mailman/listinfo/python-list
Hi!
> side-by-side configuration is incorrect
Others have given you an explanation.
A possibility: you use a DLL directly, without having installed.
That is OK with some DLL, and no OK with others DLL.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Roger Davis wrote:
Hi all,
[snip]
Roger Davis
# code follows
#!/usr/bin/python
import sys
import subprocess
def main():
psargs= ["/bin/ps", "-e"]
try:
ps= subprocess.Popen(psargs, stdout=subprocess.PIPE,
close_fds=True)
psout= ps.comm
Roger Davis wrote:
Completely off topic but I think the try clause could be rewritten that way:
...
Don't use bare except clause, you're masking syntax errors for instance,
which will be flagged as 'unexpected error in generation ...".
In a more general manner, if something unexpected happens it'
Tim Harig wrote:
On 2010-11-18, noydb wrote:
I have an executable that I want to run within python code. The exe
requires an input text file, the user to click a 'compute' button, and
then the exe calculates several output values, one of which I want to
capture into a variable. Can I use P
tazz_ben wrote:
Hi Folks -
I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't anything in it that is dependen
Hello!
You will find (positive) answers in PyWin32 and his examples.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
701 - 800 of 1250 matches
Mail list logo