On Wed, 11 Dec 2013 16:18:08 -, Mark Lawrence
wrote:
On 11/12/2013 16:04, Chris Angelico wrote:
I strongly believe that a career
programmer should learn as many languages and styles as possible, but
most of them can wait.
I chuckle every time I read this one. Five years per language,
On Thu, 12 Dec 2013 13:40:36 -0500, Terry Reedy wrote:
> On 12/12/2013 7:08 AM, Steven D'Aprano wrote:
>
>> Please don't focus on the algorithm I gave. Focus on the fact that I
>> could write it like this:
>>
>> if some condition to do with the computer's available memory:
>> make modificat
On Thu, 12 Dec 2013 13:27:16 -0800, Dan Stromberg
wrote:
On Thu, Dec 12, 2013 at 6:16 AM, Grant Edwards
wrote:
I haven't done a lot of UDP, but are you pretty sure UDP can't at
least fragment large packets? What's a router or switch to do if
the
Path MTU isn't large enough for an original
On Fri, Dec 13, 2013 at 11:14 AM, Steven D'Aprano
wrote:
> Back in the 1980s, when I was a Mac user and occasional programmer, there
> were memory manager routines which (if I recall correctly) would tell you
> whether or not an allocation would succeed or not. Macs of that vintage
> didn't have v
On Wed, 11 Dec 2013 23:25:53 -0800, Robert Voigtländer wrote:
> I have a list like this:
>
> a = [(52, 193), .. (36, 133)]
# iterate over the list of tuples
# creates a dictionary n0:[n1a, n1b, n1c ... ]
# from tuples (n0,n1a), (n0,n1b), (n0,n1c) ...
b = {}
for x in a:
if x[0] in b:
Hi,
I wanna ask about Knapsack. I do understand what Knapsack is about. But this
one i faced is a different problem. There is no value. I mean, it's like this,
for example.
I have 4 beams [X0, X1, X2, X3]. Each 1, 2, 2, 3 cm long. I want to make a new
6 cm long connected-beam from these 4 beam
On Thu, 12 Dec 2013 13:54:10 +0100, Peter Otten wrote:
> Steven D'Aprano wrote:
>
>> In any case, sorting in Python is amazingly fast. You may be pleasantly
>> surprised that a version that sorts your data, while nominally O(N log
>> N), may be much faster than an O(N) solution that doesn't requi
On 12/12/2013 06:08 PM, [email protected] wrote:
Hi,
I wanna ask about Knapsack. I do understand what Knapsack is about. But this
one i faced is a different problem. There is no value. I mean, it's like this,
for example.
I have 4 beams [X0, X1, X2, X3]. Each 1, 2, 2, 3 cm long. I want to ma
On Thu, 12 Dec 2013 16:08:33 +0100, Peter Otten wrote:
> Steven D'Aprano wrote:
[...]
>> So, ideally I'd like to write my code like this:
>>
>>
>> table = [(x, i) for i,x in enumerate(iterable)] table.sort()
>> if len(table) < ?:
>> table = [i for x,i in table]
>> else:
>> for x, i i
Op donderdag 12 december 2013 22:23:22 UTC+1 schreef Dan Stromberg:
> On Thu, Dec 12, 2013 at 12:28 AM, Jean Dubois wrote:
>
> > On Thursday, December 12, 2013 12:20:36 AM UTC+1, Dan Stromberg wrote:
>
> >> On Wed, Dec 11, 2013 at 3:08 PM, Jean Dubois wrote:
>
> >>
>
> >> I have an ethernet-r
On Thu, Dec 12, 2013 at 7:23 PM, Jean Dubois wrote:
> Op donderdag 12 december 2013 22:23:22 UTC+1 schreef Dan Stromberg:
>> On Thu, Dec 12, 2013 at 12:28 AM, Jean Dubois
>> wrote:
>>
>> > On Thursday, December 12, 2013 12:20:36 AM UTC+1, Dan Stromberg wrote:
>>
>> >> On Wed, Dec 11, 2013 at 3:0
I have an app that generates a file one a day and would like to email it
using pythons SMTP server.
http://docs.python.org/2/library/smtpd.html#smtpd.SMTPServer
The documentation is kinda sparse and I cant seem to find any good examples.
Basically what I want to do; when my app runs it would initi
Hello,
I am facing some issue when copying or moving file
f=open('/tmp/file1')
s=open('/tmp/file2')
for line in f:
if 'match' not in line:
s.write(line)
import shutil
shutil.move(s, f)
With above prog I am getting error
TypeError: coercing to Unicode: need sting or buffer, file found
W
On 12/12/2013 10:29 PM, Unix SA wrote:
Hello,
I am facing some issue when copying or moving file
f=open('/tmp/file1')
s=open('/tmp/file2')
for line in f:
if 'match' not in line:
s.write(line)
import shutil
shutil.move(s, f)
With above prog I am getting error
TypeError: coercing to U
On Friday, December 13, 2013 9:59:25 AM UTC+5:30, Unix SA wrote:
> s=open('/tmp/file2')
>s.write(line)
Among other things you are missing a write mode
(2nd optional argument to open)
http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
--
https://mail.python.org/
On Friday, December 13, 2013 8:31:37 AM UTC+5:30, Steven D'Aprano wrote:
> I don't know of any reasonable way to tell at runtime which of the two
> algorithms I ought to take. Hard-coding an arbitrary value
> ("if len(table) > 500") is not the worst idea I've ever had, but I'm
> hoping for
In Unix SA
writes:
> f=open('/tmp/file1')
> s=open('/tmp/file2')
> for line in f:
> if 'match' not in line:
> s.write(line)
> import shutil
> shutil.move(s, f)
> With above prog I am getting error
> TypeError: coercing to Unicode: need sting or buffer, file found
> What that means an
On Thursday, December 12, 2013 9:35:23 PM UTC+3, Gary Herron wrote:
> On 12/12/2013 10:05 AM, Amimo Benja wrote:
>
> > I have an issue with a Python script that I will show as follows:
>
> > http://codepad.org/G8Z2ConI
>
> >
>
> > Assume that you have three (well defined) classes: AirBase and V
On Thursday, December 12, 2013 9:55:29 PM UTC+3, Terry Reedy wrote:
> On 12/12/2013 1:35 PM, Gary Herron wrote:
>
> > On 12/12/2013 10:05 AM, Amimo Benja wrote:
>
> >> I have an issue with a Python script that I will show as follows:
>
> >> http://codepad.org/G8Z2ConI
>
> >>
>
> >> Assume that
On Thursday, December 12, 2013 9:59:26 PM UTC+3, MRAB wrote:
> On 12/12/2013 18:05, Amimo Benja wrote:
>
> > I have an issue with a Python script that I will show as follows:
>
> > http://codepad.org/G8Z2ConI
>
> >
>
> > Assume that you have three (well defined) classes: AirBase and VmNet,
>
>
>I've heard the term used often. It means something like, "performs
>well" or "runs fast". It may or may not be an English word, but that
>doesn't stop people from using it :-)
> If "google" can be used to mean "make huge amouts of money with a
> product that is inherently flawed" then I'll
greetings
I am a novice who is really interested in contributing to Python projects.
How and where do I begin?
thanking you in anticipation
--
https://mail.python.org/mailman/listinfo/python-list
> This should work:
> def get_obj():
> tmp = load_package_strict("tmp", basedir)
> return tmp.main.TTT()
Thank you:)
I can only mention that it is working only if __init__.py of pkg contains line:
import main
To avoid modules caching I copy package to the new folder with anot
101 - 123 of 123 matches
Mail list logo