[RELEASED] Python 3.3.3 release candidate 2

2013-11-12 Thread Georg Brandl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On behalf of the Python development team, I'm quite happy to announce the Python 3.3.3 release candidate 2. Python 3.3.3 includes several security fixes and over 150 bug fixes compared to the Python 3.3.2 release. This release fully supports OS X

Re: Getting globals of the caller, not the defining module

2013-11-12 Thread Rotwang
On 12/11/2013 01:57, Terry Reedy wrote: On 11/11/2013 7:02 AM, sg...@hotmail.co.uk wrote: (Sorry for posting through GG, I'm at work.) On Monday, November 11, 2013 11:25:42 AM UTC, Steven D'Aprano wrote: Suppose I have a function that needs access to globals: # module A.py def spam(): g

Re: Conditional breakpoints in ceval.c

2013-11-12 Thread David Froger
Quoting Ned Batchelder (2013-11-09 14:24:34) On Friday, November 8, 2013 9:03:51 PM UTC-5, Demian Brecht wrote: Hi all, I have an .py file with a simple assignment in it: foo = 'bar' Now, I want to set a conditional breakpoint in gdb, breaking on that assignment (I'm guessing the

Re: To whoever hacked into my Database

2013-11-12 Thread Antoon Pardon
Op 12-11-13 07:31, ru...@yahoo.com schreef: On 11/11/2013 06:16 PM, Ned Batchelder wrote: On Monday, November 11, 2013 5:47:28 PM UTC-5, ru...@yahoo.com wrote: On 11/08/2013 11:08 AM, Chris Angelico wrote: On Sat, Nov 9, 2013 at 4:11 AM, ru...@yahoo.com wrote: On 11/08/2013 03:05 AM, Νίκος

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Frank-Rene Schäfer
(1) hash()-ability != immutability (!) Proof: class X: def __hash__(self): return 0 def pseudo_isimmutable(this): try: hash(this) return True except TypeError: return False shapeshifter = (1, 2, X()) print pseudo_isimmutable(shapeshifter)

Re: UTF-32 decoder optimization in Python 3.4

2013-11-12 Thread Mark Lawrence
On 12/11/2013 02:11, Terry Reedy wrote: On 11/11/2013 4:41 PM, Mark Lawrence wrote: From http://docs.python.org/dev/whatsnew/3.4.html#optimizations The UTF-32 decoder is now 3x to 4x faster.. Does anybody have any references to this work? All I can find is the 3.3 what's new which refers to

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Chris Angelico
On Tue, Nov 12, 2013 at 8:12 PM, Frank-Rene Schäfer fsch...@gmail.com wrote: (1) hash()-ability != immutability (!) Proof: class X: def __hash__(self): return 0 x == y != y == x Proof: class X: def __eq__(self,other): return True class Y: def __eq__(self,other): return False

Re: datetime question

2013-11-12 Thread Mark Lawrence
On 12/11/2013 07:25, alex23 wrote: On 12/11/2013 2:49 PM, Grant Edwards wrote: Don't forget that there are also some differences between American and Imperial whitespace. Since it's ASCII whitespace, you should probably assume American... sys.getsizeof(' ') 34 sys.getsizeof(u' ') 52 bad

Re: To whoever hacked into my Database

2013-11-12 Thread Mark Lawrence
On 12/11/2013 05:21, Gregory Ewing wrote: Ned Batchelder wrote: I don't know how best to make things better overall. I know that overlooking Nikos' faults won't do it. If everyone who reached the point where they don't think they can help any more would simply say so in a calm manner and

Re: To whoever hacked into my Database

2013-11-12 Thread Dotan Cohen
On Fri, Nov 8, 2013 at 7:11 PM, ru...@yahoo.com wrote: Long before you showed up here, I noticed the tendency to not answer questions directly but to jerk people off by giving hints or telling them to do something other than they want to do. Often that is good because the original request

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Frank-Rene Schäfer
All you've done is proven that you can subvert things. By fiddling with __hash__, __eq__, and so on, you can make sets and dicts behave very oddly. Means nothing. To the contrary, it means everything about what 'isimmutable' could contribute: security against advert or inadvert insertion of

Re: To whoever hacked into my Database

2013-11-12 Thread Chris Angelico
On Tue, Nov 12, 2013 at 8:34 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 12/11/2013 05:21, Gregory Ewing wrote: Ned Batchelder wrote: I don't know how best to make things better overall. I know that overlooking Nikos' faults won't do it. If everyone who reached the point where

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Chris Angelico
On Tue, Nov 12, 2013 at 8:39 PM, Frank-Rene Schäfer fsch...@gmail.com wrote: All you've done is proven that you can subvert things. By fiddling with __hash__, __eq__, and so on, you can make sets and dicts behave very oddly. Means nothing. To the contrary, it means everything about what

Re: Creating a function for a directory

2013-11-12 Thread unknown
On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote: So I want to take the file, desktop/test.txt and write it to desktop/newfolder/test.txt. I tried the below script, and it gave me: IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'. Any suggestions would be great. def

Re: datetime question

2013-11-12 Thread Ferrous Cranus
Στις 8/11/2013 11:11 μμ, ο/η Νίκος Αλεξόπουλος έγραψε: Is there someway to write the following line even better with the ability to detect daylight saving time by itself so i don't have to alter the line manually when time changes? lastvisit = ( datetime.utcnow() + timedelta(hours=2)

Re: To whoever hacked into my Database

2013-11-12 Thread Antoon Pardon
Op 12-11-13 10:35, Chris Angelico schreef: On Tue, Nov 12, 2013 at 8:34 PM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 12/11/2013 05:21, Gregory Ewing wrote: Ned Batchelder wrote: I don't know how best to make things better overall. I know that overlooking Nikos' faults won't do it.

Re: Creating a function for a directory

2013-11-12 Thread Peter Otten
unknown wrote: On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote: So I want to take the file, desktop/test.txt and write it to desktop/newfolder/test.txt. I tried the below script, and it gave me: IOError: [Errno 2] No such file or directory: 'desktop/%s.txt'. Any suggestions would be great.

Re: Basic Python Questions - Oct. 31, 2013

2013-11-12 Thread E.D.G.
E.D.G. edgrs...@ix.netcom.com wrote in message news:yo-dnwfmi7_7d-jpnz2dnuvz_hqdn...@earthlink.com... Posted by E.D.G. on November 12, 2013 The following is part of a note that I just posted to the Perl Newsgroup. But it is actually intended for all computer programmers who are

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Frank-Rene Schäfer
So how do you figure out whether something's immutable or not? Are you going to ask the object itself? If so, stick with __hash__, and just follow the rule that mutable objects aren't hashable - which is, if I'm not mistaken, how things already are. And if not, then how? How will you know if

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Steven D'Aprano
On Tue, 12 Nov 2013 18:12:43 +1100, Chris Angelico wrote: def isimmutable(x): try: hash(x) return True except TypeError: return False I'm afraid that doesn't test for immutability. It tests for hashability, which is different. No well-behaved mutable

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Ricardo Aráoz
El 12/11/13 01:46, Rick Johnson escribió: No, Python modules can be poked, prodded, and violated by any pervert who can spell the word import. Attribute values can be reassigned and state can be externally manipulated resulting in all types of undefined behaviors -- Nice! My code, my

Re: To whoever hacked into my Database

2013-11-12 Thread Ned Batchelder
On Tuesday, November 12, 2013 1:31:32 AM UTC-5, ru...@yahoo.com wrote: On 11/11/2013 06:16 PM, Ned Batchelder wrote: Nikos has received a good deal of genuine advice. He has also been genuinely difficult to help. Yes. If he is too difficult to help without getting angry because he won't

Re: To whoever hacked into my Database

2013-11-12 Thread Tim Chase
On 2013-11-11 22:24, ru...@yahoo.com wrote: And your suggestion is not necessarily best either: why a 1:M relationship? why not a M:M relationship? There may be duplicate file downloads resulting in your suggestion being non-normalized. You think that, after rejecting the addition of *one*

Re: Creating a function for a directory

2013-11-12 Thread unknown
On Tue, 12 Nov 2013 11:24:02 +0100, Peter Otten wrote: unknown wrote: On Mon, 11 Nov 2013 14:26:46 -0800, Matt wrote: So I want to take the file, desktop/test.txt and write it to desktop/newfolder/test.txt. I tried the below script, and it gave me: IOError: [Errno 2] No such file or

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Tim Chase
On 2013-11-11 20:46, Rick Johnson wrote: Yes, and i agree. But you cannot hide everything. There will always be a need to share information. You may not be able to (or want to) hide everything, but sharing should at least happen over defined protocols (functions/methods). Otherwise, you wander

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Steven D'Aprano
On Tue, 12 Nov 2013 08:01:19 +0100, Frank-Rene Schäfer wrote: the existence of a built-in function 'isimmutable' puts the concept of immutability some more into the spotlight. That is an argument against the proposal, not in favour. The concept of immutability doesn't need to be in the

Python and Android: PyImport_ImportModule always returns NULL

2013-11-12 Thread Dominik Weinhold
Hello all together, I have a python and android related issue. I hope that this is no problem because apart from stack overflow, where I also posted this question (but got no answer so far), I think a python mailing-list is the best place to post this question. I am trying to use

Re: datetime question

2013-11-12 Thread Andy Lawton
Firstly , I should clarify I have no idea how to program python, I joined this mailing list in anticipation of learning soon. And thought I'd have a go playing around with your code and code given to you (worst possible place to start, I'm sure) But from the answers already given to you, this

Re: To whoever hacked into my Database

2013-11-12 Thread Ian Kelly
On Tue, Nov 12, 2013 at 2:09 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: So you are complaining about people being human. Yes that is how people tend to react when they continualy are frustrated by someone who refuses to show the slightest cooperation. So no rejecting such responses,

Re: datetime question

2013-11-12 Thread Ferrous Cranus
Στις 12/11/2013 2:47 μμ, ο/η Andy Lawton έγραψε: Firstly , I should clarify I have no idea how to program python, I joined this mailing list in anticipation of learning soon. And thought I'd have a go playing around with your code and code given to you (worst possible place to start, I'm sure)

Re: To whoever hacked into my Database

2013-11-12 Thread Ferrous Cranus
Στις 11/11/2013 11:36 πμ, ο/η Νίκος Αλεξόπουλος έγραψε: Στις 6/11/2013 5:25 μμ, ο/η Νίκος Γκρ33κ έγραψε: Okey let the hacker try again to mess with my database!!! He is done it twice, lets see if he will make it again! I'am waiting! I can't believe your ignorance. You're actually telling a

Re: Creating a function for a directory

2013-11-12 Thread Neil Cerutti
On 2013-11-12, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Using os.path.exists before opening a file is, for the most part, a waste of time. I use it in conjuction with file creation times to check that I didn't forget to update/create one of the data files a process might

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Robert Kern
On 2013-11-12 11:14, Steven D'Aprano wrote: On Tue, 12 Nov 2013 18:12:43 +1100, Chris Angelico wrote: def isimmutable(x): try: hash(x) return True except TypeError: return False I'm afraid that doesn't test for immutability. It tests for hashability,

Re: datetime question

2013-11-12 Thread Joel Goldstick
On Tue, Nov 12, 2013 at 8:32 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Στις 12/11/2013 2:47 μμ, ο/η Andy Lawton έγραψε: Firstly , I should clarify I have no idea how to program python, I joined this mailing list in anticipation of learning soon. And thought I'd have a go playing around

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread jongiddy
On Tuesday, November 12, 2013 2:06:09 AM UTC, Rick Johnson wrote: Justifying Global Variables: Globals are justified when they are used to communicate

Re: datetime question

2013-11-12 Thread Ferrous Cranus
Στις 12/11/2013 4:03 μμ, ο/η Joel Goldstick έγραψε: On Tue, Nov 12, 2013 at 8:32 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Στις 12/11/2013 2:47 μμ, ο/η Andy Lawton έγραψε: Firstly , I should clarify I have no idea how to program python, I joined this mailing list in anticipation of

Re: datetime question

2013-11-12 Thread Roy Smith
In article l5sc04$3vd$1...@reader1.panix.com, Grant Edwards invalid@invalid.invalid wrote: On 2013-11-11, Mark Lawrence breamore...@yahoo.co.uk wrote: On 11/11/2013 23:21, mm0fmf wrote: On 11/11/2013 19:39, Ethan Furman wrote: On 11/11/2013 11:19 AM, Denis McMahon wrote: On Mon, 11 Nov

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Alister
On Mon, 11 Nov 2013 18:06:09 -0800, Rick Johnson wrote: In this thread, i want to get to the bottom of this whole global-phobia thing once and for all, and hopefully help you folks understand that globals are not all that bad -- when DESIGNED and USED correctly that is! it is the final

Re: Implementing a multivibrator function with python

2013-11-12 Thread JL
I am actually running python on raspberry pi. The trigger event is a button-press. On Monday, November 11, 2013 6:56:03 PM UTC+8, Dave Angel wrote: On Mon, 11 Nov 2013 01:41:58 -0800 (PST), JL lightai...@gmail.com wrote: - If the event happens again before the 5secs expire, the high

Re: datetime question

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 1:12 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Joel i must thank you for your help. I cannot believe it was so simple. Tnhe server is self aware of its location so why use utcnow() + timedelte( some_digit_here ) when you can just use just now() Did you ever go

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Rick Johnson
On Tuesday, November 12, 2013 8:12:10 AM UTC-6, jongiddy wrote: Can you please give an example where having a module provide a global variable would work better than any of: [snip] Well my point is that the attributes of any Python module are emulating globals already. The fact that we have

ANN: Python Meeting Düsseldorf - 19.11.2013

2013-11-12 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group meeting in Düsseldorf, Germany] ANKÜNDIGUNG Python Meeting Düsseldorf http://pyddf.de/ Ein Treffen

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 1:32 AM, Alister alister.w...@ntlworld.com wrote: As an analogy music has may general rules that musicians are wise to follow. Some pieces of music that break these rules are great because they have broken the rules but most are not. those that are great are great

Re: datetime question

2013-11-12 Thread Ferrous Cranus
Στις 12/11/2013 4:57 μμ, ο/η Chris Angelico έγραψε: On Wed, Nov 13, 2013 at 1:12 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Joel i must thank you for your help. I cannot believe it was so simple. Tnhe server is self aware of its location so why use utcnow() + timedelte( some_digit_here )

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread jongiddy
On Tuesday, November 12, 2013 3:05:25 PM UTC, Rick Johnson wrote: When i type math.pi, i feel as though i'm accessing an interface, BUT I'M NOT! I'm not sure where you get the feeling you're accessing an interface. If I typed this, I would feel like I was trying to change a

Re: Conditional breakpoints in ceval.c

2013-11-12 Thread Demian Brecht
On Sat, Nov 9, 2013 at 5:33 AM, python-list-requ...@python.org wrote: I don't know how to use gdb the way you want, but it sounds like you are on a fascinating journey of discovery. What are you trying to learn? Perhaps we can talk about how the interpreter works. Apologies for not

Re: Conditional breakpoints in ceval.c

2013-11-12 Thread Tim Golden
On 12/11/2013 15:40, Demian Brecht wrote: On Sat, Nov 9, 2013 at 5:33 AM, python-list-requ...@python.org wrote: I don't know how to use gdb the way you want, but it sounds like you are on a fascinating journey of discovery. What are you trying to learn? Perhaps we can talk about how the

Re: datetime question

2013-11-12 Thread Tim Chase
On 2013-11-12 17:24, Ferrous Cranus wrote: But what of the server was in California and i live in Greece? How would datetime.now() work then? Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC time internally for all operations. Only when

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Duncan Booth
=?UTF-8?Q?Frank=2DRene_Sch=C3=A4fer?= fsch...@gmail.com wrote: The ImmutableNester special class type would be a feature to help checks to avoid recursion. Objects of classes derived from ImmutableNester have no mutable access functions and allow insertion of members only at construction

Highest performance [benchmarked] HTTP microframework?

2013-11-12 Thread Alec Taylor
E.g.: using Cython I am currently using Bottle, and it's fine; but provides much more than I need. Investigating rewriting in C++; perhaps using restcgi. Can give that restcgi a bit of a rewrite, removing the boost dependency and replacing it with a C++11 dependency. However given the lack of a

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread random832
On Tue, Nov 12, 2013, at 4:39, Frank-Rene Schäfer wrote: All you've done is proven that you can subvert things. By fiddling with __hash__, __eq__, and so on, you can make sets and dicts behave very oddly. Means nothing. To the contrary, it means everything about what 'isimmutable' could

Re: datetime question

2013-11-12 Thread Ferrous Cranus
Στις 12/11/2013 5:54 μμ, ο/η Tim Chase έγραψε: On 2013-11-12 17:24, Ferrous Cranus wrote: But what of the server was in California and i live in Greece? How would datetime.now() work then? Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC

Re: Implementing a multivibrator function with python

2013-11-12 Thread unknown
On Tue, 12 Nov 2013 06:44:05 -0800, JL wrote: I am actually running python on raspberry pi. The trigger event is a button-press. On Monday, November 11, 2013 6:56:03 PM UTC+8, Dave Angel wrote: On Mon, 11 Nov 2013 01:41:58 -0800 (PST), JL lightai...@gmail.com wrote: - If the event

Re: datetime question

2013-11-12 Thread Tim Chase
On 2013-11-12 17:57, Ferrous Cranus wrote: Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC time internally for all operations. Only when it's about to be presented to the user should you convert it back to local time if you need to.

Re: datetime question

2013-11-12 Thread William Ray Wing
On Nov 12, 2013, at 10:57 AM, Ferrous Cranus nikos.gr...@gmail.com wrote: Στις 12/11/2013 5:54 μμ, ο/η Tim Chase έγραψε: On 2013-11-12 17:24, Ferrous Cranus wrote: But what of the server was in California and i live in Greece? How would datetime.now() work then? Best practices say to

Re: datetime question

2013-11-12 Thread Alister
On Tue, 12 Nov 2013 09:54:44 -0600, Tim Chase wrote: On 2013-11-12 17:24, Ferrous Cranus wrote: But what of the server was in California and i live in Greece? How would datetime.now() work then? Best practices say to move the value from local time to UTC as soon as possible, then

Re: To whoever hacked into my Database

2013-11-12 Thread Antoon Pardon
Op 12-11-13 14:02, Ian Kelly schreef: On Tue, Nov 12, 2013 at 2:09 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: So you are complaining about people being human. Yes that is how people tend to react when they continualy are frustrated by someone who refuses to show the slightest

Re: datetime question

2013-11-12 Thread Mark Lawrence
On 12/11/2013 16:12, Tim Chase wrote: Regardless of the server's configured TZ, best practice still says to normalize everything to UTC (ESPECIALLY if Greece uses the abomination of DST that we suffer here in the US) as soon as possible and keep it that way for as long as possible. -tkc

Re: Implementing a multivibrator function with python

2013-11-12 Thread Antoon Pardon
Op 12-11-13 15:44, JL schreef: I am actually running python on raspberry pi. The trigger event is a button-press. That doesn't help. What does that button-press cause in terms of the OS. Does it cause a signal? Does it produce a number of bytes that can be read from some file like object?

Re: Implementing a multivibrator function with python

2013-11-12 Thread Joel Goldstick
On Tue, Nov 12, 2013 at 11:37 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 12-11-13 15:44, JL schreef: I am actually running python on raspberry pi. The trigger event is a button-press. That doesn't help. What does that button-press cause in terms of the OS. Does it cause a

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Rick Johnson
On Tuesday, November 12, 2013 9:33:50 AM UTC-6, jongiddy wrote: I'm not sure where you get the feeling you're accessing an interface. Because the constant PI should never change. Sure we can argue about granularity of PI, but that argument has no weight on the fact that PI should be a constant.

Re: Show off your Python chops and compete with others

2013-11-12 Thread Nathaniel Sokoll-Ward
Hi Omar, Thanks for the suggestions! Your point about question difficulty is well taken. We previously organized questions into sections based on difficulty or topic, but have been experimenting with doing away with sections entirely. We are developing a way to intelligently deliver questions to

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Tim Chase
On 2013-11-12 09:00, Rick Johnson wrote: Because the constant PI should never change. Sure we can argue about granularity of PI, but that argument has no weight on the fact that PI should be a constant. By placing PI in the module math, we are creating a pseudo interface. We (the creators)

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread Rick Johnson
On Tuesday, November 12, 2013 11:00:37 AM UTC-6, Rick Johnson wrote: [snip] We have all been brainwashed by authorities. First they give us rules, then they give us the power to break those rules. The devil himself said it best: http://www.youtube.com/watch?v=RGR4SFOimlk Hmm. How do we

Re: UTF-32 decoder optimization in Python 3.4

2013-11-12 Thread wxjmfauth
Le mardi 12 novembre 2013 03:11:48 UTC+1, Terry Reedy a écrit : On 11/11/2013 4:41 PM, Mark Lawrence wrote: From http://docs.python.org/dev/whatsnew/3.4.html#optimizations The UTF-32 decoder is now 3x to 4x faster.. Does anybody have any references to this work? All I can find is

Re: datetime question

2013-11-12 Thread MRAB
On 12/11/2013 16:12, Tim Chase wrote: On 2013-11-12 17:57, Ferrous Cranus wrote: Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC time internally for all operations. Only when it's about to be presented to the user should you convert

Re: datetime question

2013-11-12 Thread Joel Goldstick
On Tue, Nov 12, 2013 at 2:09 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 12/11/2013 16:12, Tim Chase wrote: On 2013-11-12 17:57, Ferrous Cranus wrote: Best practices say to move the value from local time to UTC as soon as possible, then store/use the UTC time internally for all

using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
I launch my program with pythonw and begin it with the code below so that all my print()'s go to the log file specified. if sys.executable.find('pythonw') =0: # Redirect all console output to file. sys.stdout = open(pythonw - stdout stderr.log,'w') sys.stderr =

Re: datetime question

2013-11-12 Thread Denis McMahon
On Tue, 12 Nov 2013 12:47:58 +, Andy Lawton wrote: (I think Europe/Kiev is Greece but I don't know) I suspect Nick is really in a coding sweatshop in Asia/Mumbai -- Denis McMahon, denismfmcma...@gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: datetime question

2013-11-12 Thread Denis McMahon
On Tue, 12 Nov 2013 17:57:55 +0200, Ferrous Cranus wrote: or perhaps by confiruing the timezone of the server to use Greece's TimeZone by issuing a linux command? If you have that degreee of control over the server, yes, but UTC is always safer, because if you need to move your server to a

ANN: Leo 4.11 final released: Python scripting IDE

2013-11-12 Thread edreamleo
Leo 4.11 final is now available at: http://sourceforge.net/projects/leo/files/Leo/ Leo 4.11 contains over a year's work on Leo. Leo is a PIM, an IDE and an outliner for programmers, authors and web designers. Leo's unique features organize data in a revolutionary way. Python scripts can easily

Re: using print() with multiprocessing and pythonw

2013-11-12 Thread William Ray Wing
On Nov 12, 2013, at 2:12 PM, Isaac Gerg isaac.g...@gergltd.com wrote: I launch my program with pythonw and begin it with the code below so that all my print()'s go to the log file specified. if sys.executable.find('pythonw') =0: # Redirect all console output to file.

Re: using print() with multiprocessing and pythonw

2013-11-12 Thread Isaac Gerg
Thanks for the reply Bill. The problem is the text i am getting is from a python warning message, not one of my own print() function calls. -- https://mail.python.org/mailman/listinfo/python-list

Re: To whoever hacked into my Database

2013-11-12 Thread Ian Kelly
On Tue, Nov 12, 2013 at 9:27 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 12-11-13 14:02, Ian Kelly schreef: On Tue, Nov 12, 2013 at 2:09 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: So you are complaining about people being human. Yes that is how people tend to react

Chinese Zodiac - python project

2013-11-12 Thread edmundicon
Greetings everyone! This is my first post on this forum :) TL;DR: I want to convert the gregorian years into Chinese years, and deal with the fact that the Chinese new years are different each gregorian year. If I manage to do that, I'll know which year the user is born in Chinese years and

Some python newb help please?

2013-11-12 Thread lrwarren94
So I'm trying to write a program for a problem in class, and something strange is happening that I can't figure out why is happening. I was wondering if you guys could help me fix it? http://pastebin.com/6QZTvx6Z Basically, 1 and 2 work just fine as inputs, but whenever I input 3 or 4, idle

Re: Some python newb help please?

2013-11-12 Thread Mark Lawrence
On 12/11/2013 22:14, lrwarre...@gmail.com wrote: So I'm trying to write a program for a problem in class, and something strange is happening that I can't figure out why is happening. I was wondering if you guys could help me fix it? http://pastebin.com/6QZTvx6Z Basically, 1 and 2 work just

Re: Some python newb help please?

2013-11-12 Thread lrwarren94
On Tuesday, November 12, 2013 4:21:58 PM UTC-6, Mark Lawrence wrote: On 12/11/2013 22:14, lr@gmail.com wrote: So I'm trying to write a program for a problem in class, and something strange is happening that I can't figure out why is happening. I was wondering if you guys could help

Re: datetime question

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 6:14 AM, Joel Goldstick joel.goldst...@gmail.com wrote: In the US, the state of Indiana is really weird. Three separate time zone areas, that don't all flip in the same way. See this for TZ hell: http://en.wikipedia.org/wiki/Indiana_time_zones Timezones are one of

Re: PyMyth: Global variables are evil... WRONG!

2013-11-12 Thread jongiddy
On Tuesday, November 12, 2013 5:00:37 PM UTC, Rick Johnson wrote: 1. Accept that globals are useful, and make them available through a real global syntax, not some attribute of a module that appears to be local, but in reality is global. Then prevent

Re: To whoever hacked into my Database

2013-11-12 Thread Ethan Furman
On 11/12/2013 01:26 PM, Ian Kelly wrote: As for letting the bullies (which I'll take as a metaphor for trolls, since I've not once seen Nikos act like a bully) Every time he uses foul language against somebody he's acting like a bully. Every time he reposts questions and ignores answers he's

Re: Some python newb help please?

2013-11-12 Thread John Strick
Welcome to the world of Python programming! I'm glad you're learning this great language. As to your bug, think about this: in each if or elif statement, you're reading the user input again, so if user input is NOT equal to 1 in the first place, it reads input again. Try to step through your

Re: Some python newb help please?

2013-11-12 Thread Mark Lawrence
First thing would you please read and action this https://wiki.python.org/moin/GoogleGroupsPython so we don't have to read double spaced google crap, thanks. On 12/11/2013 22:27, lrwarre...@gmail.com wrote: On Tuesday, November 12, 2013 4:21:58 PM UTC-6, Mark Lawrence wrote: On 12/11/2013

Re: Chinese Zodiac - python project

2013-11-12 Thread Denis McMahon
On Tue, 12 Nov 2013 14:04:08 -0800, edmundicon wrote: Greetings everyone! This is my first post on this forum :) TL;DR: I want to convert the gregorian years into Chinese years, and deal with the fact that the Chinese new years are different each gregorian year. If I manage to do that, I'll

Re: Some python newb help please?

2013-11-12 Thread Tim Chase
On 2013-11-12 14:27, lrwarre...@gmail.com wrote: if int(raw_input()) == 1: print Moving north y = y + 1 elif int(raw_input()) == 2: print Moving east x = x + 1 elif int(raw_input()) == 3: print Moving south

Re: Some python newb help please?

2013-11-12 Thread MRAB
On 12/11/2013 22:27, lrwarre...@gmail.com wrote: On Tuesday, November 12, 2013 4:21:58 PM UTC-6, Mark Lawrence wrote: On 12/11/2013 22:14, lr@gmail.com wrote: So I'm trying to write a program for a problem in class, and something strange is happening that I can't figure out why is

Re: Some python newb help please?

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 9:27 AM, lrwarre...@gmail.com wrote: I'm not quite sure what you mean by that. it was on that pastebin link. I'll post it again here though. it's no longer than half a page. Inline means what you did in this post. Out-of-line means providing us with a link to where the

Re: Some python newb help please?

2013-11-12 Thread lrwarren94
On Tuesday, November 12, 2013 4:56:35 PM UTC-6, MRAB wrote: On 12/11/2013 22:27, l...@gmail.com wrote: On Tuesday, November 12, 2013 4:21:58 PM UTC-6, Mark Lawrence wrote: On 12/11/2013 22:14, lr@gmail.com wrote: So I'm trying to write a program for a problem in class, and

Re: New user's initial thoughts / criticisms of Python

2013-11-12 Thread Ethan Furman
On 11/11/2013 06:05 PM, Dennis Lee Bieber wrote: On Mon, 11 Nov 2013 09:01:07 -0500, Roy Smith r...@panix.com declaimed the following: Ugh, what's this close paren? Does it terminate the get(), or the print()? I need to go back and count open parens to make sure No... You need to

Re: To whoever hacked into my Database

2013-11-12 Thread Antoon Pardon
Op 12-11-13 12:23, Ned Batchelder schreef: On Tuesday, November 12, 2013 1:31:32 AM UTC-5, ru...@yahoo.com wrote: On 11/11/2013 06:16 PM, Ned Batchelder wrote: Nikos has received a good deal of genuine advice. He has also been genuinely difficult to help. Yes. If he is too difficult to

Re: Basic Python Questions - Oct. 31, 2013

2013-11-12 Thread Chris Angelico
On Tue, Nov 12, 2013 at 9:21 PM, E.D.G. edgrs...@ix.netcom.com wrote: The point is, when people want to make some computer program available for use by others around the world they might want to circulate a version of their program that has such a simple format that anyone can understand

Re: Stop feeding the Ferrous Cranus troll

2013-11-12 Thread Petite Abeille
On Nov 12, 2013, at 2:16 AM, Chuck Quast quast...@gmail.com wrote: why are any of you replying? A Group Is Its Own Worst Enemy” — Clay Shirky, 2003 http://www.shirky.com/writings/herecomeseverybody/group_enemy.html More practically: Help Vampires: A Spotter’s Guide” — Amy Hoy, 2006

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Mark Lawrence
On 12/11/2013 11:10, Frank-Rene Schäfer wrote: Admittedly, I have no knowledge about the python implementation. There is no the regarding Python implementations. Cpython alone is at either 2.7.6 or 3.3.3 with 3.4 at alpha, then there's IronPython, Jython, PyPy and lots more that I'm sure

Re: Some python newb help please?

2013-11-12 Thread Denis McMahon
On Tue, 12 Nov 2013 14:14:42 -0800, lrwarren94 wrote: http://pastebin.com/6QZTvx6Z Work through your code very very carefully. You're doing something in each if branch that you probably only want to do once in each execution of the while loop. If you can't figure it out, I'll post a

Re: using print() with multiprocessing and pythonw

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 7:22 AM, Isaac Gerg isaac.g...@gergltd.com wrote: Thanks for the reply Bill. The problem is the text i am getting is from a python warning message, not one of my own print() function calls. Since sys.stdout is just an object, you could replace it with something that

Re: [Python-Dev] The pysandbox project is broken

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 8:16 AM, Victor Stinner victor.stin...@gmail.com wrote: In 2010, a developper called Tav wrote a sandbox called safelite.py: the sandbox hides sensitive attributes to separate a trusted namespace and an untrusted namespace. Ha, I come full circle. This was the exact

Re: Some python newb help please?

2013-11-12 Thread Chris Angelico
On Wed, Nov 13, 2013 at 10:04 AM, lrwarre...@gmail.com wrote: Thanks a lot! I'll try this out! Sorry to everyone else whose eyes I made bleed. I've never used a newsgroup before...still not really sure what they are. Found this through a google search :\ There's an easy fix. Go to this

Re: To whoever hacked into my Database

2013-11-12 Thread Mark Lawrence
On 12/11/2013 17:22, Antoon Pardon wrote: Op 12-11-13 12:23, Ned Batchelder schreef: On Tuesday, November 12, 2013 1:31:32 AM UTC-5, ru...@yahoo.com wrote: On 11/11/2013 06:16 PM, Ned Batchelder wrote: Nikos has received a good deal of genuine advice. He has also been genuinely difficult to

Re: To whoever hacked into my Database

2013-11-12 Thread Ian Kelly
On Tue, Nov 12, 2013 at 2:59 PM, Ethan Furman et...@stoneleaf.us wrote: Every time he uses foul language against somebody he's acting like a bully. Every time he reposts questions and ignores answers he's acting like a bully. Every time he declares that what he wants is the most important

Re: To whoever hacked into my Database

2013-11-12 Thread Mark Lawrence
On 12/11/2013 23:27, Ian Kelly wrote: On Tue, Nov 12, 2013 at 2:59 PM, Ethan Furman et...@stoneleaf.us wrote: Every time he uses foul language against somebody he's acting like a bully. Every time he reposts questions and ignores answers he's acting like a bully. Every time he declares that

  1   2   >