Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Chris Rebert
On Wed, Jan 2, 2013 at 10:01 PM, Ben Finney wrote: > Ian Kelly writes: > >> On Wed, Jan 2, 2013 at 7:24 PM, someone wrote: >> > 1) class somethingWork: Invalid name "somethingWork" (should match >> > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I >> > suppose it wants my class na

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Ben Finney
Ian Kelly writes: > On Wed, Jan 2, 2013 at 7:24 PM, someone wrote: > > 1) class somethingWork: Invalid name "somethingWork" (should match > > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I > > suppose it wants my class name to start with a capital letter ? > > Yes, PEP-8 recommen

Re: Handling Special characters in python

2013-01-02 Thread Chris Rebert
On Wed, Jan 2, 2013 at 5:39 AM, wrote: > On Wednesday, January 2, 2013 12:02:34 PM UTC+5:30, Chris Rebert wrote: >> On Jan 1, 2013 8:48 PM, wrote: >> > On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote: >> > > On Jan 1, 2013 3:41 AM, wrote: >> > > > I am facing one issue in

Re: Can't seem to start on this

2013-01-02 Thread Mitya Sirenef
On 01/03/2013 12:32 AM, Kene Meniru wrote: Mitya Sirenef wrote: > > >> >> Where is snap_size from? Where is LinearMark from? You don't need to >> instantiate LinearMark in B, do it in A. >> > > I want to hide as much of the python syntax from the file "A" so the user > just concentrates on usin

Re: Can't seem to start on this

2013-01-02 Thread Kene Meniru
Mitya Sirenef wrote: > > Where is snap_size from? Where is LinearMark from? You don't need to > instantiate LinearMark in B, do it in A. > I want to hide as much of the python syntax from the file "A" so the user just concentrates on using the classes as illustrated. snap_size is a global se

Re: Can't seem to start on this

2013-01-02 Thread Mitya Sirenef
On 01/02/2013 11:32 PM, Kene Meniru wrote: This sounds so simple but being new to python I am finding it hard to get > started. I want to create a module which I will call "B". There will be > other modules called "C", "D", etc, which will most likely be imported in > "B". Then I want the user

Can't seem to start on this

2013-01-02 Thread Kene Meniru
This sounds so simple but being new to python I am finding it hard to get started. I want to create a module which I will call "B". There will be other modules called "C", "D", etc, which will most likely be imported in "B". Then I want the user to import "B" ONLY into another file I will call

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Mitya Sirenef
On 01/02/2013 10:17 PM, Wayne Werner wrote: On Tue, 1 Jan 2013, Mitya Sirenef wrote: On 01/01/2013 02:02 PM, Roy Smith wrote: That's true with Vim, as well, especially when I'm making a custom mapping and I can NEVER remember what some combination does, even though if I actually needed to use i

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner
On Tue, 1 Jan 2013, Ramchandra Apte wrote: On Friday, 28 December 2012 01:31:16 UTC+5:30, mogul wrote: 'Aloha! I'm new to python, got 10-20 years perl and C experience, all gained on unix alike machines hacking happily in vi, and later on in vim. Now it's python, and currently mainly on

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner
On Tue, 1 Jan 2013, Mitya Sirenef wrote: On 01/01/2013 02:02 PM, Roy Smith wrote: That's true with Vim, as well, especially when I'm making a custom mapping and I can NEVER remember what some combination does, even though if I actually needed to use it, it pops right out, so to find out, I have

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Dave Angel
On 01/02/2013 09:31 PM, someone wrote: > On 01/02/2013 08:31 PM, Ian Kelly wrote: >> On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico >> wrote: >>> Yeah, same applies to most linters I think. You end up disagreeing >>> with the author on half the points. Oh well. Doesn't make the tool >>> useless,

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Ian Kelly
On Wed, Jan 2, 2013 at 7:24 PM, someone wrote: > 1) class somethingWork: Invalid name "somethingWork" (should match > [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose it > wants my class name to start with a capital letter ? Yes, PEP-8 recommends CamelCase for class names.

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Wayne Werner
On Wed, 2 Jan 2013, Michael Torrie wrote: On 01/01/2013 11:43 AM, Mitya Sirenef wrote: Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times). Interesting. I typically use just d3w. 3daW seems to delete 3 lines for me, the same result as d3. Another favorite command is d or c fo

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Terry Reedy
On 1/2/2013 9:24 PM, someone wrote: What pylint says is: 1) class somethingWork: Invalid name "somethingWork" (should match [A-Z_][a-zA-Z0-9]+$), I'm not that good at regular exps, but I suppose it wants my class name to start with a capital letter ? Yes 2) self.lightDone: Invalid name "lig

Re: avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
On Wednesday, January 2, 2013 5:54:18 PM UTC-6, Dave Angel wrote: > On 01/02/2013 05:21 PM, Isaac Won wrote: > > > Hi all, > > > > > > Thanks to Hans, I have had a good progress on my problem. > > > > > > Followings are Hans's Idea: > > > > > > import numpy as np > > > > > > b = [] > >

Re: Python is awesome (Project Euler)

2013-01-02 Thread Roy Smith
In article , Neil Cerutti wrote: > On 2012-12-31, Roy Smith wrote: > > There's a problem I just worked where you need to find the last > > 10 digits of some million-digit prime. Python's long ints > > don't help you there. What does help you is figuring out a way > > to solve the problem that

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 08:31 PM, Ian Kelly wrote: On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico wrote: Yeah, same applies to most linters I think. You end up disagreeing with the author on half the points. Oh well. Doesn't make the tool useless, just means you need to fiddle with it to get it how you

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/03/2013 12:52 AM, Steven D'Aprano wrote: On Wed, 02 Jan 2013 09:26:32 -0500, Dave Angel wrote: Global const values should be ALL_CAPS, so it's obvious that nobody intends to modify them. Like math.pi I suppose? *wink* :-) It's the non-const global attributes that expect to be under

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 03:26 PM, Dave Angel wrote: On 01/02/2013 09:09 AM, someone wrote: On 01/02/2013 01:07 PM, Peter Otten wrote: OMG... I don't want to type those underscores everywhere... Anyway, thank you very much for explaining the meaning of what it wants... Global const values should be AL

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 11:30 PM, Andrew Berg wrote: On 2013.01.02 15:57, Michael Torrie wrote: *. The only place where I've seen an import * that actually belonged was in an __init__.py that brought sub-module symbols into the main package namespace, and even then I figure there's got to be a better w

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 10:57 PM, Michael Torrie wrote: On 01/01/2013 04:49 PM, someone wrote: On 01/01/2013 12:13 PM, Chris Angelico wrote: > You could simply > > import OpenGL.GL as GL You're right - but I forgot to write that even though this maybe should/is recommended many places then I've seen

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Ian Kelly
On Wed, Jan 2, 2013 at 4:52 PM, Steven D'Aprano wrote: > If pylint says that global variables should be named like "__variable__", > that is explicitly going against PEP 8. It doesn't say that anywhere. It includes dunder names in the regex so that you don't get spurious warnings from pylint abo

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Steven D'Aprano
On Wed, 02 Jan 2013 09:26:32 -0500, Dave Angel wrote: > On 01/02/2013 09:09 AM, someone wrote: >> On 01/02/2013 01:07 PM, Peter Otten wrote: >>> pylint wants global names to be uppercase (what PEP 8 recommends for >>> constants) or "special" (two leading and two trailing underscores): >>> >>> THA

Re: avoding the accumulation of array when using loop.

2013-01-02 Thread Dave Angel
On 01/02/2013 05:21 PM, Isaac Won wrote: > Hi all, > > Thanks to Hans, I have had a good progress on my problem. > > Followings are Hans's Idea: > > import numpy as np > > b = [] > c = 4 > f = open("text.file", "r") > > while c < 10: > c = c + 1 > > > f.seek(0,0) > >

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Mitya Sirenef
On 01/02/2013 04:33 PM, Michael Torrie wrote: On 01/01/2013 11:43 AM, Mitya Sirenef wrote: >> Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times). > > Interesting. I typically use just d3w. 3daW seems to delete 3 lines > for me, the same result as d3. Another favorite command is

Re: pygame - importing GL - very bad...

2013-01-02 Thread Andrew Berg
On 2013.01.02 15:57, Michael Torrie wrote: > Why is this solution not to your liking? Python has namespaces for a > reason. They both keep code separated and modular. Use them. At most > you should import the most commonly-used symbols only, and refer to the > rest through their respective name

avoding the accumulation of array when using loop.

2013-01-02 Thread Isaac Won
Hi all, Thanks to Hans, I have had a good progress on my problem. Followings are Hans's Idea: import numpy as np b = [] c = 4 f = open("text.file", "r") while c < 10: c = c + 1 f.seek(0,0) for columns in ( raw.strip().split() for raw in f ):

Re: pygame - importing GL - very bad...

2013-01-02 Thread Michael Torrie
On 01/01/2013 04:49 PM, someone wrote: > On 01/01/2013 12:13 PM, Chris Angelico wrote: > > You could simply > > > > import OpenGL.GL as GL > You're right - but I forgot to write that even though this maybe > should/is recommended many places then I've seen a lot of opengl code on > the interne

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Michael Torrie
On 01/01/2013 11:43 AM, Mitya Sirenef wrote: > Therefore, deleting 3 WORDs is 3daW (mnemonic: del a WORD 3 times). Interesting. I typically use just d3w. 3daW seems to delete 3 lines for me, the same result as d3. Another favorite command is d or c followed by a number and then the right arrow

Graph Drawing

2013-01-02 Thread subhabangalore
Dear Group, In networkx module we generally try to draw the graph as, >>> import networkx as nx >>> G=nx.Graph() >>> G.add_edge(1, 2, weight=4.7 ) >>> G.add_edge(1, 3, weight=4.5 ) . Now, if I want to retrieve the information of traversal from 1 to 3, I can give, G.edges() but I am looking

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Ian Kelly
On Wed, Jan 2, 2013 at 10:57 AM, Chris Angelico wrote: > Yeah, same applies to most linters I think. You end up disagreeing > with the author on half the points. Oh well. Doesn't make the tool > useless, just means you need to fiddle with it to get it how you want > it. It's a lot less work to di

ANN: PyDTLS

2013-01-02 Thread rbit
I would like to announce Datagram Transport Layer Security for Python. From the top of the project README: PyDTLS brings Datagram Transport Layer Security (DTLS - RFC 6347: http://tools.ietf.org/html/rfc6347) to the Python environment. In a nutshell, DTLS brings security (encryption, server authen

Re: Python is awesome (Project Euler)

2013-01-02 Thread Neil Cerutti
On 2012-12-31, Roy Smith wrote: > There's a problem I just worked where you need to find the last > 10 digits of some million-digit prime. Python's long ints > don't help you there. What does help you is figuring out a way > to solve the problem that's not brute-force. I think that's > what Eul

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Matty Sarro
That's really a question for you - do you want the features of an IDE? Aptana includes pydev, and is built on eclipse which is a great swiss-army-knife IDE. If you like KISS, vim is an excellent choice. Go with whichever you are more comfortable using. On Wed, Jan 2, 2013 at 1:36 PM, Neil Cerutti

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Neil Cerutti
On 2012-12-29, Roy Smith wrote: > emacs will parse that, highlight the filenames and line numbers > and if I type M-`, it'll take me to the line of the next error > (including opening the file if it's not already open). > > I assume other smart editors have similar capabilities. > Different tools

Re: New to python, do I need an IDE or is vim still good enough?

2013-01-02 Thread Neil Cerutti
On 2012-12-30, Jamie Paul Griffin wrote: > Stick with what you've been using for the last couple of > decades. These tools have stood the test of time for a good > reason: they're powerful, efficient and made for the task of > programming. There is a good Python plugin for Vim that will allow si

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 4:52 AM, Ian Kelly wrote: > On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico wrote: >> Okay, I have to ask... why? Does it have an exception for names of classes? > > Yes, and for module-level functions. Oh, okay. So the check's a lot more specific than the message implies -

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Ian Kelly
On Wed, Jan 2, 2013 at 7:32 AM, Chris Angelico wrote: > Okay, I have to ask... why? Does it have an exception for names of classes? Yes, and for module-level functions. > I don't like linters that enforce too much style. Catch things that > might be mis-coded (like C's classic "if (x = 1)"), but

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Dave Angel
On 01/02/2013 12:34 PM, Chris Angelico wrote: > On Thu, Jan 3, 2013 at 4:27 AM, Roy Smith wrote: >> In article , >> Chris Angelico wrote: >> I assume you mean timestamps. A date doesn't need to worry about UTC the way a timestamp does. >> I'm not sure how a date and a timestamp differ

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 4:27 AM, Roy Smith wrote: > In article , > Chris Angelico wrote: > >>> I assume you mean timestamps. A date doesn't need to worry about UTC >>> the way a timestamp does. > > I'm not sure how a date and a timestamp differ in any significant > way. A date is just a very low

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Roy Smith
In article , Chris Angelico wrote: >> I assume you mean timestamps. A date doesn't need to worry about UTC >> the way a timestamp does. I'm not sure how a date and a timestamp differ in any significant way. A date is just a very low-precision time. >> 3) Run all your servers with their timezo

RE: New in Python , Need a Mentor

2013-01-02 Thread Sells, Fred
The need for a "python-aware" editor is the commonly held opinion, although the debate about which editor is endless. I use Eclipse + PyDev only because I found it first and like it. The only suggestion I would offer is to separate the business logic completely from the HTML request/response h

Re: New in Python , Need a Mentor

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 3:24 AM, Wolfgang Strobl wrote: > Chris Angelico : >>I strongly recommend IDLE - much >>better editing/recall facilities than the command-line Python has), >>and work through the tutorial: > > Well, this is certainly a matter of taste. I'd recommend using some > small, lang

Re: New in Python , Need a Mentor

2013-01-02 Thread Wolfgang Strobl
Chris Angelico : >On Thu, Jan 3, 2013 at 1:04 AM, NewbiePythonic wrote: >> Hello Friends, >> >> I am very new to python and loved the easiness with which we can deal with >> problems. I would like to take things seriously and develop some good web >> applications. But right now I am stuck and l

Re: why the output is different when i am implementig multiline string

2013-01-02 Thread stringsatif1
thanks cris -- http://mail.python.org/mailman/listinfo/python-list

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 1:28 AM, Roy Smith wrote: > PPS: Some additional hints for staying sane while working with dates: I assume you mean timestamps. A date doesn't need to worry about UTC the way a timestamp does. Beyond that, I agree with most of your comments. > 3) Run all your servers with

Re: got stuck in equation

2013-01-02 Thread DJC
On 02/01/13 05:20, Ramchandra Apte wrote: On Tuesday, 1 January 2013 22:55:21 UTC+5:30, Usama Khan wrote: am just a begginer bro. . jus learnt if elif while nd for loop. . can u just display me the coding u want. .it could save my time that i have while searchning SN out. . i will give u that

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Chris Angelico
On Wed, Jan 2, 2013 at 11:07 PM, Peter Otten <__pete...@web.de> wrote: > someone wrote: >> Another thing is that I don't understand this warning: >> >> Invalid name "original_format" (should match (([A-Z_][A-Z0-9_]*)| >> > (__.*__))$) >> >> I get it everywhere... I don't understand how it wants me

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Roy Smith
In article , Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. In what timez

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Dave Angel
On 01/02/2013 09:09 AM, someone wrote: > On 01/02/2013 01:07 PM, Peter Otten wrote: >> someone wrote: >> >>> On 01/01/2013 01:56 PM, Peter Otten wrote: >> from module import * # pylint: disable=W0622 >>> >>> Oh, I just learned something new now... How come I cannot type >>> "#pylint: >>> enabl

Re: New in Python , Need a Mentor

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 1:04 AM, NewbiePythonic wrote: > Hello Friends, > > I am very new to python and loved the easiness with which we can deal with > problems. I would like to take things seriously and develop some good web > applications. But right now I am stuck and looking for a mentor who

Re: why the output is different when i am implementig multiline string

2013-01-02 Thread Dave Angel
On 01/02/2013 09:00 AM, stringsat...@gmail.com wrote: '''hello > world''' > 'hello\nworld' fred=''' hello > world''' print(fred) > hello > world What you're seeing has nothing to do with the triple quotes, and everything to do with how you're using the debugger. In one case, you j

Re: why the output is different when i am implementig multiline string

2013-01-02 Thread Chris Angelico
On Thu, Jan 3, 2013 at 1:00 AM, wrote: '''hello > world''' > 'hello\nworld' fred=''' hello > world''' print(fred) > hello > world That's because repr() converts the newline into "\n", while print renders it literally. Check out repr() in the docs: http://docs.python.org/3/librar

Re: ignore case only for a part of the regex?

2013-01-02 Thread wxjmfauth
Le mercredi 2 janvier 2013 00:09:45 UTC+1, Vlastimil Brom a écrit : > 2013/1/1 Steven D'Aprano : > > > On Sun, 30 Dec 2012 10:20:19 -0500, Roy Smith wrote: > > > > > >> The way I would typically do something like this is build my regexes in > > >> all lower case and .lower() the text I was matc

Re: pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 01:07 PM, Peter Otten wrote: someone wrote: On 01/01/2013 01:56 PM, Peter Otten wrote: from module import * # pylint: disable=W0622 Oh, I just learned something new now... How come I cannot type "#pylint: enable=W0622" in the line just below the import ? With what intended

Re: pickle module doens't work

2013-01-02 Thread Omer Korat
Yeah, right. I didn't think about that. I'll check in the source how the data is stored. Thanks for helping sort it all out. -- http://mail.python.org/mailman/listinfo/python-list

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 08:39 AM, Steven D'Aprano wrote: On Wed, 02 Jan 2013 00:49:36 +0100, someone wrote: What does this mean? Why does it say 'format" cannot be deleted after I did the wildcard import ? It means that there is no "format" in the current scope, which implies that pygame no longer has

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Dave Angel
On 01/02/2013 03:01 AM, Victor Hooi wrote: > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. > > Acco

New in Python , Need a Mentor

2013-01-02 Thread NewbiePythonic
Hello Friends, I am very new to python and loved the easiness with which we can deal with problems. I would like to take things seriously and develop some good web applications. But right now I am stuck and looking for a mentor who can help me out with improving my skills and knowledge . Looki

Re: pygame - importing GL - very bad...

2013-01-02 Thread someone
On 01/02/2013 10:52 AM, alex23 wrote: On Jan 2, 1:01 pm, Nobody wrote: You can't delete built-in names. Actually, you can. If you ever need to shoot yourself in the foot in this particular way, you can always do: del __builtins__.format Not saying you _should_, just that you _can_ :)

why the output is different when i am implementig multiline string

2013-01-02 Thread stringsatif1
>>> '''hello world''' 'hello\nworld' >>> fred=''' hello world''' >>> print(fred) hello world -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling Special characters in python

2013-01-02 Thread anilkumar . dannina
On Wednesday, January 2, 2013 12:02:34 PM UTC+5:30, Chris Rebert wrote: > On Jan 1, 2013 8:48 PM, wrote: > > > On Wednesday, January 2, 2013 12:00:06 AM UTC+5:30, Chris Rebert wrote: > > > > On Jan 1, 2013 3:41 AM, wrote: > > > > > > > > > I am facing one issue in my module. I am gathering da

Re: Python is awesome (Project Euler)

2013-01-02 Thread Ramchandra Apte
On Monday, 31 December 2012 19:48:59 UTC+5:30, Roy Smith wrote: > If you haven't heard of it, you should check out Project Euler > > (http://projecteuler.net/). It's a series of (currently) 408 > > math-oriented programming problems, of varying degrees of difficulty. > > > > The tie-in to

pylint, was Re: pygame - importing GL - very bad...

2013-01-02 Thread Peter Otten
someone wrote: > On 01/01/2013 01:56 PM, Peter Otten wrote: >> from module import * # pylint: disable=W0622 > > Oh, I just learned something new now... How come I cannot type "#pylint: > enable=W0622" in the line just below the import ? With what intended effect? > Another thing is that I don'

Re: got stuck in equation

2013-01-02 Thread alex23
On Jan 2, 3:20 pm, Ramchandra Apte wrote: > If you spend half a minute extra to write your sentences properly > and not use SMS abbreviations, then it would save totally many > minutes of other people's time. But that is not the way of the brogrammer... :) -- http://mail.python.org/mailman/list

Re: pygame - importing GL - very bad...

2013-01-02 Thread alex23
On Jan 2, 1:01 pm, Nobody wrote: > You can't delete built-in names. Actually, you can. If you ever need to shoot yourself in the foot in this particular way, you can always do: del __builtins__.format Not saying you _should_, just that you _can_ :) -- http://mail.python.org/mailman/listinf

Re: Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Vlastimil Brom
2013/1/2 Victor Hooi : > Hi, > > I'm using pysvn to checkout a specific revision based on date - pysvn will > only accept a date in terms of seconds since the epoch. > > I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to > seconds since epoch. > > According to the docs, m

Using mktime to convert date to seconds since epoch - omitting elements from the tuple?

2013-01-02 Thread Victor Hooi
Hi, I'm using pysvn to checkout a specific revision based on date - pysvn will only accept a date in terms of seconds since the epoch. I'm attempting to use time.mktime() to convert a date (e.g. "2012-02-01) to seconds since epoch. According to the docs, mktime expects a 9-element tuple. My q