Τη Παρασκευή, 7 Ιουνίου 2013 11:47:58 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
>
> > Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>
> >>>Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
>
> >
>
> >> It's l
Τη Σάββατο, 8 Ιουνίου 2013 5:52:22 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε:
> On 07Jun2013 11:52, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
> wrote:
>
> | ni...@superhost.gr [~/www/cgi-bin]# [Fri Jun 07 21:49:33 2013] [error]
> [client 79.103.41.173] File "/home/nikos/public_html/cgi-bin/
Tim Chase wrote:
> On 2013-06-07 23:46, Jason Swails wrote:
>> On Fri, Jun 7, 2013 at 10:32 PM, Tim Chase
>> > def calculate(params):
>> > a = b = 0
>> > if some_calculation(params):
>> > a += 1
>> > if other_calculation(params):
>> > b += 1
>> > return (a, b)
>> >
>>
On Fri, 07 Jun 2013 21:32:39 -0500, Tim Chase wrote:
> Playing around, I've been trying to figure out the most pythonic way of
> incrementing multiple values based on the return of a function.
> Something like
[...skip misleading and irrelevant calculate() function...]
> alpha = beta = 0
> te
On 07/06/13 16:53, letsplaysf...@gmail.com wrote:
I was planning on making a small 2D game in Python. Are there any libraries for
this? I know of:
• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
•
On 06/07/2013 09:28 AM, Eam onn wrote:
On Friday, June 7, 2013 5:21:36 PM UTC+1, Ian wrote:
On Fri, Jun 7, 2013 at 9:53 AM, wrote:
Do you know of any tutorial for PyGame? Preferably a video tutorial but any
tutorial at all is fine! I can't seem to find any, even on pygame.org!!!
Check
Oh! I really though you were just adding 1 or 0 to those variables. In clude
the loop next time! ;)
You can accumulate the values by doing this instead:
alpha, beta = (alpha + (1 if some_calculation(params) else 0), beta + (1 if
other_calculation(params) else 0))
> Date: Fri, 7 Jun 2013 23:16:
On 2013-06-08 07:04, Carlos Nepomuceno wrote:
> alpha, beta = (1 if some_calculation(params) else 0, 1 if
> other_calculation(params) else 0)
This one sets them to absolute values, rather than the incrementing
functionality in question:
> > alpha += temp_a
> > beta += temp_b
The actual code
On 2013-06-07 23:46, Jason Swails wrote:
> On Fri, Jun 7, 2013 at 10:32 PM, Tim Chase
> > def calculate(params):
> > a = b = 0
> > if some_calculation(params):
> > a += 1
> > if other_calculation(params):
> > b += 1
> > return (a, b)
> >
> > alpha = beta = 0
> > te
alpha, beta = (1 if some_calculation(params) else 0, 1 if
other_calculation(params) else 0)
> Date: Fri, 7 Jun 2013 21:32:39 -0500
> From: python.l...@tim.thechases.com
> To: python-list@python.org
> Subject: Idiomatic Python for incrementing pairs
>
> Playing around, I've been trying to figure
On Sat, Jun 8, 2013 at 12:32 PM, Tim Chase
wrote:
> def calculate(params):
> a = b = 0
> if some_calculation(params):
> a += 1
> if other_calculation(params):
> b += 1
> return (a, b)
>
> alpha = beta = 0
> temp_a, temp_b = calculate(...)
> alpha += temp_a
> b
On Fri, Jun 7, 2013 at 10:32 PM, Tim Chase wrote:
> Playing around, I've been trying to figure out the most pythonic way
> of incrementing multiple values based on the return of a function.
> Something like
>
> def calculate(params):
> a = b = 0
> if some_calculation(params):
> a +
On 07Jun2013 04:53, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| Τη Παρασκευή, 7 Ιουνίου 2013 11:53:04 π.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
| > | >| errors='replace' mean dont break in case or error?
| >
| > | >Yes. The result will be correct for correct iso-8859-7 and slightly
m
On 07Jun2013 11:52, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| ni...@superhost.gr [~/www/cgi-bin]# [Fri Jun 07 21:49:33 2013] [error]
[client 79.103.41.173] File "/home/nikos/public_html/cgi-bin/files.py", line
81
| [Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173] if( flag
Playing around, I've been trying to figure out the most pythonic way
of incrementing multiple values based on the return of a function.
Something like
def calculate(params):
a = b = 0
if some_calculation(params):
a += 1
if other_calculation(params):
b += 1
return (a,
In article ,
Ralf Schmitt wrote:
> Hi,
>
> I have uploaded greenlet 0.4.1 to PyPI:
> https://pypi.python.org/pypi/greenlet
>
> What is it?
> ---
> The greenlet module provides coroutines for python. coroutines allow
> suspending and resuming execution at certain locations.
>
> concurr
:
On 7 June 2013 16:45, MRAB wrote:
> On 07/06/2013 20:31, Zero Piraeus wrote:
>> [something exasperated, in capitals]
>
> Have you noticed how the line in the traceback doesn't match the line
> in the post?
Actually, I hadn't. It's not exactly a surprise at this point, though ...
I learnt a ne
On Fri, 07 Jun 2013 14:24:30 -0400, Dave Angel wrote:
> On 06/07/2013 01:44 PM, ethereal_r...@hotmail.com wrote:
>>
>
>>
>> rows = cur.fetchall()
>>
>> for row in rows:
>> print row
>>
>>
>>
>>
>> Now assume that fetchall would print the following:
>
> I doubt if fetchall(
On Fri, Jun 7, 2013 at 8:53 AM, wrote:
> I also understand that Python isn't exactly the *BEST* choice programming
> a game, but I have heard it is possible. Tell me if it's true. Thanks!
>
One of the Blizzard people told me that it's very common to program game
logic in Python, with the 3D stuf
On 07/06/2013 19:24, Νικόλαος Κούρας wrote:
Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
Its looking for its self?!?!
Have a loo
Hi,
I have uploaded greenlet 0.4.1 to PyPI:
https://pypi.python.org/pypi/greenlet
What is it?
---
The greenlet module provides coroutines for python. coroutines allow
suspending and resuming execution at certain locations.
concurrence[1], eventlet[2] and gevent[3] use the greenlet module
On 07/06/2013 20:31, Zero Piraeus wrote:
:
On 7 June 2013 14:52, Νικόλαος Κούρας wrote:
File "/home/nikos/public_html/cgi-bin/files.py", line 81
[Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173] if( flag ==
'greek' )
[Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173]
Fabrica de software localizada na Barra da Tijuca contrata:
Desenvolvedor Python
Objetivo geral da Posição:
Desenvolvimento de sistemas Web com Python/Django, HTML5, Javascript e CSS.
Prérequisitos:
Experiência com Python/Django ou outro framework MVC.
Familiarizado com desenvolvimento front
:
On 7 June 2013 14:52, Νικόλαος Κούρας wrote:
File "/home/nikos/public_html/cgi-bin/files.py", line 81
> [Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173] if( flag ==
> 'greek' )
> [Fri Jun 07 21:49:33 2013] [error] [client 79.103.41.173]
> ^
> [Fri Jun 07 2
ethereal_r...@hotmail.com wrote:
> Hello, I'm working with PostgreSQL and Python to obtain 2 columns froma
> database and need to print it in a specific format.
>
> Here is my current code.
>
>
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> import psycopg2
> import sys
>
> con = None
>
Τη Παρασκευή, 7 Ιουνίου 2013 5:29:25 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
> This is a worse way of doing it because the ISO-8859-7 encoding has 1
> byte per codepoint, meaning that it's more 'tolerant' (if that's the
> word) of errors. A sequence of bytes that is actually UTF-8 can be
> decoded as
On Fri, Jun 7, 2013 at 11:53 AM, Eam onn wrote:
> Pygame isn't too good. You still need a lot of other libraries from what I
> understand(like for physics). Is there any alternative for 2D?
I don't know of any Python libraries that provide both a rendering
engine and a physics engine.
I'm not s
On 06/07/2013 01:44 PM, ethereal_r...@hotmail.com wrote:
rows = cur.fetchall()
for row in rows:
print row
Now assume that fetchall would print the following:
I doubt if fetchall() prints anything. presumably it returns something,
extracted from the db.
LOEL
Τη Παρασκευή, 7 Ιουνίου 2013 5:32:09 μ.μ. UTC+3, ο χρήστης MRAB έγραψε:
>>Can find what? koukos.py is there inside the cg-bin dir with 755 perms.
> It's looking for '/home/nikos/public_html/cgi-bin/koukos.py'.
Its looking for its self?!?!
> Have a look in '/home/nikos/public_html/cgi-bin'. Is 'k
You could make a fantastic turtle based game with pyturtle!
On Fri, Jun 7, 2013 at 1:53 PM, Eam onn wrote:
> On Friday, June 7, 2013 4:53:03 PM UTC+1, Eam onn wrote:
> > I was planning on making a small 2D game in Python. Are there any
> libraries for this? I know of:
> >
> >
> >
> > • Pygame -
On Friday, June 7, 2013 4:53:03 PM UTC+1, Eam onn wrote:
> I was planning on making a small 2D game in Python. Are there any libraries
> for this? I know of:
>
>
>
> • Pygame - As far as I know it's dead and has been for almost a year
>
> • PyOgre - Linux and Windows only(I do have those, but
Hello, I'm working with PostgreSQL and Python to obtain 2 columns froma
database and need to print it in a specific format.
Here is my current code.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import psycopg2
import sys
con = None
try:
con = psycopg2.connect(database='DB', user='ME
On Fri, 07 Jun 2013 09:28:09 -0700, Eam onn wrote:
> Do you know of any tutorial for PyGame? Preferably a video tutorial but
> any tutorial at all is fine! I can't seem to find any, even on
> pygame.org!!!
https://duckduckgo.com/html/?q=pygame+tutorial
--
Steven
--
http://mail.python.org/mail
MRAB,
Thanks for the hint! Yep, that's much easier!
Thanks! :)
Ron
On Thursday, June 6, 2013 5:49:55 PM UTC-7, MRAB wrote:
> On 07/06/2013 01:03, cerr wrote:
>
> > Hi,
>
> >
>
> > I have a process that I can trigger only at a certain time. Assume I have a
> > TDM period of 10min, that means,
DaveA,
Yep, that seems to just be about it! Much easier!
Thanks for the hint! Much appreciated :)
Ron
On Thursday, June 6, 2013 5:43:11 PM UTC-7, Dave Angel wrote:
> On 06/06/2013 08:03 PM, cerr wrote:
>
> > Hi,
>
> >
>
> > I have a process that I can trigger only at a certain time. Assu
On Fri, Jun 7, 2013 at 10:35 AM, Ian Kelly wrote:
> On Fri, Jun 7, 2013 at 10:28 AM, Eam onn wrote:
>> Do you know of any tutorial for PyGame? Preferably a video tutorial but any
>> tutorial at all is fine! I can't seem to find any, even on pygame.org!!!
>
> I'd start here: http://www.pygame.org
On Fri, Jun 7, 2013 at 10:28 AM, Eam onn wrote:
> Do you know of any tutorial for PyGame? Preferably a video tutorial but any
> tutorial at all is fine! I can't seem to find any, even on pygame.org!!!
I'd start here: http://www.pygame.org/wiki/tutorials
--
http://mail.python.org/mailman/listinf
On Friday, June 7, 2013 5:21:36 PM UTC+1, Ian wrote:
> On Fri, Jun 7, 2013 at 9:53 AM, wrote:
>
> > I was planning on making a small 2D game in Python. Are there any libraries
> > for this? I know of:
>
> >
>
> > • Pygame - As far as I know it's dead and has been for almost a year
>
> > • Py
On Fri, Jun 7, 2013 at 9:53 AM, wrote:
> I was planning on making a small 2D game in Python. Are there any libraries
> for this? I know of:
>
> • Pygame - As far as I know it's dead and has been for almost a year
> • PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
> •
I was planning on making a small 2D game in Python. Are there any libraries for
this? I know of:
• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
• Cocos2D - Won't install and cant find any support
•
On Fri, 07 Jun 2013 04:53:42 -0700, Νικόλαος Κούρας wrote:
> Do you mean that utf-8, latin-iso, greek-iso and ASCII have the 1st
> 0-127 codepoints similar?
You can answer this yourself. Open a terminal window and start a Python
interactive session. Then try it and see what happens:
s = ''.joi
On 07/06/2013 08:51, Νικόλαος Κούρας wrote:
Finally no suexec erros any more after chown all log files to nobody:nobody and
thei corresponding paths.
Now the error has been transformed to:
[Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] (2)No such file or
directory: exec of '/home/
On 07/06/2013 12:53, Νικόλαος Κούρας wrote:
[snip]
#
# Collect filenames of the path dir as bytes
greek_filenames = os.listdir( b'/home/nikos/public_html/data/apps/' )
for filename in greek_filenames:
# Compute 'path/to/filename' i
On 07/06/2013 11:17, lionelgreenstr...@gmail.com wrote:
Sorry for my quote,
but do you have any suggestion?
Il giorno martedì 4 giugno 2013 23:25:21 UTC+2, lionelgr...@gmail.com ha
scritto:
Hi,
i'm programming in python for the first time: i want to create a serial port
reader. I'm using pyt
This is a reminder to all teams who want to submit a proposal for
running the next EuroPython in 2014 and 2015.
Proposals must be sent in before Friday, June 14th, i.e. in less than
one week.
If you have questions, please feel free to contact the EuroPython Society
board at bo...@europython.eu. W
Hello pythonistas,
☺ Some application made of python(command line program or a GUI program) that
we make using a python module(planning to cover as many modules as possible)
ie; of included batteries of python.
☺ Python in Security ie; Some scripts that we can write in python like a
dictionary a
Τη Παρασκευή, 7 Ιουνίου 2013 11:53:04 π.μ. UTC+3, ο χρήστης Cameron Simpson
έγραψε:
> On 07Jun2013 09:56, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
> wrote:
>
> | On 7/6/2013 4:01 πμ, Cameron Simpson wrote:
>
> | >On 06Jun2013 11:46, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
> wrote:
>
> | >|
lionelgreenstr...@gmail.com wrote:
> Sorry for my quote,
> but do you have any suggestion?
>> After 30seconds (more or less) the program crashes: seems a buffer
>> problem, but i'm not really sure.
>>
>> What's wrong?
I don't use qt or pyserial myself, but your problem description is too vague
Sorry for my quote,
but do you have any suggestion?
Il giorno martedì 4 giugno 2013 23:25:21 UTC+2, lionelgr...@gmail.com ha
scritto:
> Hi,
>
> i'm programming in python for the first time: i want to create a serial port
> reader. I'm using python3.3 and pyQT4; i'm using also pyserial.
>
> Bel
On Jun 7, 6:53 pm, Cameron Simpson wrote:
> Experiment:
>
> LC_ALL=C ls -b
> LC_ALL=utf-8 ls -b
> LC_ALL=iso-8859-7 ls -b
>
> And the Terminal itself is decoding the output for display, and
> encoding your input keystrokes to feed as input to the command
> line.
This reminded
On 07Jun2013 09:56, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| On 7/6/2013 4:01 πμ, Cameron Simpson wrote:
| >On 06Jun2013 11:46, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| >| Τη Πέμπτη, 6 Ιουνίου 2013 3:44:52 μ.μ. UTC+3, ο χρήστης Steven D'Aprano
έγραψε:
| >| > py> s = '999-Eυχή
Michael wrote:
> I'm writing a decorator that I never want to be nested. Following from the
> answer on my StackOverflow question
> (http://stackoverflow.com/a/16905779/106244), I've adapted it to the
> following.
>
> Can anyone spot any issues with this? It'll be run in a multi-threaded
> enviro
On 07Jun2013 11:10, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| On 7/6/2013 10:42 πμ, Michael Weylandt wrote:
| >os.rename( filepath_bytes filepath.encode('utf-8')
| >Missing comma, which is, after all, just a matter of syntax so it can't
matter, right?
|
| I doubted that os.rename argumen
On Fri, Jun 7, 2013 at 9:10 AM, Νικόλαος Κούρας wrote:
> On 7/6/2013 10:42 πμ, Michael Weylandt wrote:
>
>>> os.rename( filepath_bytes filepath.encode('utf-8')
>
>> Missing comma, which is, after all, just a matter of syntax so it can't
>> matter, right?
>
> I doubted that os.rename arguments must
On 7/6/2013 10:42 πμ, Michael Weylandt wrote:
os.rename( filepath_bytes filepath.encode('utf-8')
Missing comma, which is, after all, just a matter of syntax so it can't matter,
right?
I doubted that os.rename arguments must be comma seperated.
But ater reading the docs.
s.rename(/src/,/dst/)
Finally no suexec erros any more after chown all log files to nobody:nobody and
thei corresponding paths.
Now the error has been transformed to:
[Fri Jun 07 10:48:47 2013] [error] [client 79.103.41.173] (2)No such file or
directory: exec of '/home/nikos/public_html/cgi-bin/koukos.py' failed
[F
On Jun 7, 2013, at 8:32, Νικόλαος Κούρας wrote:
> Τη Παρασκευή, 7 Ιουνίου 2013 10:09:29 π.μ. UTC+3, ο χρήστης Lele Gaifax
> έγραψε:
>
>> As already explained, often a SyntaxError is introduced by *preceeding*
>> "text", so you must look at your code with a "wider eye".
>
> That what i ahte a
Τη Παρασκευή, 7 Ιουνίου 2013 10:09:29 π.μ. UTC+3, ο χρήστης Lele Gaifax έγραψε:
> As already explained, often a SyntaxError is introduced by *preceeding*
> "text", so you must look at your code with a "wider eye".
That what i ahte aabout error reporting. You have some syntax error someplace
and
Any other ideas guys?
I can output for you any command you ask me too, so you have a better
understanding about this suexec thing.
I have checked the path to the error log file too, it's not just enough
that the file is accessible for a user, the whole path to the file needs
to have the right
On Fri, Jun 7, 2013 at 5:08 PM, Νικόλαος Κούρας wrote:
> I'll google Traal right now.
The one thing you're actually willing to go research, and it's
actually something that won't help you. Traal is the name of my
personal laptop. Spend your Googletrons on something else. :)
ChrisA
--
http://mai
Τη Παρασκευή, 7 Ιουνίου 2013 9:46:53 π.μ. UTC+3, ο χρήστης Chris Angelico
έγραψε:
> On Fri, Jun 7, 2013 at 4:35 PM, wrote:
>
> > Yes, but but 'putty' seems to always forget when i tell it to use utf8 for
> > displaying and always picks up the Win8's default charset and it doesnt
> > have a sa
nagia.rets...@gmail.com writes:
> File "files.py", line 75
> os.rename( filepath_bytes filepath.encode('utf-8') )
> ^
> SyntaxError: invalid syntax
>
> I am seeign the caret pointing at filepath but i cant follow what it
> tries to tell me.
As already ex
On 7/6/2013 4:01 πμ, Cameron Simpson wrote:
On 06Jun2013 11:46, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?=
wrote:
| Τη Πέμπτη, 6 Ιουνίου 2013 3:44:52 μ.μ. UTC+3, ο χρήστης Steven D'Aprano
έγραψε:
| > py> s = '999-Eυχή-του-Ιησού'
| > py> bytes_as_utf8 = s.encode('utf-8')
| > py> t = bytes_as_utf8
63 matches
Mail list logo