Re: Beware, my computer was infected.

2012-02-20 Thread Jugurtha Hadjar

On 16/02/2012 01:34, Jugurtha Hadjar wrote:

Hello gentlemen,

I'm writing these words to give you a heads up. My computer has 
recently been infected with "1.exe", and I am doing what I can to 
contain it. It spreads via mail and I fear it will send SPAM to lists 
I am subscribed to.


If you receive weird mails from my address, thank you to report it to 
me. I will not send you an executable, so if you receive one from me, 
please do not open it and it would be nice to report it.


I will  send an e-mail to this list once I think it is no longer in 
the system.


Thank you all.



Everything is under control.


--
~Jugurtha Hadjar,

--
http://mail.python.org/mailman/listinfo/python-list


Re: Beware, my computer was infected.

2012-02-20 Thread Jerry Zhang
By the way, i like 1.exe, can i have it?

在 2012年2月18日 上午6:01,Jugurtha Hadjar 写道:

> On 16/02/2012 01:34, Jugurtha Hadjar wrote:
>
>> Hello gentlemen,
>>
>> I'm writing these words to give you a heads up. My computer has recently
>> been infected with "1.exe", and I am doing what I can to contain it. It
>> spreads via mail and I fear it will send SPAM to lists I am subscribed to.
>>
>> If you receive weird mails from my address, thank you to report it to me.
>> I will not send you an executable, so if you receive one from me, please do
>> not open it and it would be nice to report it.
>>
>> I will  send an e-mail to this list once I think it is no longer in the
>> system.
>>
>> Thank you all.
>>
>>
> Everything is under control.
>
>
>
> --
> ~Jugurtha Hadjar,
>
> --
> http://mail.python.org/**mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: #line in python

2012-02-20 Thread Duncan Booth
Ross Boylan  wrote:

> As an extension or alternate, could there be a decorator like
> @source_line(lineno, filename)
> for classes and methods that could do the conversion on the fly?  I
> don't know if there's a way to go from the function (or class) object
> the decorator receives to the AST.
> 
No [easy] way to go from bytecodes back to AST, but I see no reason why you 
can't create a new code object with your filename and line numbers and then 
create a new function using your modified code object.

If you don't have a 1:1 correspondence of lines then you'll need to pick 
out all the existing line numbers from the code object co_lnotab and modify 
them: see dis.py findlinestarts() for how to do this.

Classes would be harder: the decorator doesn't run until after the class 
body has executed, so you can't change the line numbers that way until it's 
too late. The only thing I can think would be to put all of the generated 
code inside a function and fix up that function with a decorator that scans 
the bytecode to find all contained classes and fix them up.

Or you could generate a .pyc file and then fix up line numbers in the whole 
file: see 
http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html for 
some code that shows you what's in a .pyc

-- 
Duncan Booth http://kupuguy.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: logging with logging.config.fileConfig

2012-02-20 Thread Jean-Michel Pichavant

MRAB wrote:

On 19/02/2012 20:23, Herman wrote:

I tried to use file to config my logger and I got a weird situation
that each message is outputted twice...
Here is my scenario:
python: 2.6

file abc_logging.conf:


[snip]

[logger_abc]
level=DEBUG
handlers=consoleHandler
qualname=abc


Add this line to stop the logging message from being propagated to
higher level (ancestor) loggers:

propagate=0

[snip]




An alternative solution is to add a handler to the root logger only. If 
you don't plan to have specific handling for the abc logger, this is the 
way to go.

Remove "handlers=consoleHandler" from abc section.

Note that %name will still properly identifies the logger that raised 
the event.


JM
--
http://mail.python.org/mailman/listinfo/python-list


Re: [OT]: Smartphones and Python?

2012-02-20 Thread Jean-Michel Pichavant

Michael Torrie wrote:


I do not understand what you are saying, or at least why you are saying
this.  But I don't understand most of your posts.
  

It's a bot. Add it to your kill file.

JM
--
http://mail.python.org/mailman/listinfo/python-list


PyKota, Python: AttributeError: 'module' object has no attribute '_quote'

2012-02-20 Thread JohannesTU
Hello everyone,

I'm new to linux/suse, but I was given the task to install the print
accounting software PyKota.
Before that I never even touched a linux system, so I don't have any basic
knowlegde at all!
Up to now I was able to solve all problems with the help of google, but now
I'm stuck.

My problem:


linux-6n5c:/usr/local/bin # pkusers --add john paul
Creation...
ERROR: PyKota v1.26_official
ERROR: pkusers failed
ERROR: Traceback (most recent call last):
ERROR:   File "/usr/local/bin/pkusers", line 442, in 
ERROR: retcode = manager.main(args, options)
ERROR:   File "/usr/local/bin/pkusers", line 345, in main
ERROR: oldentry = getattr(self.storage, "add%s" % suffix)(entry)
ERROR:   File
"/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 598,
in addUser
ERROR: oldentry = self.getUser(user.Name)
ERROR:   File
"/usr/local/lib/python2.7/site-packages/pykota/storage.py", line 623, in
getUser
ERROR: user = self.getUserFromBackend(username)
ERROR:   File
"/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 355,
in getUserFromBackend
ERROR: % self.doQuote(self.userCharsetToDatabase(username)))
ERROR:   File
"/usr/local/lib/python2.7/site-packages/pykota/storages/pgstorage.py", line
144, in doQuote
ERROR: return pg._quote(field, typ)
ERROR: AttributeError: 'module' object has no attribute '_quote'
 

I have no idea how to deal with it or what it even means!

Executing "linux-6n5c:/usr/local/bin # pkusers" works fine and shows me
commands, version number etc.
But adding users or printers (with pkprinters) won't work.

I would be really thankful if anyone could give me some advice or hints how
to solve the problem!

Kind regards
Johannes 

--
View this message in context: 
http://python.6.n6.nabble.com/PyKota-Python-AttributeError-module-object-has-no-attribute-quote-tp4487915p4487915.html
Sent from the Python - python-list mailing list archive at Nabble.com.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: #line in python (dirty tricks)

2012-02-20 Thread Ross Boylan

Duncan Booth wrote

> Ross Boylan  wrote:
> 
> > As an extension or alternate, could there be a decorator like
> > @source_line(lineno, filename)
> > for classes and methods that could do the conversion on the fly?  I
> > don't know if there's a way to go from the function (or class) object
> > the decorator receives to the AST.
> > 
> No [easy] way to go from bytecodes back to AST, but I see no reason why you 
> can't create a new code object with your filename and line numbers and then 
> create a new function using your modified code object.
Could you elaborate?  I don't understand what you are suggesting.
> 
> If you don't have a 1:1 correspondence of lines then you'll need to pick 
> out all the existing line numbers from the code object co_lnotab and modify 
> them: see dis.py findlinestarts() for how to do this.
> 
> Classes would be harder: the decorator doesn't run until after the class 
> body has executed, so you can't change the line numbers that way until it's 
> too late. The only thing I can think would be to put all of the generated 
> code inside a function and fix up that function with a decorator that scans 
> the bytecode to find all contained classes and fix them up.
> 
> Or you could generate a .pyc file and then fix up line numbers in the whole 
> file: see 
> http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html for 
> some code that shows you what's in a .pyc
> 
My latest concept is to produce code that rewrites itself.  Suppose the
naive file would be
--- mycode.py (naive) 
class SomeClass:
"class comment"

def some_function(self, bar):
pass
- end ---

Protect that code by putting  an "if 0:" in front of it and indenting
each line one space.  Than prepend a bit of code to do the rewriting,
and add indicators of the original line numbers.

--- mycode.py (after wrapping) -
from detangle import detangle
detangle("mycode.py", "mycode.nw")
if 0:
 # original code goes here
 class SomeClass:
"class comment"
 #and when line numbering changes
 #line 35
def some_function(self, bar):
   pass
- end ---
I would write detangle so that it scans through the file in which it
appears (named in the first argument), rewriting so that it appears to
come from the original file (mycode.nw) given in the second argument.

The scanning would look for the "if 0:" in the file.  At that point it
would accumulate code by reading lines and stripping the leading space.
If it found a #line directive it would remember it and then remove it
from the string it was accumulating.  Finally, detangle would would
pass the string of code to ast.compile, catching any syntax errors and
rewriting the file and line number (I might rewrite columns too with an
extension) and then rethrowing them.

If compilation succeeded detangle could rewrite the AST and then exec
it.

Ross

-- 
http://mail.python.org/mailman/listinfo/python-list


HTTP logging

2012-02-20 Thread Jason Friedman
I am logging to HTTP:

logger.addHandler(logging.handlers.HTTPHandler(host, url))

Works great, except if my HTTP server happens to be unavailable:

socket.error: [Errno 111] Connection refused

Other than wrapping all my logger.log() calls in try/except blocks, is
there a way to skip logging to the HTTPhandler if the HTTP server is
unavailable?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTTP logging

2012-02-20 Thread Arnaud Delobelle
On 20 February 2012 16:03, Jason Friedman  wrote:
> I am logging to HTTP:
>
> logger.addHandler(logging.handlers.HTTPHandler(host, url))
>
> Works great, except if my HTTP server happens to be unavailable:
>
> socket.error: [Errno 111] Connection refused
>
> Other than wrapping all my logger.log() calls in try/except blocks, is
> there a way to skip logging to the HTTPhandler if the HTTP server is
> unavailable?

Here's one: subclass HTTPHandler :)

-- 
Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTTP logging

2012-02-20 Thread Jean-Michel Pichavant

Arnaud Delobelle wrote:

On 20 February 2012 16:03, Jason Friedman  wrote:
  

I am logging to HTTP:

logger.addHandler(logging.handlers.HTTPHandler(host, url))

Works great, except if my HTTP server happens to be unavailable:

socket.error: [Errno 111] Connection refused

Other than wrapping all my logger.log() calls in try/except blocks, is
there a way to skip logging to the HTTPhandler if the HTTP server is
unavailable?



Here's one: subclass HTTPHandler :)

  

short answer:

use

> logging.raiseExceptions = 0


long and incomplete answer:

log calls should not raise any exception.

http://docs.python.org/library/logging.html#handler-objects

"Handler.handleError(record)
This method should be called from handlers when an exception is 
encountered during an emit() call. By default it does nothing, which 
means that exceptions get silently ignored. This is what is mostly 
wanted for a logging system - most users will not care about errors in 
the logging system, they are more interested in application errors. You 
could, however, replace this with a custom handler if you wish. The 
specified record is the one which was being processed when the exception 
occurred"

"

However, I looked into the code and find out an (undocumented ?) 
attribute of the logging module : raiseException which value is set to 1 
by default (python 2.5.2 logging.__version__ < '0.5.0.2' > ).


When set to 1, handlerError print the traceback.

This has been probably fixed in recent version of the module since the 
handleError doc does not reference raiseException anymore.


JM
--
http://mail.python.org/mailman/listinfo/python-list


Re: PyKota, Python: AttributeError: 'module' object has no attribute '_quote'

2012-02-20 Thread Peter Otten
JohannesTU wrote:

> Hello everyone,
> 
> I'm new to linux/suse, but I was given the task to install the print
> accounting software PyKota.
> Before that I never even touched a linux system, so I don't have any basic
> knowlegde at all!
> Up to now I was able to solve all problems with the help of google, but
> now I'm stuck.
> 
> My problem:
> 
> 
> linux-6n5c:/usr/local/bin # pkusers --add john paul
> Creation...
> ERROR: PyKota v1.26_official
> ERROR: pkusers failed
> ERROR: Traceback (most recent call last):
> ERROR:   File "/usr/local/bin/pkusers", line 442, in 
> ERROR: retcode = manager.main(args, options)
> ERROR:   File "/usr/local/bin/pkusers", line 345, in main
> ERROR: oldentry = getattr(self.storage, "add%s" % suffix)(entry)
> ERROR:   File
> "/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 598,
> in addUser
> ERROR: oldentry = self.getUser(user.Name)
> ERROR:   File
> "/usr/local/lib/python2.7/site-packages/pykota/storage.py", line 623, in
> getUser
> ERROR: user = self.getUserFromBackend(username)
> ERROR:   File
> "/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 355,
> in getUserFromBackend
> ERROR: % self.doQuote(self.userCharsetToDatabase(username)))
> ERROR:   File
> "/usr/local/lib/python2.7/site-packages/pykota/storages/pgstorage.py",
> line 144, in doQuote
> ERROR: return pg._quote(field, typ)
> ERROR: AttributeError: 'module' object has no attribute '_quote'
>  
> 
> I have no idea how to deal with it or what it even means!

I suppose you have successfully repaired your car, but don't know what an 
engine might be ;)
 
> Executing "linux-6n5c:/usr/local/bin # pkusers" works fine and shows me
> commands, version number etc.
> But adding users or printers (with pkprinters) won't work.
> 
> I would be really thankful if anyone could give me some advice or hints
> how to solve the problem!

The error traceback explained: Python is trying to call a function named 
_quote() in a module named pg. The most likely reason is either that you 
have the wrong version of the module or a module unrelated to the required 
one that has the same name and appears earlier in Python's search path.

You can start debugging with

$ python2.7 -c'import pg; print pg.__file__'

to find out the filename and then look into the corresponding .py file.
If that is related to postgresql you are probably seeing a version mismatch.
Consult PyKota's documentation to find out the program's dependencies.


-- 
http://mail.python.org/mailman/listinfo/python-list


paper submission and versioning system - advice?

2012-02-20 Thread Brian Blais
Hello,

I'd like to find a web-based system to help a committee I'm on, where we 
receive proposals from different faculty.  I wrote something in python, from 
scratch, a number of years ago because there wasn't anything available then but 
it is showing its age and I figured that someone has written something. 

Essentially I need users to be able to start a proposal, with some basic 
information, and then be able to add files to it.  Other users will be allowed 
to add files as well, but I'd like to limit deletions to the committee members. 
 

It seems as if there just has to be available tools like this, but I am not 
even sure what such a system is called.  Is there anything like this, in python 
preferably?


thanks,

Brian Blais

-- 
Brian Blais
[email protected]
http://web.bryant.edu/~bblais
http://brianblais.wordpress.com/



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTTP logging

2012-02-20 Thread Vinay Sajip
On Feb 20, 5:07 pm, Jean-Michel Pichavant 
wrote:

> However, I looked into the code and find out an (undocumented ?)
> attribute of the logging module : raiseException which value is set to 1
> by default (python 2.5.2 logging.__version__ < '0.5.0.2' > ).
>
> When set to 1, handlerError print the traceback.
>
> This has been probably fixed in recent version of the module since the
> handleError doc does not reference raiseException anymore.

Actually, I think it's a mistake in the docs - when they were
reorganised a few months ago, the text referring to raiseExceptions
was moved to the tutorial:

http://docs.python.org/howto/logging.html#exceptions-raised-during-logging

I will reinstate it in the reference API docs, but the answer to
Jason's problem is to either subclass HTTPHandler and override
handleError to suppress the error, or set logging.raiseExceptions to
True (in which case all logging exceptions will be swallowed - not
necessarily what he wants).

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: paper submission and versioning system - advice?

2012-02-20 Thread Andrea Crotti

On 02/20/2012 05:45 PM, Brian Blais wrote:

Hello,

I'd like to find a web-based system to help a committee I'm on, where we 
receive proposals from different faculty.  I wrote something in python, from 
scratch, a number of years ago because there wasn't anything available then but 
it is showing its age and I figured that someone has written something.

Essentially I need users to be able to start a proposal, with some basic 
information, and then be able to add files to it.  Other users will be allowed 
to add files as well, but I'd like to limit deletions to the committee members.

It seems as if there just has to be available tools like this, but I am not 
even sure what such a system is called.  Is there anything like this, in python 
preferably?


thanks,

Brian Blais



Well I guess that any web framework would provide you more or less 
easily with all you need..

Django turbogears pyramid flask or web2py are just the names I know.
--
http://mail.python.org/mailman/listinfo/python-list


Re: #line in python (dirty tricks)

2012-02-20 Thread Duncan Booth
Ross Boylan  wrote:

>> No [easy] way to go from bytecodes back to AST, but I see no reason
>> why you can't create a new code object with your filename and line
>> numbers and then create a new function using your modified code
>> object. 
> Could you elaborate?  I don't understand what you are suggesting.

This (written for Python 3.x, needs some attribute names changing for 
Python 2.x:

import functools
def source_line(lineno, filename = None):
def decorator(f):
c = f.__code__
code = type(c)(
c.co_argcount, c.co_kwonlyargcount, c.co_nlocals, 
c.co_stacksize, c.co_flags, c.co_code,
c.co_consts, c.co_names, c.co_varnames,
c.co_filename if filename is None else filename,
c.co_name,
lineno,
c.co_lnotab, c.co_freevars, c.co_cellvars)
f.__code__ = code
return f
return decorator


@source_line(43, 'foo.bar')
def foo():
"""This is foo"""
for i in range(10):
bar()

@source_line(665, 'evil.txt')
def bar():
raise RuntimeError("oops")

if __name__=='__main__':
import traceback
try:
foo()
except RuntimeError as ex:
traceback.print_exc()

When you run it the output looks something like this (if you create a 
file evil.txt with 667 lines):

Traceback (most recent call last):
  File "C:\temp\foo.py", line 30, in 
foo()
  File "foo.bar", line 47, in foo
  File "evil.txt", line 667, in bar
Evil line 667
RuntimeError: oops

-- 
Duncan Booth http://kupuguy.blogspot.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: HTTP logging

2012-02-20 Thread Vinay Sajip
On Feb 20, 5:47 pm, Vinay Sajip  wrote:

> I will reinstate it in the reference API docs, but the answer to
> Jason's problem is to either subclass HTTPHandler and override
> handleError to suppress the error, or set logging.raiseExceptions to
> True (in which case all logging exceptions will be swallowed - not

Um, that should be *False*, not True.

Regards,

Vinay Sajip
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: paper submission and versioning system - advice?

2012-02-20 Thread Terry Reedy

On 2/20/2012 1:47 PM, Andrea Crotti wrote:

On 02/20/2012 05:45 PM, Brian Blais wrote:

I'd like to find a web-based system to help a committee I'm on, where
we receive proposals from different faculty. I wrote something in
python, from scratch, a number of years ago because there wasn't
anything available then but it is showing its age and I figured that
someone has written something.

Essentially I need users to be able to start a proposal, with some
basic information, and then be able to add files to it. Other users
will be allowed to add files as well, but I'd like to limit deletions
to the committee members.

It seems as if there just has to be available tools like this, but I
am not even sure what such a system is called.


Content Management System (in this case, for a private web site?) is one 
term I have seen.



Is there anything like this, in python preferably?


Too many ;-).


Well I guess that any web framework would provide you more or less
easily with all you need..
Django turbogears pyramid flask or web2py are just the names I know.


+ others...

To possibly limit choices, decide whether you want files available to 
the world or just those with accounts (which requires an authentication 
system).


--
Terry Jan Reedy

--
http://mail.python.org/mailman/listinfo/python-list


netCDF4 variable manipulation

2012-02-20 Thread Sheldon
Hi,

I'm trying to read a netCDF4 variable from a file (no problem) and
then scale it before writing over the original variable in the file.

I'm using python 2.7 and the latest netCDF4 module. It's not that I
keep getting an error message but I want to do this without using for
loops and all the manuals seems to be skipping this task as if it is
never done. I'm new to python and coming over from matlab. Does anyone
know how to modify the netCDF4 variable in python and then write it
back without creating a new variable, or using for loops?

Appreciate the help,
/S
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [semi OT]: Smartphones and Python?

2012-02-20 Thread Dan Stromberg
On Wed, Feb 15, 2012 at 3:36 PM, Paul Rubin  wrote:

> Martin Schöön  writes:
> > A very quick internet search indicated that this should be no big
> > deal if I go for an Android-based phone. What about the alternatives?
>
> It works pretty well with Maemo, though phones with that are not so easy
> to find.  My ex-officemate wrote some SL4A (Android) apps in Python and
> said it was pretty easy to use, though some features were missing.  I
> know that one missing feature was tkinter.
>

The missing features is why I wish SL4A's Python were based on jython or
the java version of pypy.  Apparently each new function needs a stub for
the SL4A CPython; something that runs on a JVM (OK: Dalvik really, but it's
almost the same thing) should be able to call java functions directly.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: netCDF4 variable manipulation

2012-02-20 Thread Dave Angel

On 02/20/2012 03:37 PM, Sheldon wrote:

Hi,

I'm trying to read a netCDF4 variable from a file (no problem) and
then scale it before writing over the original variable in the file.

I'm using python 2.7 and the latest netCDF4 module. It's not that I
keep getting an error message but I want to do this without using for
loops and all the manuals seems to be skipping this task as if it is
never done. I'm new to python and coming over from matlab. Does anyone
know how to modify the netCDF4 variable in python and then write it
back without creating a new variable, or using for loops?

Appreciate the help,
/S
Are you using netcdf version 4, or is that name just a coincidence?  If 
you're using a 3rd party library, you really should say so, and post a 
link, for those curious.


in any case, if you are, I can't help you.  This is apparently some 
special kind of variable similar to a numpy array.



On the other hand, you may just be asking how to update some bytes in a 
file, in place.  if you read the file in binary mode, then you can use 
seek() to go back the appropriate distance, and simply write it.



--

DaveA

--
http://mail.python.org/mailman/listinfo/python-list


Re: netCDF4 variable manipulation

2012-02-20 Thread Steven D'Aprano
On Mon, 20 Feb 2012 12:37:22 -0800, Sheldon wrote:

> Hi,
> 
> I'm trying to read a netCDF4 variable from a file (no problem) and then
> scale it before writing over the original variable in the file.
> 
> I'm using python 2.7 and the latest netCDF4 module. It's not that I keep
> getting an error message but I want to do this without using for loops
> and all the manuals seems to be skipping this task as if it is never
> done. I'm new to python and coming over from matlab. Does anyone know
> how to modify the netCDF4 variable in python and then write it back
> without creating a new variable, or using for loops?

There is no such thing as "the netCDF4 variable" in Python -- it is not a 
built-in part of the language, and therefore there is no built-in feature 
for manipulating it.

You are going to have to be more specific about what you want than just 
"how do I modify a variable with for loops?".

My wild guess is that you have some sort of config file which includes a 
field called "netCDF4" and you want to update it in place. We can't tell 
you how to do this without knowing what the config file is -- is it an 
INI file, XML, JSON, YAML, Unix-style rc file, a binary pickle, or 
something else?


-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Numeric root-finding in Python

2012-02-20 Thread David Monaghan
On Sun, 12 Feb 2012 10:20:17 -0500, inq1ltd  wrote:

>
>
>I don't know the first thing about this math problem however,
>
>if I were to code this I might try ;
>
>   except ZeroDivisionError:
> assert w = -1
>
>rather than;
>
>   except ZeroDivisionError:
> assert w == -1

Why?

DM
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Numeric root-finding in Python

2012-02-20 Thread Mark Lawrence

On 21/02/2012 01:33, David Monaghan wrote:

On Sun, 12 Feb 2012 10:20:17 -0500, inq1ltd  wrote:




I don't know the first thing about this math problem however,

if I were to code this I might try ;

   except ZeroDivisionError:
 assert w = -1

rather than;

   except ZeroDivisionError:
 assert w == -1


Why?

DM


Why not is probably a better question, given that Dennis Lee Bieber and 
Dave Angel have already pointed out that this is not legal Python, it'll 
give a syntax error.


--
Cheers.

Mark Lawrence.

--
http://mail.python.org/mailman/listinfo/python-list


Re: paper submission and versioning system - advice?

2012-02-20 Thread alex23
On Feb 21, 3:45 am, Brian Blais  wrote:
> Essentially I need users to be able to start a proposal, with
> some basic information, and then be able to add files to it.
> Other users will be allowed to add files as well, but I'd like
> to limit deletions to the committee members.

> It seems as if there just has to be available tools like this,
> but I am not even sure what such a system is called.  Is there
> anything like this, in python preferably?

Frankly, I'd start at a much higher level than a web framework. I
think you could easily get what you want from a ticketing system like
Trac: http://trac.edgewall.org/

Trac's tickets would be proposals in your system; I believe you can
attach files to them by default, and even limit the size & type of
attachments. There's a permissions mechanism that would provide your
committee members with higher levels of access. It sits by default on
SVN, so there's your versioning, and provides a wiki, so it's easy to
add supporting documentation to the site. It also provides a very
elegant plug-in system for easy extension, and is all in Python.

-- 
http://mail.python.org/mailman/listinfo/python-list


Python Game Programming Challenge (PyWeek) #14 is coming!

2012-02-20 Thread Richard Jones
The 14th Python Game Programming Challenge (PyWeek) is coming. It'll
run from the 22nd to the 29th of April.

  http://pyweek.org/14/

New user registration is NOT YET OPEN. It will open one month before
the challenge starts.

The PyWeek challenge:

- Invites entrants to write a game in one week from scratch either as
an individual or in a team,
- Is intended to be challenging and fun,
- Will hopefully increase the public body of game tools, code and expertise,
- Will let a lot of people actually finish a game, and
- May inspire new projects (with ready made teams!)

If you're in the US and can make it I'm co-presenting a 3 hour pygame
tutorial at PyCon in March.
-- 
http://mail.python.org/mailman/listinfo/python-list


Should I acquire lock for logging.Handler.flush()?

2012-02-20 Thread Fayaz Yusuf Khan
I'm writing a custom logging Handler that sends emails through AWS Simple 
Email Service using the boto library.
As there's a quota cap on how many (200) emails I can send within 24hrs, I 
think I need to buffer my log messages from the emit() calls (Or is that a bad 
idea?).
And I was reading the Handler documentation and was confused if I should call 
the acquire() and release() methods from within a flush() call.
-- 
Fayaz Yusuf Khan
Cloud developer and architect
Dexetra SS, Bangalore, India
fayaz.yusuf.khan_AT_gmail_DOT_com
fayaz_AT_dexetra_DOT_com
+91-9746-830-823


signature.asc
Description: This is a digitally signed message part.
-- 
http://mail.python.org/mailman/listinfo/python-list