Hello,
I am using things like:
except Exception as inst:
and
with open("myfile.txt") as f:
for line in f:
print line
Things that seems to be new in python 2.6 and higher, however reading
http://docs.python.org/tutorial/errors.html and this not clear when this new
syntaxes appeared.
jyoun...@kc.rr.com wrote:
Just curious if anyone knows if it's possible to work with pdf documents
with Python? I'd like to do the following:
- Pull out text from each PDF page (to search for specific words)
- Combine separate pdf documents into one document
- Add bookmarks (with destination s
Hi Hans-Peter,
It seems, that my other posts did not get through.
On 08/15/2010 11:17 PM, Hans-Peter Jansen wrote:
> For a starter, tell us the versions of python-sip, and python-qt4 or however
> they're called in Ubuntu. For the record,
> python-sip-4.10.5-1.1
> python-qt4-4.7.4-1.1
> doesn't
[Q] How far can stack [LIFO] solve do automatic garbage collection and
prevent memory leak ?
Because a stack has push and pop, it is able to release and allocate
memory. We envisage an exogenous stack which has malloc() associated
with a push and free() associated with a pop.
The algorithm using
On 08/16/2010 12:06 AM, Alan wrote:
Hello,
I am using things like:
except Exception as inst:
and
The old syntax for exceptions still works in Python2.x (all versions).
The new syntax works in Python2.6+ and Python3.
try:
whatever
except Exception,msg: # Old syntax
* Standish P, on 16.08.2010 09:20:
[garble garble]
Nonsense article "We look for an exogenous stack" cross-posted to
[comp.lang.c],
[comp.lang.c++],
[comp.theory],
[comp.lang.python],
[comp.lang.forth].
Please refrain from following up on Standish' article.
Cheers,
- Alf
--
blog
Standish P, 16.08.2010 09:20:
We envisage an exogenous stack which has malloc() associated
with a push and free() associated with a pop.
What's your use case?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
> f = open("myfile.txt")
> for line in f:
> print line
> f.close() # This is what the "with" statement guarantees; so now just do
> it yourself
Not exactly. More like:
f = open("myfile.txt")
try:
for line in f:
print line
finally:
f.close()
Daniel
--
http://mail.python.org/
On Mon, Aug 16, 2010 at 12:29 AM, Gary Herron
wrote:
> On 08/16/2010 12:06 AM, Alan wrote:
>> Hello,
>> I am using things like:
>> with open("myfile.txt") as f:
>> for line in f:
>> print line
>
> You don't need the new fangled with statement if you want to be compatible
> with older
On 10 Αύγ, 01:43, MRAB wrote:
> Íßêïò wrote:
> > D:\>convert.py
> > File "D:\convert.py", line 34
> > SyntaxError: Non-ASCII character '\xce' in file D:\convert.py on line
> > 34, but no
> > encoding declared; seehttp://www.python.org/peps/pep-0263.htmlfor
> > details
>
> > D:\>
>
> > What does
this is heavily x-posted I'm answering from comp.lang.c
On 16 Aug, 08:20, Standish P wrote:
> [Q] How far can stack [LIFO] solve do automatic garbage collection and
> prevent memory leak ?
I'm having trouble understanding your question (I read your whole post
before replying). I strongly suspec
On Aug 15, 2010, at 11:51 PM, Ian Kelly wrote:
On Sun, Aug 15, 2010 at 4:36 PM, Baba wrote:
Hi Mel,
indeed i thought of generalising the theorem as follows:
If it is possible to buy n, n+1,…, n+(x-1) sets of McNuggets, for
some
x, then it is possible to buy any number of McNuggets >= x, give
On Aug 16, 12:47 am, Nick Keighley
wrote:
> this is heavily x-posted I'm answering from comp.lang.c
>
> On 16 Aug, 08:20, Standish P wrote:
>
> > [Q] How far can stack [LIFO] solve do automatic garbage collection and
> > prevent memory leak ?
>
> I'm having trouble understanding your question (I
www.127760.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
I still keep getting more downloads then usual which is awesome, but I
still don't get any kind of response!
please mail me or reply to this post with what you think, You can tell
me that the program sucks but if you want to, do it in such a way that
you also describe what exactly is the problem an
On 16 Aug, 09:33, Standish P wrote:
> On Aug 16, 12:47 am, Nick Keighley
> > On 16 Aug, 08:20, Standish P wrote:
this is heavily x-posted I'm answering from comp.lang.c
I also note that another poster has suggested you are a troll/loon
you seem to be using some computer science-like terms but
Often the first line of a file tells how to read or interpret the other
lines.
Depending on the result, you then have to ...
- skip the first line, or
- treat the first line in another special way, or
- treat the first line in the same way as the other lines.
I can handle this by opening the file
HI all,
In an effort to avoid re-inventing the wheel so to speak
I was wondering if anyone's come across libraries/tools, etc
that achieve the same kind of functionality as the tools
library in this java app.
http://code.google.com/p/ipddump/source/browse/trunk/src/ipddump/tools/Gsm2Iso.java
Tha
Egbert Bouwman wrote:
> Often the first line of a file tells how to read or interpret the other
> lines.
> Depending on the result, you then have to ...
> - skip the first line, or
> - treat the first line in another special way, or
> - treat the first line in the same way as the other lines.
>
>
On Aug 16, 4:00 pm, Stefan Behnel wrote:
> flebber, 16.08.2010 05:30:
>
> > I am looking at a project that will import and modify an XML file and
> > then export it to a table. Currently a flat file table system should
> > be fine.
>
> > I want to export the modified data to the table and then per
On Aug 14, 11:15 am, Dennis Lee Bieber wrote:
> On Fri, 13 Aug 2010 09:46:34 -0700 (PDT), Praveen
> declaimed the following in
> gmane.comp.python.general:
>
> > I have a text file in this format
> > PRA 1:13 2:20 3:5
> > SRA 1:45 2:75 3:9
> > TRA 1:2 2:65 3:45
>
> > pattern is- Book Chapter:Vers
Hi all,
anybody can point me to a description of how the default comparison of
list objects (or other iterables) works?
Apparently l1 < l2 is equivalent to all ( x < y for x,y in
zip( l1, l2) ), has is shown in the following tests, but I can't find
it described anywhere:
>>> [1,2,3] < [1,3,2
# initialize cookie
cookie = Cookie.SimpleCookie()
cookie.load( os.environ.get('HTTP_COOKIE', '') )
mycookie = cookie.get('visitor')
if ( mycookie and mycookie.value != 'nikos' ) or re.search( r'(cyta|
yandex|13448|spider|crawl)', host ) is None:
blabla...
I checked a
Hi,
I am working on application where it requires uploaded document from has to
be converted to the html pages.Am searching for the suitable python package
i dint found any thing apart from word2html.py.But the word2html.py is not
available for download anywhere can any one suggest me how to solve
On Mon, 16 Aug 2010 13:46:07 +0300, Francesco Bochicchio
wrote:
anybody can point me to a description of how the default comparison of
list objects (or other iterables) works?
Sequences of the same type are compared using lexicographical ordering:
http://docs.python.org/tutorial/datastructur
On Mon, 16 Aug 2010 01:52:52 -0700, Kruptein wrote:
> I still keep getting more downloads then usual which is awesome, but I
> still don't get any kind of response!
Welcome to the real world. For every user who sends you an email, you'll
probably have 1000 who don't. Or 10,000.
> please mail
On Mon, 16 Aug 2010 16:28:46 +1200, Lawrence D'Oliveiro wrote:
> In message <8crg0effb...@mid.individual.net>, Gregory Ewing wrote:
>
>> For example, the constant term of a polynomial is usually called term
>> 0, not term 1.
>
> That is not some kind of ordinal numbering of the terms, that is th
On Sun, 15 Aug 2010 21:01:04 -0700, Carey Tilden wrote:
> On Sun, Aug 15, 2010 at 6:43 PM, bvdp wrote:
>
>> Not to belabor the point .. but "func" is not a standard lib module.
>> It's part of a much larger application ... and in that application it
>> makes perfect sense to terminate the applic
On Aug 16, 10:20 am, Standish P wrote:
> [Q] How far can stack [LIFO] solve do automatic garbage collection and
> prevent memory leak ?
>
Most programs can be written so that most of their memory allocations
are matched by destructors at the same level.
However the allocations that can't be writt
Francesco Bochicchio wrote:
> Hi all,
>
> anybody can point me to a description of how the default comparison of
> list objects (or other iterables) works?
>
> Apparently l1 < l2 is equivalent to all ( x < y for x,y in
> zip( l1, l2) ), has is shown in the following tests, but I can't find
>
On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
> On Aug 16, 1:07 am, Steven D'Aprano cybersource.com.au> wrote:
>> You're passing re.IGNORECASE (which happens to equal 2) as a count
>> argument, not as a flag. Try this instead:
>>
>> >>> re.sub(r"python\d\d" + '(?i)', "Python27", t)
>> '
On Mon, 16 Aug 2010 12:33:51 +1200, Gregory Ewing wrote:
> Ian Kelly wrote:
>> On Fri, Aug 13, 2010 at 11:53 AM, Martin Gregorie
>> wrote:
>
>>> real sample[-500:750];
>
>> Ugh, no. The ability to change the minimum index is evil.
>
> Not always; it can have its uses, particularly when
Steven D'Aprano wrote:
> On Mon, 16 Aug 2010 01:52:52 -0700, Kruptein wrote:
>
>> I still keep getting more downloads then usual which is awesome, but I
>> still don't get any kind of response!
>
> Welcome to the real world. For every user who sends you an email, you'll
> probably have 1000 who
Νίκος wrote:
> # initialize cookie
> cookie = Cookie.SimpleCookie()
> cookie.load( os.environ.get('HTTP_COOKIE', '') )
> mycookie = cookie.get('visitor')
>
> if ( mycookie and mycookie.value != 'nikos' ) or re.search( r'(cyta|
> yandex|13448|spider|crawl)', host ) is None:
> blabla...
> =
On Aug 15, 8:07 pm, Steven D'Aprano wrote:
> On Sun, 15 Aug 2010 16:45:49 -0700, Christopher wrote:
> > I have the following problem:
>
> t="Python26"
> import re
> re.sub(r"python\d\d", "Python27", t)
> > 'Python26'
> re.sub(r"python\d\d", "Python27", t, re.IGNORECASE)
> > 'Py
On Sun, 15 Aug 2010 18:43:49 -0700, bvdp wrote:
[...]
> However, I have gotten hit with more than one comment like yours. So,
> could you please clarify? Is it bad form to exit an application with
> sys.exit(1) when an error in a file the application is processing is
> found?
My two cents worth..
Kxepal wrote:
Hi all!
Sorry for dumb question if it is - I'd tried to google it before but
have found nothing.
Is there any way to dump current logging configuration for future
loading it via fileConfig/dictConfig?
I may be wrong but I don't think so.
JM
--
http://mail.python.org/mailman/li
On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing
wrote:
>> On Aug 7, 2010, at 9:14 PM, John Nagle wrote:
>>
>>> The languages which have real multidimensional arrays, rather
>>> than arrays of arrays, tend to use 1-based subscripts. That
>>> reflects standard practice in mathematics.
>
> Not alway
hi,
pls help me out with the following issue: I wrote a function that uses
a for loop that changes a value of a certain variable each iteration.
What I want is by clicking a button in GUI (with the command bound to
this function) this value each iteration is displayed in a textbox
(label). So far
On Aug 16, 3:20 pm, Standish P wrote:
> [Q] How far can stack [LIFO] solve do automatic garbage collection and
> prevent memory leak ?
>
> Because a stack has push and pop, it is able to release and allocate
> memory. We envisage an exogenous stack which has malloc() associated
> with a push and f
On Aug 16, 7:20 pm, Malcolm McLean
wrote:
> On Aug 16, 10:20 am, Standish P wrote:> [Q] How far can
> stack [LIFO] solve do automatic garbage collection and
> > prevent memory leak ?
>
> Most programs can be written so that most of their memory allocations
> are matched by destructors at the sam
On Mon, 16 Aug 2010 14:26:09 +0300, Peter Otten <__pete...@web.de> wrote:
Steven D'Aprano wrote:
If nobody asks for any changes, then just keep doing what you're doing.
Or you can introduce a bug; if your users don't start complaining you don't
have any...
Even that doesn't work. They may blo
On Aug 16, 12:23 pm, Steven D'Aprano wrote:
> On Sun, 15 Aug 2010 17:36:07 -0700, Alex Willmer wrote:
> > On Aug 16, 1:07 am, Steven D'Aprano > cybersource.com.au> wrote:
> >> You're passing re.IGNORECASE (which happens to equal 2) as a count
> >> argument, not as a flag. Try this instead:
>
> >>
On 2010-08-15, John Nagle wrote:
> In retrospect, C's "pointer=array" concept was a terrible
> mistake.
C arrays are not pointers.
--
Neil Cerutti
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 1:46 pm, Alex Willmer wrote:
> "Note that the (?x) flag changes how the expression is parsed. It
> should be used first in the expression string, or after one or more
> whitespace characters. If there are non-whitespace characters before
> the flag, the results are undefined.
> "http://
On Sat, Aug 14, 2010 at 07:54:11PM -0700, Stephen Hansen wrote:
> How are you implementing refusing-names-beginning-with-underscore, out
> of curiosity?
I compile the expressions and look into co_names, e.g.:
>>> expr = "0 .__class__"
>>> c=compile(expr,"","eval")
>>> c.co_names
('__class__
Hello,
In the last two weeks I've been trying to properly use UpdateLayeredWindow in
Python but I'm only getting errors. I searched a lot on the internet and you
are
the only person who posted about using ULW in Python. I tried with ctypes and I
also tried with win32gui & win32api. I got all k
Hello to all
I am new to python. I am facing problem to use variables as object
attributes. I have to use loop and dynamically add attributes to a
object and for this purpose I have to use variables with object names.
For example-:
Let us say object car has an attribute engine, then
varname = "en
you would need to define a class first with its attiributes and then you may
want to initiate the variables by calling the class initilializer
On Mon, Aug 16, 2010 at 7:10 PM, Vikas Mahajan wrote:
> Hello to all
>
> I am new to python. I am facing problem to use variables as object
> attributes.
On Mon, Aug 16, 2010 at 11:59:57AM +0200, Peter Otten wrote:
>
> with open(filename) as lines:
> first_line = next(lines, "")
> if special(first_line):
> # ...
> else:
> lines = itertools.chain([first_line], lines)
> for line in lines:
> # ...
Beautiful. An
On 16 August 2010 19:23, Nitin Pawar wrote:
> you would need to define a class first with its attiributes and then you may
> want to initiate the variables by calling the class initilializer
>
Actually I have to dynamically add attributes to a object. I am
writing python script for FreeCAD softwa
thanks,
Stef Mientki
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 16, 10:08 am, Vikas Mahajan wrote:
> On 16 August 2010 19:23, Nitin Pawar wrote:> you
> would need to define a class first with its attiributes and then you may
> > want to initiate the variables by calling the class initilializer
>
> Actually I have to dynamically add attributes to a obj
On Aug 16, 10:08 am, Vikas Mahajan wrote:
> On 16 August 2010 19:23, Nitin Pawar wrote:> you
> would need to define a class first with its attiributes and then you may
> > want to initiate the variables by calling the class initilializer
>
> Actually I have to dynamically add attributes to a obj
I have this:
image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
imagelist.append(image1)
imagelist.append(image2)
self.label = tk.Label(image = imagelist[0])
is there a way that i can create a method to switch the display the
image2 (imagelist 2nd
Jean-Michel Pichavant wrote:
Kxepal wrote:
Hi all!
Sorry for dumb question if it is - I'd tried to google it before but
have found nothing.
Is there any way to dump current logging configuration for future
loading it via fileConfig/dictConfig?
I may be wrong but I don't think so.
JM
Please
> is it possible to convert any and all algorithms to stack based ones and thus
> avoid memory leaks?
No, not really. If you keep the allocated things and free them in
reverse order on exit, then well yes, but practically, early free()
frees memory for reuse on low memory systems. In this sense n
On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries wrote:
>> I suspect that there exists a largest unpurchasable quantity iff at
>> least two of the pack quantities are relatively prime, but I have made
>> no attempt to prove this.
>
> That for sure is not correct; packs of 2, 4 and 7 do have a large
In this little script:
import pdb
pdb.set_trace()
def main():
xm = 123
print("Hello,world!")
main()
When I run this, I use pdb to step through it until I reach the point
in main() where the xm variable has been initialized, and then I try
to use pdb to reset the value of xm, and
In article
<414ff6dd-73ef-48df-bd2b-080a2c710...@h17g2000pri.googlegroups.com>,
ChrisChia wrote:
> I have this:
> image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
> image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
>
> imagelist.append(image1)
> imagelist.append(image2)
>
> self.label = tk.La
On Aug 16, 3:14 pm, spinoza wrote:
>
> To build an explicit stack in this program would have been folly, for
> it would have been necessary to either preallocate the stack and thus
> legislate the maximum complexity of source code, or use a lot of
> memory management in the pre-existing runtim
In article
<993d9560-564d-47f0-b2db-6f0c6404a...@g6g2000pro.googlegroups.com>,
Jah_Alarm wrote:
> hi,
>
> pls help me out with the following issue: I wrote a function that uses
> a for loop that changes a value of a certain variable each iteration.
> What I want is by clicking a button in GUI
On Aug 16, 8:40 pm, Vikas Mahajan wrote:
> Hello to all
>
> I am new to python. I am facing problem to use variables as object
> attributes. I have to use loop and dynamically add attributes to a
> object and for this purpose I have to use variables with object names.
>
> For example-:
> Let us sa
On Mon, Aug 16, 2010 at 11:04 AM, Ian Kelly wrote:
> On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries wrote:
>>> I suspect that there exists a largest unpurchasable quantity iff at
>>> least two of the pack quantities are relatively prime, but I have made
>>> no attempt to prove this.
>>
>> That f
On Aug 16, 6:53 pm, Jean-Michel Pichavant
wrote:
> Jean-Michel Pichavant wrote:
> > Kxepal wrote:
> >> Hi all!
> >> Sorry for dumb question if it is - I'd tried to google it before but
> >> have found nothing.
>
> >> Is there any way todumpcurrentloggingconfiguration for future
> >> loading it via
on steven, peter and eliasf:
Well okay I'm new to the world of developing programs, if I encounter
problems I directly post a bug on the relevant page, that's maybe why
I was a bit frustrated :)
but what you three say is indeed true..
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Aug 16, 2010 at 4:18 AM, Steven D'Aprano
wrote:
>
> On Sun, 15 Aug 2010 21:01:04 -0700, Carey Tilden wrote:
>
>> On Sun, Aug 15, 2010 at 6:43 PM, bvdp wrote:
>>
>>> Not to belabor the point .. but "func" is not a standard lib module.
>>> It's part of a much larger application ... and in t
Vikas Mahajan wrote:
On 16 August 2010 19:23, Nitin Pawar wrote:
you would need to define a class first with its attiributes and then you may
want to initiate the variables by calling the class initilializer
Actually I have to dynamically add attributes to a object. I am
writing pytho
Thanks much,
Nope, no homework. This was a serious question from a serious but perhaps
simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
VB(A) and is looking for a replacement of VB and finding that in Python. You
can guess my age now.
Most of my work I do in R nowa
Using the fileinput module to process lists of files:
for line in fileinput.input(logs):
Unfortunately, EOFError does not seem to indicate the end-of-file condition
correctly when using fileinput.
How would you find the EOF file for all the files in the file list 'logs'?
Thank you,
Alex va
On Aug 15, 4:41 pm, Chris Hare wrote:
> I have some code that pulls a value from a database. In this case, it is
> three space delimited words. When I display the value in a Tkinter.Entry
> widget, the text has curly braces around it, even when there are none in the
> surrounding the text in
On Aug 16, 2010, at 5:04 PM, Ian Kelly wrote:
On Mon, Aug 16, 2010 at 4:23 AM, Roald de Vries
wrote:
I suspect that there exists a largest unpurchasable quantity iff at
least two of the pack quantities are relatively prime, but I have
made
no attempt to prove this.
That for sure is not co
Perhaps the ones here who think I was trying to make you do my homework can
actually help me for real. Since I run my own company (not working for any
of the big ones) I can't afford official training in anything. So I teach
myself, help is always welcome and sought for. If that feels like doing
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
I can't share all of the code because it has IP in it but below are
the pertinent s
On 16/08/2010 17:29, Alex van der Spek wrote:
Using the fileinput module to process lists of files:
for line in fileinput.input(logs):
Unfortunately, EOFError does not seem to indicate the end-of-file
condition correctly when using fileinput.
How would you find the EOF file for all the files
On Aug 16, 7:30 am, ChrisChia wrote:
> I have this:
> image1 = ImageTk.PhotoImage(file = "c:\\f1.jpg")
> image2 = ImageTk.PhotoImage(file = "c:\\f2.jpg")
>
> imagelist.append(image1)
> imagelist.append(image2)
>
> self.label = tk.Label(image = imagelist[0])
>
> is there a way that i can create a
On Mon, 16 Aug 2010 18:26:46 +0200
"Alex van der Spek" wrote:
> Nope, no homework. This was a serious question from a serious but perhaps
> simple physicist who grew up with Algol, FORTRAN and Pascal, taught himself
> VB(A) and is looking for a replacement of VB and finding that in Python. You
@All
Thanks a lot.
getattr and setattr functions solved my problem.
--
http://mail.python.org/mailman/listinfo/python-list
Hi there,
Recently I'm facing a problem to convert 4 bytes on an bytearray into
an 32-bit integer. So far as I can see, there're 3 ways: a) using
struct module, b) using ctypes module, and c) manually manipulation.
Are there any other ways?
My sample is as following:
-
import struct
import
On Aug 16, 2010, at 11:40 AM, Jeff Hobbs wrote:
> On Aug 15, 4:41 pm, Chris Hare wrote:
>> I have some code that pulls a value from a database. In this case, it is
>> three space delimited words. When I display the value in a Tkinter.Entry
>> widget, the text has curly braces around it, even
On Mon, 16 Aug 2010 18:44:08 +0200
"Alex van der Spek" wrote:
> Perhaps the ones here who think I was trying to make you do my homework can
You keep replying to my message but as I pointed out in my previous
message, I'm not the one who thought that you posted a homework
question. I'm the one w
I found this question on
http://faq.pygtk.org/index.py?file=faq21.005.htp&req=show
but the answer did not help me.
For example I have a simple program below that I would like to
'compile' with py2exe (or anything else if it's simpler) to run in
windows as a single bundled executable file with no
On 14 Aug, 18:14, Raymond Hettinger wrote:
> On Aug 12, 1:20 pm, Paddy wrote:
>
> > I find myself needing to calculate the difference between two Counters
> > or multisets or bags.
>
> > I want those items that are unique to each bag.
>
> Tell us about your use cases. I'm curious how a program w
On 16/08/2010 17:47, fuglyducky wrote:
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
I can't share all of the code because it h
fuglyducky wrote:
I am trying to call a function with a couple additional parameters.
Unfortunately, for whatever reason I am unable to get this to work. I
am assuming that line is not passing correctly but I don't understand
why???
[snip]
The function's parameters are the wrong way round.
--
h
Here is an excerpt. It works because the end condition is a fixed number
(ln==10255), the approximate number of data lines in a file. If I replace
that condition by EOFError, the program does not do the intended work. It
appears as if EOFError is always true in this case.
+
On Aug 16, 1:23 am, Roald de Vries wrote:
> On Aug 15, 2010, at 11:51 PM, Ian Kelly wrote:
>
>
>
> > On Sun, Aug 15, 2010 at 4:36 PM, Baba wrote:
> >> Hi Mel,
>
> >> indeed i thought of generalising the theorem as follows:
> >> If it is possible to buy n, n+1,…, n+(x-1) sets of McNuggets, for
>
Hello,
Im stuck with this problem:
I would like to os.stat st_mtime to copy only the files that have different
modification date.
so I found something on internet using this kind of line:
if os.stat(dest).st_mtime - os.stat(src).st_mtime > 1:
shutil.copy2 (src, dst)
So I adapted it to my scri
On Monday 16 August 2010, it occurred to Jacky to exclaim:
> Hi there,
>
> Recently I'm facing a problem to convert 4 bytes on an bytearray into
> an 32-bit integer. So far as I can see, there're 3 ways:
> a) using struct module,
Yes, that's what it's for, and that's what you should be using.
On Mon, Aug 16, 2010 at 12:43 PM, Roald de Vries wrote:
>>> I'm pretty sure that if there's no common divisor for all three (or more)
>>> packages (except one), there is a largest unpurchasable quantity. That
>>> is: ∀
>>> i>1: ¬(i|a) ∨ ¬(i|b) ∨ ¬(i|c), where ¬(x|y) means "x is no divider of y"
>>
On 8/16/2010 9:40 AM, Vikas Mahajan wrote:
Hello to all
I am new to python.
Hi, welcome to Python.
Hint 1: 'Variable' is a rather loose term with many meanings. Better to
think in terms of 'name' ('identifier'), which is specifically defined,
and 'object'.
I am facing problem to use varia
Hi Chas, Roald,
These are all complicated formula that i believe are not expected at
this level. If you look at the source (see my first submission) you
will see that this exercise is only the second in a series called
"Introduction to Programming". Therefore i am convinced that there is
a much si
On 8/15/10 10:33 PM, Standish P wrote:
...
I don't understand a lot of your post (and it's clear that I'm not
alone). I don't know whether it's a (human) language problem or simply
an issue of your having read too many books and not having enough
practical experience, but at least I can try t
On Aug 16, 12:38 am, "Alf P. Steinbach /Usenet" wrote:
> * Standish P, on 16.08.2010 09:20:
>
> > [garble garble]
>
> Nonsense article "We look for an exogenous stack" cross-posted to
>
> [comp.lang.c],
> [comp.lang.c++],
> [comp.theory],
> [comp.lang.python],
> [comp.lang.forth].
>
On Aug 16, 10:27 am, Mark Lawrence wrote:
> On 16/08/2010 17:47, fuglyducky wrote:
>
>
>
> > I am trying to call a function with a couple additional parameters.
> > Unfortunately, for whatever reason I am unable to get this to work. I
> > am assuming that line is not passing correctly but I don't
Alban Nona wrote:
Hello,
Im stuck with this problem:
I would like to os.stat st_mtime to copy only the files that have
different modification date.
so I found something on internet using this kind of line:
if os.stat(dest).st_mtime - os.stat(src).st_mtime > 1:
shutil.copy2 (src, dst)
On 8/16/2010 12:44 PM, Alex van der Spek wrote:
Anybody catches any other ways to improve my program (attached), you are
most welcome.
1. You don't need to separate out special characters (TABs, NEWLINEs,
etc.) in a string. So:
bt='-999.25'+'\t''-999.25'+'\t''-999.25'+'\t''-999.25'+'\t'+'
On Sun, 2010-08-15 at 15:14 +0200, Peter Otten wrote:
> ChrisChia wrote:
>
> > dataList = [a, b, c, ...]
> > where a, b, c are objects of a Class X.
> > In Class X, it contains self.name and self.number
> >
> > If i wish to test whether a number (let's say 100) appears in one of
> > the object, a
Hi Thomas,
Thanks for your comments! Please check mine inline.
On Aug 17, 1:50 am, Thomas Jollans wrote:
> On Monday 16 August 2010, it occurred to Jacky to exclaim:
>
> > Hi there,
>
> > Recently I'm facing a problem to convert 4 bytes on an bytearray into
> > an 32-bit integer. So far as I c
On Monday 16 August 2010, it occurred to Jacky to exclaim:
> Hi Thomas,
>
> Thanks for your comments! Please check mine inline.
>
> On Aug 17, 1:50 am, Thomas Jollans wrote:
> > On Monday 16 August 2010, it occurred to Jacky to exclaim:
> > > Hi there,
> > >
> > > Recently I'm facing a problem
1 - 100 of 151 matches
Mail list logo