On Thu, 03 Dec 2009 19:59:30 -0500, David Robinow wrote:
> I've never heard of mbox. Is it written in Python?
It is a file format used for storing email. Wikipedia is your friend:
http://en.wikipedia.org/wiki/Mbox
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
Hey,
sorry if i bother you with a beginners question but i have an issue
with processing a bunch of files. They are some arithmetic lists the
processing of one file is an easy task but how do i process many files?
I tried reading that files in to a list and looping over the list
elements but the
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
> Brad Harms writes:
...
>> 1.) "Regular" attributes, ie. those that are shortcuts to items in the
>> directly associated object's __dict__,
>
> I don't know what you mean by “shortcuts to items”. The names are looked
> up in dictionaries; wh
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
> Brad Harms writes:
>
>> Anyway, it looks like the docs agree with you
>> (http://docs.python.org/glossary.html#term-attribute), so I'm not going
>> to argue.
>
> That's good, because the terms are quite well established in Python
> termino
u...@domain.invalid schrieb:
Hey,
sorry if i bother you with a beginners question but i have an issue
with processing a bunch of files. They are some arithmetic lists the
processing of one file is an easy task but how do i process many files?
I tried reading that files in to a list and looping
On Fri, 04 Dec 2009 09:00:42 +, Steven D'Aprano wrote:
> Not all such attributes are actually found in instance.__dict__.
...I hadn't even considered __slots__ yet. Hm...
> Or dynamic attributes returned by __getattr__ or __getattribute__.
I'm looking for a generic term, because it's too cum
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
...
>>> foo.blah = 222
>>> foo.blah
222
>>> _
Cheers,
- Alf
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 3, 2009 at 7:07 PM, Steven D'Aprano <
st...@remove-this-cybersource.com.au> wrote:
> On Thu, 03 Dec 2009 10:13:14 -0500, Carsten Haese wrote:
>
> > Victor Subervi wrote:
> >> I believe I mentioned in my first post that the "print test" does print
> >> the exact fields being called from
Alf P. Steinbach wrote:
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
>>> foo.blah = 222
>>> foo.blah
222
>>> _
I don't see why it shouldn't work.
BTW, it's a function, not a "routine"
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 04 Dec 2009 10:00:53 +0200, user wrote:
> sorry if i bother you with a beginners question but i have an issue
> with processing a bunch of files. They are some arithmetic lists the
> processing of one file is an easy task but how do i process many files?
> I tried reading that files in to
* Marco Mariani:
Alf P. Steinbach wrote:
Is this guaranteed to work in Python 3.x?
>>> def foo(): pass
>>> foo.blah = 222
>>> foo.blah
222
>>> _
I don't see why it shouldn't work.
For example,
(42).blah = 666
The question is what guarantees or absence thereof the language sp
Filip Gruszczyński a écrit :
I have just written a very small snippet of code and started thinking,
which version would be more pythonic. Basically, I am adding a list of
string to combo box in qt. So, the most obvious way is:
for choice in self.__choices:
choicesBox.addItem(choice)
But
If I want to open a html-page from Python code I can say:
>>> import webbrowser
>>> webbrowser.open('index.html')
Is there a standard way to init an email in users preferred email client
like Thubderbird, Evolution etc.?
Tuomas Vesterinen
--
http://mail.python.org/mailman/listinfo/python-list
geremy condra wrote:
> On Thu, Dec 3, 2009 at 12:57 PM, M.-A. Lemburg wrote:
>> geremy condra wrote:
>>> On Thu, Dec 3, 2009 at 7:04 AM, M.-A. Lemburg wrote:
I think the only major CS data type missing from Python is some
form of (fast) directed graph implementation à la kjGraph:
>
On Dec 3, 2:44 pm, Michael Mossey wrote:
> complete VISIBILITY and control of messages ...
is most important: being able to SEE messages (filtered on from,
to, ...)
in a running system really helps to understand it.
Hierarchy does help structure messages coarse/fine,
but visibility is orthogonal
Hello All !
In my code I try to use a generic approach to work with tuples. Let
"X" be a tuple.
When I want to access a first element of a tuple, I can write: "X[0]".
And that is really working when X is a n-arity tuple, with n>1 (for
example "foo( (1,2,3) )" ).
But when I call my library function
2009/12/4 Петров Александр :
> Hello All !
>
> In my code I try to use a generic approach to work with tuples. Let
> "X" be a tuple.
> When I want to access a first element of a tuple, I can write: "X[0]".
> And that is really working when X is a n-arity tuple, with n>1 (for
> example "foo( (1,2,3)
By adding a before the closing brace of the tuple. Python allow this to
disambiguate between braced expression and tuple
>>> type( (1,) )
2009/12/4 Петров Александр
>
> How could I tell Python that "(1)" is not an integer, but an one-arity
> tuple ?
>
> Thank you,
> Alexander Petrov
> --
> ht
On Fri, Dec 04, 2009 at 15:17 +0300, Петров Александр wrote:
> In my code I try to use a generic approach to work with tuples. Let
> "X" be a tuple.
> When I want to access a first element of a tuple, I can write: "X[0]".
> And that is really working when X is a n-arity tuple, with n>1 (for
> examp
By adding a before the closing brace of the tucomma after 1. Python allow
this to disambiguate between braced expression and tuple
>>> type( (1,) )
2009/12/4 Петров Александр
>
> How could I tell Python that "(1)" is not an integer, but an one-arity
> tuple ?
>
> Thank you,
> Alexander Petrov
On 4 Des, 07:24, "Alf P. Steinbach" wrote:
> And this leads to hierarchical code, which would be nice to indicate by
> indenting, but oops, indenting in Python is syntactically significant...
I've seen this with OpenGL as well. Intendation between glBegin and
glEnd can be achieved with a context
You cannot use gmail account for sending emails with logging module.
It is because google requires TLS connection and logging module
doesn't support it. To use gmail you have to extend
logging.handlers.SMTPHandler class and override SMTPHandler.emit()
method. Here is source code.
(There really sho
So I want an editor with auto complete.
I there any such tool in Python ?(not only in python any other)
I want it for my new lang
vim? emacs? or do you want the editor to be written in Python?
-tkc
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 03 Dec 2009 23:12:39 -0600, Brad Harms wrote:
> On Tue, 2009-12-01 at 14:38 +, Steven D'Aprano wrote:
[...]
>> It's just special double-underscore methods like __init__ __add__ etc
>> that have to be in the class rather than the instance. (To be precise,
>> you can add such a method to
use glob module
Krishna
On Fri, Dec 4, 2009 at 6:37 PM, Diez B. Roggisch wrote:
> u...@domain.invalid schrieb:
>
>> Hey,
>>
>> sorry if i bother you with a beginners question but i have an issue
>> with processing a bunch of files. They are some arithmetic lists the
>> processing of one file is
On 4 Gru, 13:37, Tim Chase wrote:
> > So I want an editor with auto complete.
> > I there any such tool in Python ?(not only in python any other)
> > I want it for my new lang
>
> vim? emacs? or do you want the editor to be written in Python?
>
> -tkc
Try ActiveState Komodo (or free version: Ko
After 5 years of postdoc in Physics I decided to change career and to
move to IT. I decided to learn Object Oriented Programming first. I
chose Python since it was already installed on my Linux machine and it
was easy to tackle for a beginner. In the process of learning Python I
began posting to th
On Dec 4, 5:28 am, Tuomas Vesterinen wrote:
> If I want to open a html-page from Python code I can say:
>
> >>> import webbrowser
> >>> webbrowser.open('index.html')
>
> Is there a standard way to init an email in users preferred email client
> like Thubderbird, Evolution etc.?
>
> Tuomas Vester
From: python-list-bounces+shahmed=sfwmd@python.org
[mailto:python-list-bounces+shahmed=sfwmd@python.org] On Behalf Of Stephen
Hansen
Sent: Thursday, December 03, 2009 10:22 PM
To: python-list@python.org
Subject: Re: memory error
On Thu, Dec 3, 2009 at 5:51 AM, Ahmed, Shakir wro
Siva B wrote:
> Hi friends,
>
> I am writing a new language.
> So I want an editor with auto complete.
> I there any such tool in Python ?(not only in python any other)
> I want it for my new lang
IDLE, the Integrated Development Environment included with your Python
installation nowadays has aut
On 12/04/2009 12:58 PM, Dan Sommers wrote:
> On Fri, 04 Dec 2009 10:00:53 +0200, user wrote:
>
>> sorry if i bother you with a beginners question but i have an issue
>> with processing a bunch of files. They are some arithmetic lists the
>> processing of one file is an easy task but how do i proc
On Dec 4, 6:53 pm, Michele Simionato
wrote:
> After 5 years of postdoc in Physics I decided to changecareerand to
> move to IT. I decided to learn Object Oriented Programming first. I
> chosePythonsince it was already installed on my Linux machine and it
> was easy to tackle for a beginner. In the
Hi,
what is the difference between mutex.mutex and threading.Lock?
Neither the documentation nor a Google search gave me any clue.
Another issue: The documentation of mutex in version 2.6.4 says:
"Deprecated since version The: mutex module has been removed in Python
3.0."
Maybe it should also s
Brad Harms a écrit :
On Tue, 2009-12-01 at 16:58 +0100, Bruno Desthuilliers wrote:
The Music Guy a écrit :
(snip)
Lie Ryan, I think I see what you're saying about using __dict__ to add
members
No "members" in Python - only attributes.
to a class, but it's not quite the same. __dict__ is onl
Ben Finney a écrit :
Brad Harms writes:
(snip)
2.) Attributes whose values are determined or assigned dynamically by
indirectly calling a function (like properties and instancemethods)
Yes, the term “property” seems to do what you want.
The property type is just one possible application o
Brad Harms a écrit :
On Fri, 04 Dec 2009 18:05:03 +1100, Ben Finney wrote:
(snip)
2.) Attributes whose values are determined or assigned dynamically by
indirectly calling a function (like properties and instancemethods)
Yes, the term “property” seems to do what you want.
I wasn't asking what
Peter wrote:
Hi
I have a script like this:
def doit(input, output):
parser = OptionParser()
parser.add_option("-a", "--accounts", dest="accounts", default="all",
help="list available accounts")
...
(options, args) = parser.parse_args()
# main driver
if __name__ == "__mai
u...@domain.invalid wrote:
> On 12/04/2009 12:58 PM, Dan Sommers wrote:
> > On Fri, 04 Dec 2009 10:00:53 +0200, user wrote:
> >
> >> sorry if i bother you with a beginners question but i have an issue
> >> with processing a bunch of files. They are some arithmetic lists the
> >> processing of on
On 3 Dec, 01:17, Antoine Pitrou wrote:
> Le Tue, 01 Dec 2009 06:03:36 -0800, Mark Summerfield a écrit :
>
> > I've produced a 4 page document that provides a very concise summary of
> > Python 2<->3 differences plus the most commonly used new Python 3
> > features. It is aimed at existing Python 2
Hi;
I have this code:
for table in tables:
if table == 'products':
optionsCode = optionsCodeProducts
fromForm = prodsFromForm
try:
fn = getattr(options, table)
fromForm = form.getfirst('%s-options' % table)
fromForm = string.split(fromForm[2:-2], "', '")
On 2009-12-04, Steven D'Aprano wrote:
> How would I re-write this? Just get rid of the try block and
> add a close:
>
> for (exten, list) in files.iteritems():
> f=open('extensions-%s.txt' % exten,'w')
> f.write('\n'.join(list))
"\n".join is a cute shortcut, but if you use it you must rem
M.-A. Lemburg wrote:
geremy condra wrote:
On Thu, Dec 3, 2009 at 12:57 PM, M.-A. Lemburg wrote:
geremy condra wrote:
On Thu, Dec 3, 2009 at 7:04 AM, M.-A. Lemburg wrote:
I think the only major CS data type missing from Python is some
form of (fast) directed graph implementation à la kjGraph
Andre Engels wrote:
2009/12/4 Петров Александр :
Hello All !
In my code I try to use a generic approach to work with tuples. Let
"X" be a tuple.
When I want to access a first element of a tuple, I can write: "X[0]".
And that is really working when X is a n-arity tuple, with n>1 (for
example "fo
Victor Subervi wrote:
Hi;
I have this code:
[snip]
As you can see in the supplied comments, when I loop through for table
'prescriptions', it only prints out the first element of each variable.
When I loop through for table 'products', it prints out all of them! Why?
If you're serious a
Lie Ryan wrote:
> On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote:
>> I'm trying to write some code to diff two fonts. What I have is every
>> character (glyph) of the two fonts in a list. I know that the list is
>> sorted by the codepoints of the characters. What I'd like to ask is
>> whether there is
>> BTW, it's a function, not a "routine"
>
> Wikipedia is your friend, http://en.wikipedia.org/wiki/Subroutine>.
>
>
I don't think it was a problem of comprehension, more one of
appropriate terminology -- AFAIK in Python, they're called functions,
so calling them 'routines' is likely to confuse an
>
> But-- the image does say Pythonwin... are you running this from the
> Pythonwin editor/IDE? Does this script crash out if you run it through the
> normal 'python'(or pythonw) commands? If not, are you attempting to do any
> sort of GUI work in this script? That rarely works within Pythonwin
> d
On Fri, Dec 4, 2009 at 12:43 PM, MRAB wrote:
> Victor Subervi wrote:
>
>> Hi;
>> I have this code:
>>
>>
> [snip]
>
> As you can see in the supplied comments, when I loop through for table
>> 'prescriptions', it only prints out the first element of each variable. When
>> I loop through for tabl
On Fri, Dec 4, 2009 at 2:08 PM, Victor Subervi wrote:
> On Fri, Dec 4, 2009 at 12:43 PM, MRAB wrote:
>
>> Victor Subervi wrote:
>>
>>> Hi;
>>> I have this code:
>>>
>>>
>> [snip]
>>
>> As you can see in the supplied comments, when I loop through for table
>>> 'prescriptions', it only prints out
On 2009-12-04, Ulrich Eckhardt wrote:
> Lie Ryan wrote:
> Thinking about it, I perhaps should store the glyphs in a set
> from the beginning. Question is, can I (perhaps by providing
> the right hash function) sort them by their codepoint? I'll
> have to look at the docs...
No, sets are unordered
Ulrich Eckhardt wrote:
Lie Ryan wrote:
On 12/4/2009 8:28 AM, Ulrich Eckhardt wrote:
I'm trying to write some code to diff two fonts. What I have is every
character (glyph) of the two fonts in a list. I know that the list is
sorted by the codepoints of the characters. What I'd like to ask is
whe
I'm using 2.5.1. How can I tell if I'm running on windows? The
obvious answer, platform.system(), gets complicated. On the python
that comes with cygwin, it returns 'CYGWIN_NT-5.2-WOW64', but I've got
a native windows build of python where it returns 'Microsoft'.
The real problem I'm trying to
On Dec 4, 10:46 am, Roy Smith wrote:
> I'm using 2.5.1. How can I tell if I'm running on windows? The
> obvious answer, platform.system(), gets complicated. On the python
> that comes with cygwin, it returns 'CYGWIN_NT-5.2-WOW64', but I've got
> a native windows build of python where it returns
Try this
import sys
import os
sep = None
if sys.platform == 'cygwin':
sep = ';'
else:
sep = os.pathsep
# then use sep in your path statment
Hope this helps
Thanks,
--
Allan Davis
Member of NetBeans Dream Team
http://wiki.netbeans.or
On 12/5/2009 4:20 AM, Ulrich Eckhardt wrote:
Thinking about it, I perhaps should store the glyphs in a set from the
beginning. Question is, can I (perhaps by providing the right hash function)
sort them by their codepoint? I'll have to look at the docs...
Python does not guarantee that a partic
On 12/5/2009 4:56 AM, Rami Chowdhury wrote:
I don't think it was a problem of comprehension, more one of
appropriate terminology -- AFAIK in Python, they're called functions,
so calling them 'routines' is likely to confuse anyone in a discussion
of Python features.
Human language is not context
On Fri, Dec 4, 2009 at 2:52 PM, geremy condra wrote:
> On Fri, Dec 4, 2009 at 11:17 AM, MRAB wrote:
>> M.-A. Lemburg wrote:
>>>
>>> geremy condra wrote:
On Thu, Dec 3, 2009 at 12:57 PM, M.-A. Lemburg wrote:
>
> geremy condra wrote:
>>
>> On Thu, Dec 3, 2009 at 7:04 AM,
Roy Smith wrote:
>The real problem I'm trying to solve is whether to build a LIBPATH
>environment variable with ';' or ':' delimiting the entries. On the
>cygwin build, os.pathsep returns ':', which isn't really correct. If
>you use that, you end up building paths that look like c:foo:c:bar.
>I
On Fri, Dec 4, 2009 at 1:46 PM, Roy Smith wrote:
> I'm using 2.5.1. How can I tell if I'm running on windows? The
> obvious answer, platform.system(), gets complicated. On the python
> that comes with cygwin, it returns 'CYGWIN_NT-5.2-WOW64', but I've got
> a native windows build of python wher
On 12/4/2009 5:24 PM, Alf P. Steinbach wrote:
Hi.
I discovered with tkinter the registration of widgets with layout
managers (tkinter "geometry" managers, e.g. calls to pack()) needs to be
done very hierarchically.
And this leads to hierarchical code, which would be nice to indicate by
indentin
On 12/5/2009 6:53 AM, geremy condra wrote:
To be fair, I don't think you'd have to look very far to find places
where a graph representation is approximated using some
combination of dicts, sets, and lists. ElementTree comes to mind
immediately, and the dict-of-dicts idea for logging recently
dis
Is it possible to run a list comprehension over a certain portion of
the list? My goals is to be able to run the comprehension on the
innermost elements of the list, but leaving the outermost intact.
--
http://mail.python.org/mailman/listinfo/python-list
>
> Is it possible to run a list comprehension over a certain portion of
> the list? My goals is to be able to run the comprehension on the
> innermost elements of the list, but leaving the outermost intact.
>
Without seeing an example of what your list is, and what you want to turn it
into, its s
On Dec 4, 2:22 pm, Joel Davis wrote:
> Is it possible to run a list comprehension over a certain portion of
> the list? My goals is to be able to run the comprehension on the
> innermost elements of the list, but leaving the outermost intact.
Something like this?
>>> a
[0, 1, 2, 3, 4, 5, 6, 7, 8
On Fri, Dec 4, 2009 at 3:10 PM, Lie Ryan wrote:
> On 12/5/2009 6:53 AM, geremy condra wrote:
>>
>> To be fair, I don't think you'd have to look very far to find places
>> where a graph representation is approximated using some
>> combination of dicts, sets, and lists. ElementTree comes to mind
>>
On Fri, Dec 4, 2009 at 7:52 AM, Victor Subervi wrote:
> except:
>
> except:
> pass
>
If you want any hope of fixing the bug, remove both of these. Really -- do
not use bare excepts.
In the first one, it looks like you're expecting sometimes there to be an
exception: that's okay.
On Dec 3, 10:41 am, Filip Gruszczyński wrote:
> I have just written a very small snippet of code and started thinking,
> which version would be more pythonic. Basically, I am adding a list of
> string to combo box in qt. So, the most obvious way is:
>
> for choice in self.__choices:
> choi
In article ,
David Robinow wrote:
> On Fri, Dec 4, 2009 at 1:46 PM, Roy Smith wrote:
> > I'm using 2.5.1. How can I tell if I'm running on windows? The
> > obvious answer, platform.system(), gets complicated. On the python
> > that comes with cygwin, it returns 'CYGWIN_NT-5.2-WOW64', but I'v
Alf P. Steinbach wrote:
> The question is what guarantees or absence thereof the language
specification, PEPs, intentions, whatever gives/has.
The two docs backed up by PEPs. I suppose the docs could be clearer.
5.3.1 says "The primary must evaluate to an object of a type that
supports attrib
Victor Subervi wrote:
I'm not rude
To me, asking for help without providing sufficient information,
especially when requested, is a form of rudeness.
Think about that and don't be rude.
Exactly.
Terry Jan Reedy
--
http://mail.python.org/mailman/listinfo/python-list
M.-A. Lemburg wrote:
Integrating an easy-to-use graph library into the collections
module (and it's C companion) is good idea.
This would have to be written in C, though,
That's currently in the works, along with database backing.
We'd welcome any help though... hint, hint...
The current th
On Fri, Dec 4, 2009 at 3:46 PM, Stephen Hansen wrote:
>
> On Fri, Dec 4, 2009 at 7:52 AM, Victor Subervi wrote:
>
>> except:
>>
>
>
>> except:
>> pass
>>
>
> If you want any hope of fixing the bug, remove both of these. Really -- do
> not use bare excepts.
>
> In the first one, it lo
If one uses subprocess.Popen(args, ..., shell=True, ...)
When args finishes execution, does the shell terminate? Either way
seems problematic.
If it does not terminate, then it seems as if calls like wait and
communicate would never return. It also seems the subprocess would
never die, and that
Hello i'm using subprocess in this way:
self.luca = subprocess.Popen(['/usr/bin/
dvbtune'+frase_sint],shell=True, stdout=self.f_s_l,stderr=self.f_s_e )
then i kill:
self.luca.Kill()
but the process is still active and the file self.f_s_l increase it
size because the process is not killed.
How i
Howdy folks, I'm working on a JSON Python module [1] and I'm struggling with an
appropriate syntax for dealing with incrementally parsing streams of data as
they come in (off a socket or file object).
The underlying C-level parsing library that I'm using (Yajl [2]) already uses a
callback system
On 12/5/2009 8:27 AM, Terry Reedy wrote:
Victor Subervi wrote:
I'm not rude
To me, asking for help without providing sufficient information,
especially when requested, is a form of rudeness.
Think about that and don't be rude.
Why does this sounds familiar?
http://groups.google.com/group/c
On Dec 4, 3:41 pm, Mensanator wrote:
> On Dec 4, 2:22 pm, Joel Davis wrote:
>
> > Is it possible to run a list comprehension over a certain portion of
> > the list? My goals is to be able to run the comprehension on the
> > innermost elements of the list, but leaving the outermost intact.
>
> Som
On Fri, Dec 4, 2009 at 2:11 PM, Joel Davis wrote:
> Yes, sort of like that but Hansen's code is actually exactly what I
> was getting at, not sure why he deleted it:
Huh? I deleted it?
--S
--
http://mail.python.org/mailman/listinfo/python-list
The mutex class (and module) should not be used, since it is, as you
said, deprecated for 3.0. Like the docs say, it "does not require (or
imply) threading or multi-tasking, though it could be useful for those
purposes." The mutex class' lock() method takes a function and args
and if the mutex is
On Dec 4, 3:50 pm, luca72 wrote:
> Hello i'm using subprocess in this way:
> self.luca = subprocess.Popen(['/usr/bin/
> dvbtune'+frase_sint],shell=True, stdout=self.f_s_l,stderr=self.f_s_e )
>
> then i kill:
> self.luca.Kill()
>
> but the process is still active and the file self.f_s_l increase it
On Dec 4, 12:46 pm, geremy condra wrote:
more common than full-blown graph package).
> Sure, its a tree, which is also a graph. In this case it looks to
> me more like a directed acyclic graph than anything, but its
> pretty much just semantics since the interface is functionally
> equivalent.
I'
On 12/5/2009 8:38 AM, Ross Boylan wrote:
If one uses subprocess.Popen(args, ..., shell=True, ...)
When args finishes execution, does the shell terminate? Either way
seems problematic.
If it does not terminate, then it seems as if calls like wait and
communicate would never return. It also see
Mike Driscoll wrote:
On Dec 4, 5:28 am, Tuomas Vesterinen wrote:
If I want to open a html-page from Python code I can say:
>>> import webbrowser
>>> webbrowser.open('index.html')
Is there a standard way to init an email in users preferred email client
like Thubderbird, Evolution etc.?
Tuom
On 4 Dic, 23:23, Mike Driscoll wrote:
> On Dec 4, 3:50 pm, luca72 wrote:
>
> > Hello i'm using subprocess in this way:
> > self.luca = subprocess.Popen(['/usr/bin/
> > dvbtune'+frase_sint],shell=True, stdout=self.f_s_l,stderr=self.f_s_e )
>
> > then i kill:
> > self.luca.Kill()
>
> > but the proc
Hello,
I want to write a wrapper class around a windows dll. If I put the
class in a module "Refprop.py" then import the class where I want to
use it, does the whole module get read by the interpreter or just the
class code?...
For example if I say the following in "Refprop.py" does the code abov
On 5 Dic, 00:03, luca72 wrote:
> On 4 Dic, 23:23, Mike Driscoll wrote:
>
>
>
> > On Dec 4, 3:50 pm, luca72 wrote:
>
> > > Hello i'm using subprocess in this way:
> > > self.luca = subprocess.Popen(['/usr/bin/
> > > dvbtune'+frase_sint],shell=True, stdout=self.f_s_l,stderr=self.f_s_e )
>
> > > th
In article
,
zeph wrote:
> The mutex class (and module) should not be used, since it is, as you
> said, deprecated for 3.0. Like the docs say, it "does not require (or
> imply) threading or multi-tasking, though it could be useful for those
> purposes."
Over the years, many things about Python
How do I redirect stdin to a text file ? In C, this can be done with the
freopen() standard function, for instance
FILE *foo = freopen("in.txt", "r", stdin);
redirects stdin to the in.txt text file. Does anyone know a freopen()
Python equivalent ?
Notice that I'm not referring to shell redirect
On 5 Dic, 00:14, luca72 wrote:
> On 5 Dic, 00:03, luca72 wrote:
>
>
>
> > On 4 Dic, 23:23, Mike Driscoll wrote:
>
> > > On Dec 4, 3:50 pm, luca72 wrote:
>
> > > > Hello i'm using subprocess in this way:
> > > > self.luca = subprocess.Popen(['/usr/bin/
> > > > dvbtune'+frase_sint],shell=True, st
monkeyboy wrote:
Hello,
I want to write a wrapper class around a windows dll. If I put the
class in a module "Refprop.py" then import the class where I want to
use it, does the whole module get read by the interpreter or just the
class code?...
[snip]
The whole module will be run.
In Pytho
Hi - I'm writing a *very* simple program for my kids. It asks the user
to give it the answer to a maths question and says "right" or "wrong"
They now want a timed version where they would only get so long to
respond to the question.
I'm thinking of some logic where a raw_input call is executed an
candide wrote:
How do I redirect stdin to a text file ? In C, this can be done with
the freopen() standard function, for instance
FILE *foo = freopen("in.txt", "r", stdin);
redirects stdin to the in.txt text file. Does anyone know a freopen()
Python equivalent ?
Notice that I'm not referring
On Fri, 04 Dec 2009 15:10:49 -0800, monkeyboy wrote:
> Hello,
>
> I want to write a wrapper class around a windows dll. If I put the class
> in a module "Refprop.py" then import the class where I want to use it,
> does the whole module get read by the interpreter or just the class
> code?...
Eve
On Dec 5, 12:52 pm, northof40 wrote:
> Hi - I'm writing a *very* simple program for my kids. It asks the user
> to give it the answer to a maths question and says "right" or "wrong"
>
> They now want a timed version where they would only get so long to
> respond to the question.
>
> I'm thinking o
On 12/5/2009 10:31 AM, candide wrote:
How do I redirect stdin to a text file ? In C, this can be done with the
freopen() standard function, for instance
FILE *foo = freopen("in.txt", "r", stdin);
redirects stdin to the in.txt text file. Does anyone know a freopen()
Python equivalent ?
Notice
@MRAB
@Lie Ryan
Thanks, it works fine !
--
http://mail.python.org/mailman/listinfo/python-list
On 12/5/2009 9:41 AM, Carl Banks wrote:
On Dec 4, 12:46 pm, geremy condra wrote:
more common than full-blown graph package).
Sure, its a tree, which is also a graph. In this case it looks to
me more like a directed acyclic graph than anything, but its
pretty much just semantics since the interf
Hello,
All my Python files have extension .py. However, I would like to install
scripts that are meant to be called by the user without the suffix, i.e.
the file scripts/doit.py should end up as /usr/bin/doit.
Apparently the scripts= option of the setup() function does not support
this directly.
Hello All,
I'm trying to add package_data from outside the package directory.
The current project looks like:
.
|-- __init__.py
|-- a
| `-- src
| `-- py
| `-- __init__.py
|-- b
| `-- src
| `-- py
| `-- __init__.py
|-- c
| `-- src
| `-- py
| `--
On Fri, Dec 4, 2009 at 5:41 PM, Carl Banks wrote:
> On Dec 4, 12:46 pm, geremy condra wrote:
> more common than full-blown graph package).
>> Sure, its a tree, which is also a graph. In this case it looks to
>> me more like a directed acyclic graph than anything, but its
>> pretty much just seman
1 - 100 of 121 matches
Mail list logo