On Jul 22, 12:45 am, Terry Reedy wrote:
> On 7/22/2011 12:48 AM, rantingrick wrote:
> > On Jul 21, 11:13 pm, Corey Richardson wrote:
> Hmm. Archives are more like directories than files. Windows, at least,
> seems to partly treat zipfiles as more or less as such.
Yes but a zipfile is just a fil
Frank Millman, 22.07.2011 08:06:
I mentioned in a recent post that I noticed an inconsistency in timeit, and
then reported that I must have made a mistake.
I have now identified my problem, but I don't understand it.
C:\Python32\Lib>timeit.py "int(float('165.0'))"
10 loops, best of 3: 3.52
Hi all
I mentioned in a recent post that I noticed an inconsistency in timeit, and
then reported that I must have made a mistake.
I have now identified my problem, but I don't understand it.
C:\Python32\Lib>timeit.py "int(float('165.0'))"
10 loops, best of 3: 3.52 usec per loop
C:\Python
On Jul 22, 12:05 am, Corey Richardson wrote:
> > >>> from archive import ZipFile, TarFile
> > >>> zf = ZipFile(path, *args)
> > >>> tf = TarFile(path, *args)
>
> I have nothing to do this weekend, I might as well either write my own or
> twist around the existing implementations in the hg repo.
On Jul 21, 10:00 pm, Terry Reedy wrote:
> On 7/21/2011 10:13 AM, Grant Edwards wrote:
>
> > On 2011-07-21, Web Dreamer wrote:
> >> Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans
>
> >> int(x.split('.')[0])
>
> >> But, the problem is the same as with int(float(x)), the integer number is
> >>
On Fri, 2011-07-22 at 01:45 -0400, Terry Reedy wrote:
> On 7/22/2011 12:48 AM, rantingrick wrote:
> > On Jul 21, 11:13 pm, Corey Richardson wrote:
> >> Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011:
> >>
> >>> I may have found the mother of all inconsitency warts when compa
On 7/22/2011 12:48 AM, rantingrick wrote:
On Jul 21, 11:13 pm, Corey Richardson wrote:
Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011:
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different,
Excerpts from rantingrick's message of Fri Jul 22 00:48:37 -0400 2011:
> On Jul 21, 11:13pm, Corey Richardson wrote:
> > I agree, actually.
>
>
> Maybe i can offer a solution. A NEW module called "archive.py" (could
> even be a package!) which exports both the zip and tar file classes.
> However
On Jul 21, 11:13 pm, Corey Richardson wrote:
> Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011:
>
> > I may have found the mother of all inconsitency warts when comparing
> > the zipfile and tarfile modules. Not only are the API's different, but
> > the entry and exits are di
On 7/21/2011 10:40 PM, Thomas 'PointedEars' Lahn wrote:
Billy Mays wrote:
On 07/21/2011 08:46 AM, Web Dreamer wrote:
If you do not want to use 'float()' try:
int(x.split('.')[0])
This is right.
Assuming that the value of `x' is in the proper format, of course. Else you
might easily cut t
Benjamin thanks for replying. i'm not using the python that comes with
cygwin. Its the regular python 2.7.2
To add more info
I'm opening up a zip file within the DLL. The zip file is located in the
same directory.
arg1 is the file name
arg2 is zip password
Thanks,
Sathish
On Fri, Jul 22, 2011 at
Excerpts from rantingrick's message of Thu Jul 21 23:46:05 -0400 2011:
>
> I may have found the mother of all inconsitency warts when comparing
> the zipfile and tarfile modules. Not only are the API's different, but
> the entry and exits are differnet AND zipfile/tarfile do not behave
> like prop
The 13th Python Game Programming Challenge (PyWeek) is coming. It'll
run from the 11th to the 18th of September.
The PyWeek challenge:
- Invites entrants to write a game in one week from scratch either as
an individual or in a team,
- Is intended to be challenging and fun,
- Will hopefully increa
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
>>> import zipfile, tarfile
>>> import os
>>> os.path.ex
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
>>> import zipfile, tarfile
>>> import os
>>> os.path.ex
I may have found the mother of all inconsitency warts when comparing
the zipfile and tarfile modules. Not only are the API's different, but
the entry and exits are differnet AND zipfile/tarfile do not behave
like proper file objects should.
>>> import zipfile, tarfile
>>> import os
>>> os.path.ex
Religious fervor is one thing; freedom of religion is another! ;-)
We strive for readability in our code, yet every printed material designed to
be read, such as books, newspapers, etc., uses a proportional font. I switched
to proportional fonts years ago, and am only reluctantly using fixed wi
Hi all,
I bundled a small script written in python using py2exe. The script uses
many packages and one of them is reportlab.
After bundling using py2exe I tried to run the exe file and it is
returning following error:
C:\Python26\dist>DELchek.exe
Traceback (most recent call last):
File "DELchek
SAKTHEESH wrote:
> I am using Beautiful Soup to parse a html to find all text that is Not
> contained inside any anchor elements
>
> I came up with this code which finds all links within href
_anchors_ _with_ `href' _attribute_ (commonly: links.)
> but not the other way around.
What would tha
Billy Mays wrote:
> On 07/21/2011 08:46 AM, Web Dreamer wrote:
>> If you do not want to use 'float()' try:
>>
>> int(x.split('.')[0])
>
> This is right.
Assuming that the value of `x' is in the proper format, of course. Else you
might easily cut to the first one to three digits of a string rep
On Thu, Jul 21, 2011 at 6:42 PM, Sathish S wrote:
> Hi Ppl,
>
> I have been trying to call a C DLL built in GCC with cygwin and Eclipse IDE
> from python. Since this DLL was built using cygwin it had the following two
> DLL's as dependency. cygwin1.dll and cyggcc_s-1.dll
>
> I'm calling the cygwi
Dan Sommers wrote:
> bruno.desthuilli...@gmail.com wrote:
>> 1/ you can consider the equal sign ('=') is the "binding operator".
>>
>> 2/ since {'key':'val'} is equivalent to dict(key=val), you can consider
>> colons as a binding operator here
>
> But PEP 8 (under Other Recommendations) indicate
> there
> was a steady slowing down of turtles as time goes
The problem is that when the turtle "draws" it does not
just put marks on the canvas, it actually creates new
canvas items.
Canvas items aren't just pixels on the canvas, they are
full-fledged objects which (if you wanted to) you could
Hi Ppl,
I have been trying to call a C DLL built in GCC with cygwin and Eclipse IDE
from python. Since this DLL was built using cygwin it had the following two
DLL's as dependency. cygwin1.dll and cyggcc_s-1.dll
I'm calling the cygwin_dll_init method in the cygwin1.dll before accessing
my DLL. W
On Thu, 21 Jul 2011 13:28:52 -0700, bruno.desthuilli...@gmail.com wrote:
> 1/ you can consider the equal sign ('=') is the "binding operator".
>
> 2/ since {'key':'val'} is equivalent to dict(key=val), you can consider
> colons as a binding operator here
But PEP 8 (under Other Recommendations) i
In article ,
Terry Reedy wrote:
> Whether or not they are intended, the rationale is that lining up does
> not work with proportional fonts.
There are very few things I am absolutely religious about, but
programming in a fixed width font is one of them.
--
http://mail.python.org/mailman/list
Andrew Berg wrote:
It has quite a few external dependencies, though (different dependencies
for each platform, so it requires a lot to be cross-platform).
I think that's a bit of an exaggeration -- there's only
one major dependency on each platform, and it's a very
widely used one (currently P
sturlamolden wrote:
Or should modern deskop apps be written with something completely
different, such as HTML5?
I hope not! HTML is great for web pages, but not
everything should be a web page.
--
Greg
--
http://mail.python.org/mailman/listinfo/python-list
On 22/07/11 00:13, victor lucio wrote:
> Hi All,
>
> I'd like to embbed a thin python in one application of mine i'm
> developing so I need to know the module dependencies because I'm going
> to remove some modules.
> I also need to know the best way to rebuild the python core once these
> modules
On 7/21/2011 2:46 PM, Andrew Berg wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
On 2011.07.21 01:32 PM, Thomas Jollans wrote:
So, the PEP says: do not align operators. End of story.
I'm pretty sure that colons, commas and equals signs are not operators.
Whether or not they are in
On 7/21/2011 2:53 PM, Xah Lee wrote:
had hopes that parser expert would show some proper parser solutions…
in particular i think such can be expressed in Parsing Expression
Grammar in just a few lines… but so far no deity came forward to show
the light. lol
I am not a parser expert but 20 year
Could someone help me change the tab completion setting in iPython on
a Windows machine? I would like it to cycle through the available
completions
Thank you.
--
http://mail.python.org/mailman/listinfo/python-list
Hi All,
I'd like to embbed a thin python in one application of mine i'm developing
so I need to know the module dependencies because I'm going to remove some
modules.
I also need to know the best way to rebuild the python core once these
modules have been removed.
So, could you provide me some po
On 07/21/2011 09:23 AM, Xah Lee wrote:
Thanks for the code.
are you willing to make it complete and standalone? i.e. i can run it
like this:
perl Rouslan_Korneychuk.pl dirPath
and it prints any file that has mismatched pair and line/column number
or the char position?
Since you asked, I put
Thanks for your input, everyone.
--
http://mail.python.org/mailman/listinfo/python-list
On 21 juil, 20:46, Andrew Berg wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: RIPEMD160
>
> On 2011.07.21 01:32 PM, Thomas Jollans wrote:> So, the PEP says: do not align
> operators. End of story.
>
> I'm pretty sure that colons, commas and equals signs are not operators.
1/ you can consid
On Jul 21, 1:46 pm, Andrew Berg wrote:
> [snip PGP noise!]
> On 2011.07.21 01:32 PM, Thomas Jollans wrote:
> So, the PEP says: do not align operators. End of story.
>
> I'm pretty sure that colons, commas and equals signs are not operators.
'au contraire mon frere'.
Colons in a dictionary are as
On 7/21/2011 10:13 AM, Grant Edwards wrote:
On 2011-07-21, Web Dreamer wrote:
Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans
int(x.split('.')[0])
But, the problem is the same as with int(float(x)), the integer number is
still not as close as possible as the original float value.
Nobo
On Jul 21, 9:43 am, pyt...@bdurham.com wrote:
> Xah,
>
> 1. Is the following string considered legal?
>
> [ { ( ] ) }
>
> Note: Each type of brace opens and closes in the proper sequence. But
> inter-brace opening and closing does not make sense.
nu!
> Or must a closing brace always balance out
On 2011-07-21, Brandon Harris wrote:
> I don't really think lining things up makes them any easier to
> read. In fact, the consistency in a single space on either side
> of an operator keeps things neat and clean. Also easier to
> maintain in any editor. Always lining up columns of stuff
> require
I don't really think lining things up makes them any easier to read. In
fact, the consistency in a single space on either side of an operator
keeps things neat and clean. Also easier to maintain in any editor.
Always lining up columns of stuff requires readjusting text every time
you add a new
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
On 2011.07.21 01:32 PM, Thomas Jollans wrote:
> So, the PEP says: do not align operators. End of story.
I'm pretty sure that colons, commas and equals signs are not operators.
- --
CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
PGP/
On 21/07/11 19:51, Andrew Berg wrote:
> Looks nice all lined up, but it violates PEP 8 because of those extra
> spaces, which is only because extra spaces look bad in one-line
> assignments that have nothing to do with lists/tuples or dictionaries.
> This is one of those times not to follow PEP 8 t
On Thu, 21 Jul 2011 18:43:48 +0100
Gary Wood wrote:
> Hi
> Thanks for your reply's
> and sorry guys for not explaining properly
> ok the problem with the code, which i never realised before, is it sends the
> first txt file as the header or subject field in an email and the rest in
> the body of t
On 07/21/2011 01:41 PM, Gary Herron wrote:
On 07/21/2011 10:23 AM, Billy Mays wrote:
On 07/21/2011 01:02 PM, Gary wrote:
Hi
Can someone help me with this code below please,
For some reason it will not send me the first text file in the
directory.
I made up an empty file a.txt file with nothing
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I found a couple things that I think should be tweaked in PEP 8. I don't
agree with everything in PEP 8, but I'm not going to debate /those/
points; rather I'm bringing up a couple examples that violate PEP 8, but
don't apply to the reasons given
Hi
Thanks for your reply's
and sorry guys for not explaining properly
ok the problem with the code, which i never realised before, is it sends the
first txt file as the header or subject field in an email and the rest in
the body of the email which i don't want. I would like all the txt files in
th
On 07/21/2011 10:23 AM, Billy Mays wrote:
On 07/21/2011 01:02 PM, Gary wrote:
Hi
Can someone help me with this code below please,
For some reason it will not send me the first text file in the
directory.
I made up an empty file a.txt file with nothing on it and it sends the
files i need but wo
2011/7/21 JB :
> I'm currently using python 2.7, with numpy and scipy already
> installed, but I can't seem to install Scikits.timeseries. I've
> downloaded the windows installer from sourceforge, but when I run it,
> it checks for a 2.6 installation, and obviously doesn't find the 2.7
> folder. An
On 07/21/2011 10:02 AM, Gary wrote:
Hi
Can someone help me with this code below please,
For some reason it will not send me the first text file in the directory.
I made up an empty file a.txt file with nothing on it and it sends the
files i need but would like to fix the code.
Thanks
total
On 07/21/2011 01:02 PM, Gary wrote:
Hi
Can someone help me with this code below please,
For some reason it will not send me the first text file in the directory.
I made up an empty file a.txt file with nothing on it and it sends the
files i need but would like to fix the code.
Thanks
total =
On Jul 21, 10:02 am, Gary wrote:
> For some reason it will not send me the first text file in the directory.
You have to print an unsorted list of the directory to know the name
or the first file in the directory. Files are not stored on disk in
alphabetical order, but are many times sorted in a
Hi
Can someone help me with this code below please,
For some reason it will not send me the first text file in the directory.
I made up an empty file a.txt file with nothing on it and it sends the
files i need but would like to fix the code.
Thanks
total = ' '
os.chdir('/home/woodygar/Deskto
I'm currently using python 2.7, with numpy and scipy already
installed, but I can't seem to install Scikits.timeseries. I've
downloaded the windows installer from sourceforge, but when I run it,
it checks for a 2.6 installation, and obviously doesn't find the 2.7
folder. Anyone know of a 2.7 instal
Xah,
1. Is the following string considered legal?
[ { ( ] ) }
Note: Each type of brace opens and closes in the proper sequence. But
inter-brace opening and closing does not make sense.
Or must a closing brace always balance out with the most recent opening
brace like so?
[ { ( ) } ]
2. If the
Ok. Here's a preliminary report.
〈Lisp, Python, Perl, Ruby … Code to Validate Matching Brackets〉
http://xahlee.org/comp/validate_matching_brackets.html
it's taking too much time to go thru.
right now, i consider only one valid code, by Raymond Hettinger (with
minor edit from others).
right now,
On 7/20/11 9:05 AM, rantingrick wrote:
On Jul 19, 9:44 pm, Kevin Walzer wrote:
2. Bloatware. Qt and wxWidgets are C++ application frameworks. (Python
has a standard library!)
Again, so? This isn't applicable to Tk, by the way. It's a GUI toolkit
specifically designed for scripting languages.
On Thu, Jul 21, 2011 at 6:58 AM, Xah Lee wrote:
> Thanks a lot for the fix Raymond.
That fix was from Thomas Jollans, not Raymond Hettinger.
> Though, the code seems to have a minor problem.
> It works, but the report is wrong.
> e.g. output:
>
> 30068: c:/Users/h3/web/xahlee_org/p/time_machine\
On 2011-07-21, Web Dreamer wrote:
> Leo Jay a ?crit ce jeudi 21 juillet 2011 11:47 dans
> int(x.split('.')[0])
>
> But, the problem is the same as with int(float(x)), the integer number is
> still not as close as possible as the original float value.
Nobody said that "close as possible to the o
On 07/21/2011 08:46 AM, Web Dreamer wrote:
If you do not want to use 'float()' try:
int(x.split('.')[0])
This is right.
But, the problem is the same as with int(float(x)), the integer number is
still not as close as possible as the original float value.
I would in fact consider doing this:
2011-07-21
On Jul 18, 12:09 am, Rouslan Korneychuk wrote:
> I don't know why, but I just had to try it (even though I don't usually
> use Perl and had to look up a lot of stuff). I came up with this:
>
> /(?|
> (\()(?&matched)([\}\]”›»】〉》」』]|$) |
> (\{)(?&matched)([\)\]”›»】〉》」』]|$) |
>
On 21/07/11 14:29, Xah Lee wrote:
> On Jul 19, 11:14 am, Thomas Jollans wrote:
>> I thought I'd have some fun with multi-processing:
>
> Nice joke. ☺
>
>> Here's a sane version:
>>
>> https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e
>
> hi thomas,
>
> i still cant get y
On Jul 19, 11:07 am, Thomas Jollans wrote:
> On 19/07/11 18:54, Xah Lee wrote:
>
>
>
>
>
>
>
>
>
> > On Sunday, July 17, 2011 2:48:42 AM UTC-7, Raymond Hettinger wrote:
> >> On Jul 17, 12:47 am, Xah Lee wrote:
> >>> i hope you'll participate. Just post solution here. Thanks.
>
> >>http://pastebin
On Jul 19, 11:14 am, Thomas Jollans wrote:
> I thought I'd have some fun with multi-processing:
Nice joke. ☺
> Here's a sane version:
>
> https://gist.github.com/1087682/2240a0834463d490c29ed0f794ad15128849ff8e
hi thomas,
i still cant get your code to work. I have a dir named xxdir with a
sing
>
> [1] See separate thread on apparent inconsisteny in timeit timings.- Hide
> quoted text -
>
I must have done something wrong - it is consistent now.
Here are the results -
C:\Python32\Lib>timeit.py "int(float('165.0'))"
10 loops, best of 3: 3.51 usec per loop
C:\Python32\Lib>timeit.py
On Jul 21, 11:53 am, Thomas Jollans wrote:
> On 21/07/11 11:31, Frank Millman wrote:
>
> > Hi all
>
> > I want to convert '165.0' to an integer.
>
> Well, it's not an integer. What does your data look like? How do you
> wish to convert it to int? Do they all represent decimal numbers? If so,
> how
On Jul 21, 11:47 am, Leo Jay wrote:
> On Thu, Jul 21, 2011 at 5:31 PM, Frank Millman wrote:
>
> > Hi all
>
> > I want to convert '165.0' to an integer.
>
> > The obvious method does not work -
>
> x = '165.0'
> int(x)
>
> > Traceback (most recent call last):
> > File "", line 1, in
>
On 21/07/11 11:31, Frank Millman wrote:
> Hi all
>
> I want to convert '165.0' to an integer.
Well, it's not an integer. What does your data look like? How do you
wish to convert it to int? Do they all represent decimal numbers? If so,
how do you want to round them? What if you get '165.xyz' as i
On Thu, Jul 21, 2011 at 5:31 PM, Frank Millman wrote:
>
> Hi all
>
> I want to convert '165.0' to an integer.
>
> The obvious method does not work -
>
x = '165.0'
int(x)
>
> Traceback (most recent call last):
> File "", line 1, in
> ValueError: invalid literal for int() with base 10: '
Hi all
I want to convert '165.0' to an integer.
The obvious method does not work -
x = '165.0'
int(x)
Traceback (most recent call last):
File "", line 1, in
ValueError: invalid literal for int() with base 10: '165.0'
If I convert to a float first, it does work -
int(float(x))
165
Is
On Jul 19, 8:15 pm, Adam Skutt wrote:
> On Jul 19, 9:19 pm, Aaron Staley wrote:
>
> > However, if interpreter 1 overfills the FIFO, we get an error (EAGAIN)>>>
> > f.write('a'*7)
>
> > IOError: [Errno 11] Resource temporarily unavailable
>
> > However interpreter 2 still receives data>> len(
71 matches
Mail list logo