will try some other
language.
Reid
--
http://mail.python.org/mailman/listinfo/python-list
Hello All
Thanks for taking the time to answer my question. I do not need 3d stuff.
Just a couple of buttons and menu's. The reason I am looking at python is it
is free to download. I cannot afford VB or other commercial languages.
Reid
--
http://mail.python.org/mailman/listinfo/python-list
Looking at the docs for warnings.simplefilter
(http://docs.python.org/2/library/warnings.html) I think the following
script should only produce one warning at each line as any message is
matched by the simple filter
import warnings
warnings.simplefilter('default')
for i in xrange(2):
warnings.
'Ham'
(I suppose I could call __import__(self.__module__), but that seems kind
of awkward.)
Is this possible using Python 2.3? Any better ways to accomplish this?
Thanks very much for any help,
Reid
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I need to write a web interface for some computational biology software
I've written:
http://sysbio.mrc-bsu.cam.ac.uk/johns/STEME/rst/_build/html/index.html
I don't have much experience writing web sites or applications. Can
anyone recommend a python framework that will allow me to easily
On 12/09/11 19:37, Stefaan Himpe wrote:
The simplest one to learn is web2py http://www.web2py.com
No configuration needed, just unpack and get started.
It also has very good documentation and tons of little examples to get
things done.
The other options you mentioned are good too :)
OK I've h
Hi,
I was hoping namedtuples could be used as replacements for tuples in all
instances. There seem to be some differences between how tuples and namedtuples
are created. For example with a tuple I can do:
a=tuple([1,2,3])
with namedtuples I get a TypeError:
from collections import namedtuple
On 18/02/13 12:05, Oscar Benjamin wrote:
> On 18 February 2013 12:03, Oscar Benjamin wrote:
>> On 18 February 2013 11:47, John Reid wrote:
>>> I'm seeing this problem because of the following code in IPython:
>>>
>>> def canSequence(obj):
>>>
On 18/02/13 12:03, Oscar Benjamin wrote:
> On 18 February 2013 11:47, John Reid wrote:
>> Hi,
>>
>> I was hoping namedtuples could be used as replacements for tuples in all
>> instances.
> namedtuples are not really intended to serves as tuples anywhere.
On 18/02/13 12:11, Dave Angel wrote:
> On 02/18/2013 06:47 AM, John Reid wrote:
>> Hi,
>>
>> I was hoping namedtuples could be used as replacements for tuples in
>> all instances. There seem to be some differences between how tuples
>> and namedtuples are created.
On 18/02/13 14:12, Oscar Benjamin wrote:
> On 18 February 2013 13:51, John Reid wrote:
>> On 18/02/13 12:03, Oscar Benjamin wrote:
>>> On 18 February 2013 11:47, John Reid wrote:
>>>> Hi,
>>>>
>>>> I was hoping namedtuples could be
On 18/02/13 14:15, Oscar Benjamin wrote:
> On 18 February 2013 14:09, John Reid wrote:
>> On 18/02/13 12:11, Dave Angel wrote:
>>> On 02/18/2013 06:47 AM, John Reid wrote:
>>>> Hi,
>>>>
>>>> I was hoping namedtuples could be used as replac
On 18/02/13 14:53, Oscar Benjamin wrote:
> On 18 February 2013 14:23, John Reid wrote:
> [snip]
>> That said it would be nice to know the rationale for
>> namedtuple.__new__ to have a different signature to tuple.__new__. I'm
>> guessing namedtuple._make has a simil
On 19/02/13 00:18, Steven D'Aprano wrote:
> Terry Reedy wrote:
>
>> On 2/18/2013 6:47 AM, John Reid wrote:
>>
>>> I was hoping namedtuples could be used as replacements for tuples
>> > in all instances.
>>
>> This is a mistake in the
On 19/02/13 01:47, alex23 wrote:
> On Feb 18, 9:47 pm, John Reid wrote:
>> See http://article.gmane.org/gmane.comp.python.ipython.user/10270 for more
>> info.
>
> One quick workaround would be to use a tuple where required and then
> coerce it back to Result when
re running on Linux.
Any ideas?
Thanks very much for any help.
Reid
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 06 Sep 2006 09:29:59 -0700, Paul Rubin wrote:
> Reid Priedhorsky <[EMAIL PROTECTED]> writes:
>> I know how to forward ports using SSH, but I don't like doing this because
>> then anyone who knows the port number can connect to Postgres over the
>> same t
On Thu, 07 Sep 2006 18:36:32 -0700, Paul Rubin wrote:
> Reid Priedhorsky <[EMAIL PROTECTED]> writes:
>> > Wouldn't they need a database password?
>>
>> Well, right now, no. I have Postgres configured to trust the OS on who is
>> who.
>
> You
Hi folks,
I'm looking for an open-source Python implementation of A* search for use
in a mapping application.
As the star is an operator in Google, I haven't figured out how to
formulate a useful search. :/
Any help would be very much appreciated.
Reid
--
http://mail.python.o
d like the state to be available for that next request.
A solution might be to send a signal followed by a dummy request, which
seems a bit awkward.
Any other ideas or suggestions?
Thanks in advance,
Reid
p.s. This group's help on A* search was very much appreciated -- just the
t
I've been searching for a something in Python for me to be able to get
the total outbound or inbound bandwidth (in Windows (or cross-OS
compatible). Can anyone help me out? Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Python crashes in glibc with the following stack trace. I'm using an
interface to R (rpy2), ipython, matplotlib, numpy, and scipy with a wx
backend. I'm not sure if the stack trace shows which is the culprit.
I've probably misconfigured one of their installs but knowing which one
to recompile i
Michael Hoffman wrote:
Does anyone here have software they would suggest for making a
presentation that includes Python code? Other than that it would
probably be mainly bullet points. I'm willing to consider TeX- and
HTML-based approaches.
I like pygments for formatting python code. It can g
Scott David Daniels wrote:
Michael Hoffman wrote:
You might take a look at Crunchy, and just do up your talk there.
Crunchy is a Python program that combines an otherwise static html
document with an interactive Python session within a browser
http://code.google.com/p/crunchy/
IPython off
Neal Becker wrote:
IPython offers something similar for giving demos. I've found that very
useful in the past.
Really? Any pointers?
http://ipython.scipy.org/doc/manual/html/api/generated/IPython.demo.html
--
http://mail.python.org/mailman/listinfo/python-list
Edward Grefenstette wrote:
I'm typing up my master's thesis and will be including some of the
code used for my project in an appendix. The question is thus: is
there a LaTeX package out there that works well for presenting python
code?
verbatim is a bit ugly and doesn't wrap code, and while the
Alan G Isaac wrote:
The listings package is great and highly configurable.
Note that you can also input entire files of Python code
or pieces of them based on markers. Really quite great.
I tried listings. I believe pygments makes better formatted output (at
least out of the box).
--
http:
Edward Grefenstette wrote:
I'm trying to figure out how to use pygments. Are there any good usage
examples out there?
The documentation worked for me: http://pygments.org/docs/cmdline/
There is also a LaTeX package to call pygments at latex compilation time
I forget what that is called thou
age)? Otherwise this technique seems compact and elegant.
Are there other options?
Your help would be much appreciated.
Thanks,
Reid
--
http://mail.python.org/mailman/listinfo/python-list
orks that scale with hardware and how do
> they handle scaling?
This sounds like a good match for Apache with mod_python.
Reid
--
http://mail.python.org/mailman/listinfo/python-list
a lot of stuff that was out of date.
I thought it would be useful to ask here.
Let me know if you have any questions, and thanks very much for any help.
Reid
--
http://mail.python.org/mailman/listinfo/python-list
Mensanator wrote:
On Oct 12, 3:36�am, greg wrote:
Mensanator wrote:
while not done:
� � ...
� � if n==1: done = True
� � ...
Seems to me that 'while not done:' is no better than
'while True:', because in both cases you have to look
inside the loop to find out what the exit condition
is.
Usin
Mensanator wrote:
Nothing wrong with a having a break IMHO.
My opinion is that there is everything wrong with
having a break. I don't think I have ever used one,
I write code that doesn't depend on that crutch.
I guess its crutch-iness is in the eye of the beholder. You seem to have
a dogmat
Mensanator wrote:
No, it's just that the OP was asking whether
avoiding "while True" is considered Best Practice.
How can you answer such a question without sounding
dogmatic?
I was just pointing out your style of programming seems inflexible.
"Just another line that has to be interpreted l
Hi,
I've written a decorator that prints exceptions and I'm having some
trouble with garbage collection.
My decorator is:
import sys
def print_exception_decorator(fn):
def decorator(self, *args, **kwds):
try:
return fn(*args, **kwds)
except:
print '
Thomas Jollans wrote:
The InstanceCounted.count is 1 at the end. If I omit the call to
"self.method = print_exception_decorator(self.method)" then the instance
count goes down to 0 as desired. I thought that the decorator might be
holding a reference to the instance through the bound method, so
Can I check in the interpreter if I am running a debug version of
python? I don't mean if __debug__ is set, I want to know if python was
compiled in debug mode.
Thanks,
John.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I've compiled
Python 2.7 (r27:82500, Nov 2 2010, 09:00:37)
[GCC 4.4.3] on linux2
with the following configure options
./configure --prefix=/home/john/local/python-dbg --with-pydebug
I've installed numpy and some other packages but when I try to run my
extension code under gdb I get the er
and they know a huge
amount about Python web applications. Nothing seems to be too much
trouble for them. They also provide a 60-day money-back guarantee, so
you can try-before-you-buy.
Best wishes,
Alan Harris-Reid
--
On 19:59, PATRICIA MEDINA wrote:
I know there is a converter for python 2.x to executable file, but is
there one for python 3.x yet?
I use cx_Freeze without any problems (//cx-freeze.sourceforge.net/)
HTH
Alan
--
http://mail.python.org/mailman/listinfo/python-list
<http://www.py2exe.org/>
~/santa
On Mon, Mar 21, 2011 at 11:06 AM, Alan Harris-Reid
mailto:a...@baselinedata.co.uk>> wrote:
On 19:59, PATRICIA MEDINA wrote:
I know there is a converter for python 2.x to executable file,
but is there one for python 3.x yet?
I use cx_Freeze wit
P)
Also, regarding PyConfig.h - is this read every time I start Python.exe?
Many thanks,
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
Marco Salden wrote:
On Dec 30, 8:13 pm, Alan Harris-Reid wrote:
Hi there,
In my sys.path (interpreter only, no application loaded), I have the
following strange entries...
'C:\\WINDOWS\\system32\\python31.zip'. This file does not exist
anywhere (although python31.dll doe
Gabriel Genellina wrote:
En Thu, 31 Dec 2009 04:31:06 -0300, Marco
Salden escribió:
On Dec 30, 8:13 pm, Alan Harris-Reid wrote:
Hi there,
In my sys.path (interpreter only, no application loaded), I have the
following strange entries...
'C:\\WINDOWS\\system32\\python31.zip'.
x27;t mind writing my own classes (it will be good practice for me),
but I don't want to re-invent the wheel if it can be avoided.
TIA,
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
alex23 wrote:
On Jan 12, 1:26 pm, Alan Harris-Reid
wrote:
Does anyone know where I can find any decent dynamically-constructed
HTML control classes (dropdown list, table, input field, checkbox, etc.)
written in Python.
There's pyWeb[1], which seems pretty close to what you'
Pierre Quentel wrote:
On 12 jan, 04:26, Alan Harris-Reid wrote:
Hi,
Does anyone know where I can find any decent dynamically-constructed
HTML control classes (dropdown list, table, input field, checkbox, etc.)
written in Python. For example, for a HTML table I would like something
like
Aahz wrote:
In article ,
Alan Harris-Reid wrote:
Does anyone know where I can find any decent dynamically-constructed
HTML control classes (dropdown list, table, input field, checkbox, etc.)
written in Python. For example, for a HTML table I would like something
like...
You might
no serious problems (yet).
I would be interested to hear how other people are using Python 3, and
with what compatible packages.
Regards,
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
should I forget that idea completely?)
3. When a method returns to the calling method, is the connection
automatically closed (assuming the object is local, of course) or does
it have to be done explicitly using connection.close()?
TIA,
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web.py, etc.)
are Python
Exarkun - thanks for the reply
> don't - start with 2.6
Thought you might say that ;-)
Regards,
Alan
On 25 Oct, 11:52 pm, a...@baselinedata.co.uk wrote:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
Anyway, for simple web programming, frameworks are not worth the
hassle. Just use the cgi module.
I can vouch for what Paul says. I started in Python 3 years ago, and I
did so with a web application (still working on it!). I'm using the
cgi approach, and it certainly teaches you th
r a while now). However, it looks as though
I might have to review that decision, but what I've learned so far is
pretty simple stuff, so it won't be wasted.
Regards,
Alan
Alan Harris-Reid writes:
I am very much new to Python, and one of my first projects is a simple
data-based web
Aaron Watters wrote:
On Oct 25, 7:52 pm, Alan Harris-Reid wrote:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none
John Nagle wrote:
Alan Harris-Reid wrote:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1
Until MySQLdb gets ported to something later than Python 2.5, support
for a "data-based web site" probably has to be
Martin v. Löwis wrote:
I am very much new to Python, and one of my first projects is a simple
data-based website. I am starting with Python 3.1 (I can hear many of
you shouting "don't - start with 2.6"), but as far as I can see, none of
the popular python-to-web frameworks (Django, CherryPy, web
mario ruggier wrote:
With respect to to original question regarding web frameworks +
database and Python 3, all the following have been available for
Python 3 since the day Python 3.0 was released:
QP, a Web Framework
http://pypi.python.org/pypi/qp/
Durus, a Python Object Database (the "defaul
In the Python.org 3.1 documentation (section 20.4.6), there is a simple
“Hello World” WSGI application which includes the following method...
def hello_world_app(environ, start_response):
status = b'200 OK' # HTTP Status
headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers
Gerard Flanagan wrote:
Alan Harris-Reid wrote:
In the Python.org 3.1 documentation (section 20.4.6), there is a
simple “Hello World” WSGI application which includes the following
method...
def hello_world_app(environ, start_response):
status ='200 OK' # HTTP Status
headers =(b
Benjamin Kaplan wrote:
On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid
wrote:
In the Python.org 3.1 documentation (section 20.4.6), there is a simple
"Hello World" WSGI application which includes the following method...
def hello_world_app(environ, start_response):
statu
Many thanks to all who replied to my questions re. SQLite connections,
cursors and threading.
Looks like I have got some reading to do regarding connection pooling and
a decent SQLite ORM package. Does anyone know of any which are Python 3
compatible?
Many thanks,
Alanj
--
http://mail.pyth
on?
I am currently using CherryPy 3.2, but I guess the theory could apply to
any HTTP framework or web app..
Any help would be appreciated.
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
Many thanks to all those who replied to my question and clearing-up the
differences between GET and POST. I think I know what to do now - if
not, I'll be back :-)
Regards,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Hi Laszlo,
I use Wing IDE (not free, $35 for personal edition) and PyScripter
(free). I find both good, for different reasons.
Regards,
Alan
Laszlo Nagy wrote:
Hi All,
I know that this question was put up on this
gorauskas wrote:
I installed it on a Windows 7 machine with CPython 2.6.4 and I get the
following error:
Traceback (most recent call last):
File "dreampie.py", line 3, in
File "dreampielib\gui\__init__.pyc", line 73, in
File "dreampielib\gui\load_pygtk.pyc", line 49, in load_pygtk
Import
Chris Colbert wrote:
Do you have gtk and PyGTK installed? Sounds like a missing dependency
to me.
On Tue, Feb 23, 2010 at 6:56 AM, Alan Harris-Reid
mailto:aharrisr...@googlemail.com>> wrote:
gorauskas wrote:
I installed it on a Windows 7 machine with CPython 2.6.4
Hi,
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from a parent class, for example
def mymethod(self):
super().mymethod()
some more code...
Is there any way of writing the code so that the super() call is generic
and automatically recognises the n
³p wrote:
Hi:
On 25 March 2010 11:17, Alan Harris-Reid <mailto:aharrisr...@googlemail.com>> wrote:
Hi,
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from a parent class, for example
def mymethod(self):
super()
Gabriel Genellina wrote:
En Thu, 25 Mar 2010 00:17:52 -0300, Alan
Harris-Reid escribió:
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from a parent class, for example
def mymethod(self):
super().mymethod()
some more code...
Is there any way
Hi,
I am having design problems with date storage/retrieval using Python and
SQLite.
I understand that a SQLite date column stores dates as text in ISO
format (ie. '2010-05-25'). So when I display a British date (eg. on a
web-page) I convert the date using
datetime.datetime.strptime(mydat
To all those who have replied on this thread - many thanks. It looks as
though I've got to look further into date objects, SQLite's native date
functions, detect_types, etc..
Regards,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
When committing data that has originally come from a webpage, sometimes
data has to be converted to a data type or format which is suitable for
the back-end database. For instance, a date in 'dd/mm/' format
needs to be converted to a Python date-object or '-mm-dd' in order
to be
ieving my goal,
I would be grateful for any advice.
Regards,
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
To all those who answered my original post so far (Jon Clements, Terry
Jan Reedy, Philip Semanchuk) - many thanks. Your suggestions have given
me a number of avenues to follow. I'll let you know how I get on.
Regards,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Hi Fred, thanks for the reply.
I have already contacted old clients (those that are still in business),
but unfortunately they have either gone the 'off the shelf' route (ie.
don't use bespoke software any more), or moved-over to .NET, which is a
route which I don't want to follow. Still, at
language was Visual
Foxpro, which had the syntax...
with class1
.attr1 = 1
.attr2 = 2
.attr3 = 3
.attr4 = 4
etc.
endwith
Is there any equivalent to this in Python?
Any help would be appreciated.
Alan Harris-Reid
--
http://mail.python.org/mailman/listinfo/python-list
Jean-Michel Pichavant wrote:
Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to
repeat code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result without having to repeat
Peter Otten wrote:
Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result without having to repeat the
class1
Iain King wrote:
On Apr 20, 2:43 pm, Alan Harris-Reid
wrote:
Hi,
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 =
class1.attr2 =
class1.attr3 =
class1.attr4 =
etc.
Is there any way to achieve the same result without having to repeat
Stefan Behnel wrote:
Alan Harris-Reid, 20.04.2010 15:43:
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result without having to repeat the
Xavier Ho wrote:
On Wed, Apr 21, 2010 at 7:59 AM, Alan Harris-Reid
mailto:aharrisr...@googlemail.com>> wrote:
The code is not usually in class.__init__ (otherwise I would have
used the self. prefix)
Alan, if your variables are not usually in __init__, what's preventin
Chris Rebert wrote:
On Tue, Apr 20, 2010 at 2:59 PM, Alan Harris-Reid
wrote:
Stefan Behnel wrote:
Alan Harris-Reid, 20.04.2010 15:43:
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
Ethan Furman wrote:
Alan Harris-Reid wrote:
The code is not usually in class.__init__ (otherwise I would have
used the self. prefix), but I like your self.__dict__.update(...)
solution and I'll try and remember it.
The code I was thinking of goes something like as follows (don'
Andreas Löscher wrote:
You can do something like this:
class A(): pass
inst=)
exec("""
... a=
... b=2
... c=3
... d=4
... """) in inst.__dict__
inst.a
1
This executes the Statement in the exec function and uses inst.__dict__
as namespace. But be aware, that this
Ryan Kelly wrote:
On Tue, 2010-04-20 at 14:43 +0100, Alan Harris-Reid wrote:
Hi,
During my Python (3.1) programming I often find myself having to repeat
code such as...
class1.attr1 = 1
class1.attr2 = 2
class1.attr3 = 3
class1.attr4 = 4
etc.
Is there any way to achieve the same result
sg.as_string() because no part of
the attachment can have a None value. (Traceback shows "'NoneType'
object has no attribute 'get_content_maintype'" in line 118 of _dispatch
in generator.py, many levels down from msg.as_string())
Has anyone any idea what
Chris Rebert wrote:
On Thu, Apr 29, 2010 at 1:06 PM, Alan Harris-Reid
wrote:
Hi there,
I want to send an email with an attachment using the following code (running
under Python 3.1, greatly simplified to show example)
from email.mime.multipart import MIMEMultipart
from email.mime.text
Hi there,
Using Python 3.1.2 I am having a problem sending binary attachment files
(jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question
is as follows...
for file in self.attachments:
part = MIMEBase('application', "octet-stream")
part.set_payload(open(file,"rb").read()
Any idea how we get rid of this 'noise'? Will it eventually go away if
we ignore it, or is there anything the moderators can do to clean-up
this (normally) wonderful resource for Python programmers?
Regards,
Alan
--
http://mail.python.org/mailman/listinfo/python-list
Hi jf,
I use Beyond Compare (by Scooter Software) for comparing text files and
find it an indespensible tool. You can configure it so that it ignores
tabs/whitespace, or treats spaces and tabs as different characters. Not
sure if it will work with compiled .pyc files, though (but then you
91 matches
Mail list logo