On 10 May 2013 03:37, "Thanatos xiao" wrote:
>
> Hey !
>
> Now! I have written a python script . I want to call a golang script in
python script.
> Who can give me some advices?
>
> thanks!
Check out the subprocess module. You can use it to call other programs from
python and get their error code
On Fri, May 10, 2013 at 2:55 PM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> The first hard disk I ever worked with stored 20MB in the space of a
>> 5.25" slot (plus its associated ISA controller card).
>
> Heh. The first hard disk I ever worked with stored 2.4 MB in 6U of rack
On Wednesday, 1 May 2013 13:15:28 UTC+1, Jens Thoms Toerring wrote:
> Alex Norton wrote:
>
> > thanks... ill take a look at the Qt event handling
>
>
>
> It's rather simple: instead of the program running through a
>
> sequence of steps, the program normally is basically doing
>
> nothing.
On Fri, 10 May 2013 01:50:09 -0400, Roy Smith wrote:
> In article <518c7f05$0$29997$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> there is no way to create a C file descriptor in a closed state. Such a
>> thing does not exist. If you have a file descriptor, the file is open
Jussi Piitulainen於 2013年5月9日星期四UTC+8下午7時30分05秒寫道:
> 8 Dihedral writes:
>
>
>
> > This is just the handy style for a non-critical loop.
>
> > In a critical loop, the number of the total operation counts
>
> > does matter in the execution speed.
>
>
>
> Do you use speed often?
There i
On Fri, 10 May 2013 06:22:31 +, Dan Sommers wrote:
> On Fri, 10 May 2013 05:03:10 +, Steven D'Aprano wrote:
>
> There is no sensible use-case for creating a file OBJECT unless it
> initially wraps an open file pointer.
>
>> So far the only counter-examples given aren't counter-ex
On 2013-05-10 12:00, Steven D'Aprano wrote:
But either way, that's fine. You've found an object where it does make
sense to have an explicit "make it go" method: first one entity has
permission to construct the object, but not to open the underlying file.
Another entity has permission to open th
On May 10, 2013, at 12:55 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> The first hard disk I ever worked with stored 20MB in the space of a
>> 5.25" slot (plus its associated ISA controller card).
>
> Heh. The first hard disk I ever worked with stored 2.4 MB in 6U of rack
On 2013-05-09, Dave Angel wrote:
> On 05/09/2013 05:22 PM, rlelis wrote:
>> On Thursday, May 9, 2013 7:19:38 PM UTC+1, Dave Angel wrote:
>>
>> Yes it's a list of string. I don't get the NameError: name 'file_content' is
>> not defined in my code.
>
> That's because you have the 3 lines below whic
On May 10, 2013, at 7:49 AM, William Ray Wing wrote:
> On May 10, 2013, at 12:55 AM, Roy Smith wrote:
>
>> In article ,
>> Chris Angelico wrote:
>>
>>> The first hard disk I ever worked with stored 20MB in the space of a
>>> 5.25" slot (plus its associated ISA controller card).
>>
>> Heh. T
In article <518cc239$0$29997$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> > int fd = 37;
> >
> > I've just created a file descriptor. There is not enough information
> > given to know if it corresponds to an open file or not.
>
> No, you haven't created a file descriptor. You
In article ,
Robert Kern wrote:
> I'd be curious to see in-the-wild instances of the anti-pattern that
> you are talking about, then. I think everyone agrees that entirely
> unmotivated "enable" methods should be avoided, but I have my doubts
> that they come up very often.
As I mentioned e
On 10 May 2013 15:01, Roy Smith wrote:
> In article ,
> Robert Kern wrote:
>
>> I'd be curious to see in-the-wild instances of the anti-pattern that
>> you are talking about, then. I think everyone agrees that entirely
>> unmotivated "enable" methods should be avoided, but I have my doubts
>> th
In article ,
Oscar Benjamin wrote:
> It's not just because of exceptions. In C++ virtual method calls in a
> constructor for a class A will always call the methods of class A even
> if the object being constructed is actually of a subclass B because
> the B part of the object isn't initialised w
On Sat, May 11, 2013 at 12:37 AM, Roy Smith wrote:
> I suppose, if I had a class like this, I would write a factory function
> which called the constructor and post-construction initializer. And
> then I would make the constructor protected.
That sounds like a reasonable plan, with the possible
In article ,
Chris Angelico wrote:
> On Sat, May 11, 2013 at 12:37 AM, Roy Smith wrote:
> > I suppose, if I had a class like this, I would write a factory function
> > which called the constructor and post-construction initializer. And
> > then I would make the constructor protected.
>
> That
On Sat, May 11, 2013 at 12:54 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>
>> On Sat, May 11, 2013 at 12:37 AM, Roy Smith wrote:
>> > I suppose, if I had a class like this, I would write a factory function
>> > which called the constructor and post-construction initializer. An
On 8 mai, 15:19, Roy Smith wrote:
> Apropos to any of the myriad unicode threads that have been going on
> recently:
>
> http://xkcd.com/1209/
--
This reflects a lack of understanding of Unicode.
jmf
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, May 11, 2013 at 1:06 AM, jmfauth wrote:
> On 8 mai, 15:19, Roy Smith wrote:
>> Apropos to any of the myriad unicode threads that have been going on
>> recently:
>>
>> http://xkcd.com/1209/
>
> --
>
>
> This reflects a lack of understanding of Unicode.
By the skywriter, or by the two
On Thu, May 9, 2013 at 10:40 AM, Fábio Santos wrote:
>
> On 9 May 2013 05:19, "dabaichi" wrote:
>>
>> And hereis the output file:
>
> That's not the output file. That is just an HTML fragment to put on your
> page. A full HTML file will need more things, which is the reason why you
> don't see co
On 5/10/2013 11:06 AM, jmfauth wrote:
On 8 mai, 15:19, Roy Smith wrote:
Apropos to any of the myriad unicode threads that have been going on
recently:
http://xkcd.com/1209/
--
This reflects a lack of understanding of Unicode.
jmf
And this reflects a lack of a sense of humor. :)
--N
In article ,
Chris Angelico wrote:
> > Each language has its own set of best practices. Trying to write C++
> > code using Python patterns is as bad as trying to write Python code
> > using C++ patterns.
>
> Agreed, in generality. But what is actually gained by hiding data from
> yourself?
Y
On Sat, May 11, 2013 at 1:24 AM, Ned Batchelder wrote:
> On 5/10/2013 11:06 AM, jmfauth wrote:
>>
>> On 8 mai, 15:19, Roy Smith wrote:
>>>
>>> Apropos to any of the myriad unicode threads that have been going on
>>> recently:
>>>
>>> http://xkcd.com/1209/
>>
>> --
>>
>>
>> This reflects a lac
On 2013-05-10 15:01, Roy Smith wrote:
In article ,
Robert Kern wrote:
I'd be curious to see in-the-wild instances of the anti-pattern that
you are talking about, then. I think everyone agrees that entirely
unmotivated "enable" methods should be avoided, but I have my doubts
that they come up
On Sat, May 11, 2013 at 1:21 AM, Roy Smith wrote:
> In article ,
> Chris Angelico wrote:
>>
>> Agreed, in generality. But what is actually gained by hiding data from
>> yourself?
>
> You're not hiding it from yourself. You're hiding it from the other
> people who are using your code and may not
On May 10, 8:32 pm, Chris Angelico wrote:
> On Sat, May 11, 2013 at 1:24 AM, Ned Batchelder
> wrote:
> > On 5/10/2013 11:06 AM, jmfauth wrote:
>
> >> On 8 mai, 15:19, Roy Smith wrote:
>
> >>> Apropos to any of the myriad unicode threads that have been going on
> >>> recently:
>
> >>>http://xkcd
On 10/05/2013 17:07, rusi wrote:
On May 10, 8:32 pm, Chris Angelico wrote:
On Sat, May 11, 2013 at 1:24 AM, Ned Batchelder wrote:
> On 5/10/2013 11:06 AM, jmfauth wrote:
>> On 8 mai, 15:19, Roy Smith wrote:
>>> Apropos to any of the myriad unicode threads that have been going on
>>> recentl
On 05/10/2013 09:07 AM, rusi wrote:
On May 10, 8:32 pm, Chris Angelico wrote:
On Sat, May 11, 2013 at 1:24 AM, Ned Batchelder wrote:
On 5/10/2013 11:06 AM, jmfauth wrote:
On 8 mai, 15:19, Roy Smith wrote:
Apropos to any of the myriad unicode threads that have been going on
recently:
On Thu, 09 May 2013 05:23:59 +, Steven D'Aprano wrote:
> There is no sensible use-case for creating a file without opening it.
> What would be the point? Any subsequent calls to just about any method
> will fail. Since you have to open the file after creating the file object
> anyway, why m
10.05.13 15:19, Robert Kern написав(ла):
I'd be curious to see in-the-wild instances of the anti-pattern that you
are talking about, then.
Many (if not most) GUI frameworks use this pattern.
button = Button("text")
button.setForegroundColor(...)
button.setBackgoundColor(...)
bu
On 2013-05-10 16:44, Serhiy Storchaka wrote:
10.05.13 15:19, Robert Kern написав(ла):
I'd be curious to see in-the-wild instances of the anti-pattern that you
are talking about, then.
Many (if not most) GUI frameworks use this pattern.
button = Button("text")
button.setForegroundCol
On Sat, May 11, 2013 at 1:44 AM, Serhiy Storchaka wrote:
> 10.05.13 15:19, Robert Kern написав(ла):
>
>> I'd be curious to see in-the-wild instances of the anti-pattern that you
>> are talking about, then.
>
>
> Many (if not most) GUI frameworks use this pattern.
>
> button = Button("text")
>
In article ,
Nobody wrote:
> However: there are situations where it is useful to be able to separate
> the simple task of creating an object from more invasive actions such as
> system calls. Particularly in multi-threaded or real-time code (although
> the latter is a non-starter in Python for m
WHY DID PROPHET MUHAMMAD MARRY AISHA THE YOUNG GIRL?
This is an important book talks about a common issue misunderstood but
misused by lots of thinkers and orientalists. It is “Why did Prophet
Muhammad marry Aisha the young girl?” The author shows the reason
behind their discussion. They want to d
> Now! I have written a python script . I want to call a golang script in
> python script.
> Who can give me some advices?
See http://gopy.qur.me/extensions/examples.html and
http://www.artima.com/weblogs/viewpost.jsp?thread=333589
--
http://mail.python.org/mailman/listinfo/python-list
On 10May2013 09:22, Roy Smith wrote:
| In article <518cc239$0$29997$c3e8da3$54964...@news.astraweb.com>,
| Steven D'Aprano wrote:
| > > int fd = 37;
| > >
| > > I've just created a file descriptor. There is not enough information
| > > given to know if it corresponds to an open file or not.
|
>> There is no sensible use-case for creating a file OBJECT unless it
>> initially wraps an open file pointer.
>>
>>> So far the only counter-examples given aren't counter-examples ...
>>
>> Well, sure, if you discount operations like "create this file" and
>> queries like "could I delete t
> | No, I've created a file descriptor, which is, by definition, an integer.
> | It has nothing to do with C. This is all defined by the POSIX
> | interface. For example, the getdtablesize(2) man page says:
> |
> | "The entries in the descriptor table are numbered with small integers
> | starting
Am 10.05.2013 15:22 schrieb Roy Smith:
That's correct. But, as described above, the system makes certain
guarantees which allow me to reason about the existence or non-existence
os such entries.
Nevertheless, your 37 is not a FD yet.
Let's take your program:
#include
#include
#include
#
39 matches
Mail list logo