John Ladasky wrote:
> Hi folks,
>
> I'm trying to make some of Python class definitions behave like the ones I
> find in professional packages, such as Matplotlib. A Matplotlib class can
> often have a very large number of arguments -- some of which may be
> optional, some of which will assume d
I can start thread and no exception error print, and I do not know how to use
tail in python script
I need to cope with MySQL in python later as all file path stored in it, it is
to monitor all text files
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico wrote:
> On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder wrote:
>> Now is a good time to go read about transactions, and committing, and the
>> difference between MyISAM and InnoDB. Please don't ask more about it here.
>
> It's because of threads li
Reposting what I said in the other thread:
On Sun, Oct 6, 2013 at 12:51 AM, Chris Angelico wrote:
> On Sun, Oct 6, 2013 at 8:39 AM, Ned Batchelder wrote:
>> Now is a good time to go read about transactions, and committing, and the
>> difference between MyISAM and InnoDB. Please don't ask more a
On 06/10/2013 05:06, Steven D'Aprano wrote:
On Sat, 05 Oct 2013 20:17:32 -0700, galeomaga wrote:
if __name__ == '__main__':
try:
thread.start_new_thread( readfile, ("Thread-1", ) )
except:
print "Error: unable to start thread"
Why not? If you
On Sun, Oct 6, 2013 at 9:36 PM, Mark Lawrence wrote:
> Also note that a bare except is extremely bad practice, e.g. you can't stop
> rogue programs with a CTRL-C
Or to be more accurate, a Ctrl-C will cause a jump to your except
clause. Since, in this instance, that's going to emit and die, Ctrl-C
On 06/10/2013 12:03, Chris Angelico wrote:
On Sun, Oct 6, 2013 at 9:36 PM, Mark Lawrence wrote:
Also note that a bare except is extremely bad practice, e.g. you can't stop
rogue programs with a CTRL-C
Or to be more accurate, a Ctrl-C will cause a jump to your except
clause. Since, in this ins
On Sun, Oct 6, 2013 at 10:13 PM, Mark Lawrence wrote:
> Good point, but at least this time I typed "rogue" correctly, unlike on the
> tutor mailing list :)
Obligatory TVTropes link.
http://tvtropes.org/pmwiki/pmwiki.php/Main/RougeAnglesOfSatin
ChrisA
--
https://mail.python.org/mailman/listinfo
On 06/10/2013 12:15, Chris Angelico wrote:
On Sun, Oct 6, 2013 at 10:13 PM, Mark Lawrence wrote:
Good point, but at least this time I typed "rogue" correctly, unlike on the
tutor mailing list :)
Obligatory TVTropes link.
http://tvtropes.org/pmwiki/pmwiki.php/Main/RougeAnglesOfSatin
ChrisA
On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick wrote:
> So, instead of this, maybe we should work on getting psycopg2 to the
> top result on Googling “python sql”, or even “python mysql” with an
> anti-MySQL ad? (like vim was doing some time ago on Googling “emacs”)
Do yo
On Sun, Oct 6, 2013 at 10:31 PM, Mark Lawrence wrote:
>
> How do I know that you're not trying to send me to a rouge site?
>
I assure you, the background color is most distinctly white. They
probably contract with Google for their white pixel supply:
http://www.google.com.au/technology/pigeonr
On Sun, Oct 6, 2013 at 1:36 PM, rusi wrote:
> On Sunday, October 6, 2013 2:35:24 PM UTC+5:30, Chris “Kwpolska” Warrick
> wrote:
>> So, instead of this, maybe we should work on getting psycopg2 to the
>> top result on Googling “python sql”, or even “python mysql” with an
>> anti-MySQL ad? (like vi
print("Key-" + str(võti) + ": " + str(unhexlify("".join(tulemus
IM getting this error on this line. This is the print line of a decryption
program. I wanti it to convert the tulemus which is in HEX to ASCII so i could
read it. I could use online translators for the line, but since i have 255
There is this class file, it has its functions and variables. Now im greating
my program, that uses the funcions from the class. BUt there are some functions
missing from the class. So i want to add some extra funtions to the class,
whidout altering the original source code, but by extending it
Image consists of pixels. Each pixel has its RGBA values. In python whidout any
extra downloadable modules, is there a way to get those values. I know PIG has
it but i hav Python 3.3.2 so PIG wont do. In java under swingx there is a
command called .getRGB() and whit some manipulation to that val
On Sun, Oct 6, 2013 at 3:19 PM, wrote:
> Image consists of pixels. Each pixel has its RGBA values. In python whidout
> any extra downloadable modules, is there a way to get those values. I know
> PIG has it but i hav Python 3.3.2 so PIG wont do.
PIG? Did you mean PIL? In that case, go use Pi
On Sun, Oct 6, 2013 at 8:10 PM, Chris “Kwpolska” Warrick
wrote:
> It would require Postgres around people’s (or at least packagers’)
> systems, and it often gets messy when we have such requirements.
I would hope that an absence of libpq could simply result in a
courteous exception when the modul
In article <[email protected]>,
[email protected] wrote:
> print("Key-" + str(võti) + ": " + str(unhexlify("".join(tulemus
>
> IM getting this error on this line. This is the print line of a decryption
> program. I wanti it to convert the tulemus which
In article ,
Chris Angelico wrote:
> I would hope that an absence of libpq could simply result in a
> courteous exception when the module's imported, but maybe that'd be
> hard to implement.
It works fine. I've had this in production for a while:
# Psycopg2 is only needed for a single hacky l
[email protected] wrote:
> print("Key-" + str(võti) + ": " + str(unhexlify("".join(tulemus
>
> IM getting this error on this line. This is the print line of a decryption
> program. I wanti it to convert the tulemus which is in HEX to ASCII so i
> could read it. I could use online translator
I fixed this problem but encountered new problem. Problem was that some parts
that came throug my decryption were 00 or 0 the first symbol so the program
didnt show them.
NEw problem is : Traceback (most recent call last):
File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
On 06/10/2013 15:37, [email protected] wrote:
I fixed this problem but encountered new problem. Problem was that some parts
that came throug my decryption were 00 or 0 the first symbol so the program
didnt show them.
NEw problem is : Traceback (most recent call last):
File "C:\Users\Marko
On Sun, 06 Oct 2013 08:20:35 +0300, Νίκος Αλεξόπουλος wrote:
> Thank you Denis, i didn't knew about sessions up until i saw you post.
> Your code is very advanced for me to read but i will try to "decode it"
> I though that if we want to read something from our visitor, something
> we want, we hav
:
On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote:
> I neved had though of than an engine type could make so much mess.
> MyISAM is the way to go then for my web development?
> Why InnoDB failed to execute the queries?
Because you didn't commit. MyISAM doesn't support transactio
>I neved had though of than an engine type could make so much mess.
Because your app and how it is written is broken.
>MyISAM is the way to go then for my web development?
>Why InnoDB failed to execute the queries?
No, nothing failed. Your app is broken. You are depending on auto commit -
and
Στις 6/10/2013 12:45 πμ, ο/η Zero Piraeus έγραψε:
:
On Sun, Oct 06, 2013 at 12:02:14AM +0300, Νίκος Αλεξόπουλος wrote:
I neved had though of than an engine type could make so much mess.
MyISAM is the way to go then for my web development?
Why InnoDB failed to execute the queries?
Because you
>>> Are you sure that you're committing your changes (either by having
>>> autocommit set or using an explicit con.commit() call)?
>>> http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/
>> I dont think that is the issue, because up until now i never used
>commit and
>> all transaction we
On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote:
> On 2013-10-05 18:08, Harvey Greenberg wrote:
>
> > I am looping as for L in file.readlines(), where file is csv.
>
> >
>
> > L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that
>
> > the first item is a dir and 2
On Sunday, October 6, 2013 10:41:33 AM UTC-6, Harvey Greenberg wrote:
> On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote:
>
> > On 2013-10-05 18:08, Harvey Greenberg wrote:
>
> >
>
> > > I am looping as for L in file.readlines(), where file is csv.
>
> >
>
> > >
>
> >
>
> >
On Sun, Oct 6, 2013 at 10:11 PM, Harvey Greenberg wrote:
> On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote:
>> Python 2.7.3 (default, Jan 2 2013, 13:56:14)
>> [GCC 4.7.2] on linux2
>> Type "help", "copyright", "credits" or "license" for more
>> information.
>> >>> s = "[{
Στις 6/10/2013 6:52 μμ, ο/η Adam Tauno Williams έγραψε:
Are you sure that you're committing your changes (either by having
autocommit set or using an explicit con.commit() call)?
http://geert.vanderkelen.org/dont-forget-the-commit-in-mysql/
I dont think that is the issue, because up until now i
On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote:
> I am looping as for L in file.readlines(), where file is csv.
>
>
>
> L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first
> item is a dir and 2nd is a list, so parsing with split doesn't work. Is
On 06/10/2013 17:57, Harvey Greenberg wrote:
On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote:
I am looping as for L in file.readlines(), where file is csv.
L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the first
item is a dir and 2nd is a list, so
On Sun, Oct 6, 2013 at 10:27 PM, Harvey Greenberg wrote:
> On Saturday, October 5, 2013 7:08:08 PM UTC-6, Harvey Greenberg wrote:
>> I am looping as for L in file.readlines(), where file is csv.
>>
>>
>>
>> L is a list of 3 items, eg, [{'a':1, 'b':2}, [1,2,3], 10] Note that the
>> first item is a
Hi all, I have a question about class creation and the __call__ method.
I have the following metaclass:
>>> class FooMeta(type):
... def __call__(metacls, name, bases, namespace):
... print("FooMeta.__call__()")
From what I undestood, at the end of the class statement happens
some
Marco Buttu wrote:
> Hi all, I have a question about class creation and the __call__ method.
> I have the following metaclass:
>
> >>> class FooMeta(type):
> ... def __call__(metacls, name, bases, namespace):
> ... print("FooMeta.__call__()")
>
>
> From what I undestood, at the en
problem is : Traceback (most recent call last):
File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
TypeError: sequence item 0: expected str instance, bytes found
If i take away the join command i get this:
Key
[email protected] wrote:
> problem is : Traceback (most recent call last):
> File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
>
> print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
> TypeError: sequence item 0: expected str instance, bytes found
>
> If i tak
On 06/10/2013 20:07, [email protected] wrote:
problem is : Traceback (most recent call last):
File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
TypeError: sequence item 0: expected str instance, bytes found
On 10/6/2013 10:37 AM, [email protected] wrote:
NEw problem is : Traceback (most recent call last):
File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
TypeError: sequence item 0: expected str instance, bytes fo
On 10/6/2013 9:15 AM, [email protected] wrote:
There is this class file, it has its functions and variables. Now im greating
my program, that uses the funcions from the class. BUt there are some functions
missing from the class. So i want to add some extra funtions to the class,
whidout alte
Hi,
I'm playing with Flask and I would like to try it in production
environment too. I managed to bring Flask together with uwsgi and
nginx. My Flask application is available at the address localhost:81 .
I would like to add several applications and I want them to be
available under different URL
On Saturday, October 5, 2013 9:04:25 PM UTC-7, John Ladasky wrote:
> Hi folks,
>
>
>
> I'm trying to make some of Python class definitions behave like the ones I
> find in professional packages, such as Matplotlib. A Matplotlib class can
> often have a very large number of arguments -- some o
Νίκος Αλεξόπουλος writes:
> i will use con.commit() from now and on because yesterdays i lost 3
> hours trying to identify what was wrong with my MySQL statements in
> python and it turned out to be for no good reason.
That shows how important it is to study the software that you are using, and
In article ,
Jabba Laci wrote:
> The problem is I can't
> figure out how to configure nginx for this.
This is a python mailing list. You would do better asking nginx
questions on an nginx mailing list.
--
https://mail.python.org/mailman/listinfo/python-list
I am very new to python so I'll apologize up front if this is some
boneheaded thing. I am using python and pyserial to talk to an embedded
pic processor in a piece of scientific equipment. I sometimes find the
when I construct the bytes object to write it adds an extra f to the first
byte.
For e
On Sun, 6 Oct 2013 18:47:38 -0400, Robert Jackson wrote:
> --089e0160b7be912b9e04e81a52b2
> Content-Type: text/plain; charset=ISO-8859-1
>
> I am very new to python
[snip]
Welcome.
> . . . I sometimes find the
> when I construct the bytes object to write it adds an extra f to the first
> byte.
On 06/10/2013 23:47, Robert Jackson wrote:
I am very new to python so I'll apologize up front if this is some
boneheaded thing. I am using python and pyserial to talk to an embedded
pic processor in a piece of scientific equipment. I sometimes find the
when I construct the bytes object to write
On Sun, Oct 6, 2013 at 8:32 PM, Peter Pearson wrote:
> On Sun, 6 Oct 2013 18:47:38 -0400, Robert Jackson wrote:
>> --089e0160b7be912b9e04e81a52b2
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> I am very new to python
> [snip]
>
> Welcome.
>
>
>> . . . I sometimes find the
>> when I constru
On 10/6/13 6:47 PM, Robert Jackson wrote:
I am very new to python so I'll apologize up front if this is some
boneheaded thing. I am using python and pyserial to talk to an
embedded pic processor in a piece of scientific equipment. I
sometimes find the when I construct the bytes object to writ
On Sun, Oct 6, 2013 at 6:39 PM, Joel Goldstick wrote:
>> "f" is the same as \x66; nothing has been changed.
>
> really? I would expect that \x66 = 0110 0110 and f =
The f here is the ASCII character f, not the hex digit f:
>>> bin(ord(b'f'))
'0b1100110'
--
https://mail.python.org/mailman/l
On 10/6/2013 6:47 PM, Robert Jackson wrote:
I am very new to python so I'll apologize up front if this is some
Welcome to a mostly great language.
boneheaded thing. I am using python and pyserial to talk to an embedded
pic processor in a piece of scientific equipment. I sometimes find the
w
On Sun, Oct 6, 2013 at 8:38 PM, MRAB wrote:
> On 06/10/2013 23:47, Robert Jackson wrote:
>>
>> I am very new to python so I'll apologize up front if this is some
>> boneheaded thing. I am using python and pyserial to talk to an embedded
>> pic processor in a piece of scientific equipment. I some
[email protected] writes:
> I fixed this problem but encountered new problem. Problem was that some parts
> that came throug my decryption were 00 or 0 the first symbol so the program
> didnt show them.
>
> NEw problem is : Traceback (most recent call last):
> File "C:\Users\Marko\Desktop\h
On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote:
> When Python displays a string, is uses
A byte string.
> the ASCII character if it can, and a hex escape if it can't. When you
> use a hex value that is a valid ASCII character, it will display the
> character.
Obviously for Python 2 t
On Sun, 06 Oct 2013 06:15:51 -0700, markotaht wrote:
> There is this class file, it has its functions and variables.
What's a class file?
Do you mean a file containing only a single class?
> Now im
> greating my program, that uses the funcions from the class.
They are called "methods".
>
[email protected] writes:
> problem is : Traceback (most recent call last):
> File "C:\Users\Marko\Desktop\hacker.org\XOR cypher.py", line 35, in
>
> print("Key-" + str(võti) + ": " + str("".join(tulemus2)))
> TypeError: sequence item 0: expected str instance, bytes found
>
> If i
https://docs.google.com/file/d/0B2D69u2pweEvelh1T25ra19oZEU/edit?usp=sharing
no matter call tail directly in python or using the script of tail
all failed
it seems it can not read next line
--
https://mail.python.org/mailman/listinfo/python-list
Νίκος Αλεξόπουλος writes:
> i use 'cgi', but i noticed you used 'mod-wsgi'.
> I want to ask you why you chose the latter? Is the latter better than
> the former?
>
> Is it faster? Does it bahave the same way?
> I my code works works with cgi, which it does, will the same code works
> with mod-wcg
On Sun, 06 Oct 2013 20:17:33 +0200, Marco Buttu wrote:
> Hi all, I have a question about class creation and the __call__ method.
> I have the following metaclass:
>
> >>> class FooMeta(type):
> ... def __call__(metacls, name, bases, namespace):
> ...print("FooMeta.__call__()")
At t
On Sat, 05 Oct 2013 21:04:25 -0700, John Ladasky wrote:
> Hi folks,
>
> I'm trying to make some of Python class definitions behave like the ones
> I find in professional packages, such as Matplotlib. A Matplotlib class
> can often have a very large number of arguments -- some of which may be
> o
Thank you all. It was unfortunate that it was f since I thought it was
some strange mistaken hex nibble. All very clear and helpful.
On Sun, Oct 6, 2013 at 9:07 PM, Steven D'Aprano <
[email protected]> wrote:
> On Sun, 06 Oct 2013 20:39:39 -0400, Ned Batchelder wrote:
>
> >
On 10/07/2013 04:27 AM, Steven D'Aprano wrote:
On Sun, 06 Oct 2013 20:17:33 +0200, Marco Buttu wrote:
>
> >>> class FooMeta(type):
>... def __call__(metacls, name, bases, namespace):
>...print("FooMeta.__call__()")
...
> From what I undestood, at the end of the class statement..
Harvey Greenberg writes:
> On Saturday, October 5, 2013 7:24:39 PM UTC-6, Tim Chase wrote:
> > >>> s = "[{'a':1, 'b':2}, [1,2,3], 10]"
> > >>> import ast
> > >>> print repr(ast.literal_eval(s))
> > [{'a': 1, 'b': 2}, [1, 2, 3], 10]
>
> that didn't work. printing it looks like the list bec
64 matches
Mail list logo