čt 28. 4. 2022 v 13:33 odesílatel Stephen Tucker
napsal:
>
> Hi PythonList Members,
>
> Consider the following log from a run of IDLE:
>
> ==
>
> Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
> on win32
> Type "copyright", "credits" or "license()" for
22. 3. 2020 v 20:02 Chris Angelico :
>
> When using textwrap.fill() or friends, setting break_long_words=False
> without also setting break_on_hyphens=False has the very strange
> behaviour that a long hyphenated word will still be wrapped. I
> discovered this as a very surprising result when
po 17. 6. 2019 v 11:30 odesílatel Jorge Conrado Conforte
napsal:
>
> HI,
>
> Please someone could help me. How can I create a new color table with the
> values of r g and b that I have. I use the Mataplolib color tables. However,
> I would like to use a new color table with the respective r g b
2018-12-09 17:30 GMT+01:00, Brian Christiansen :
> I have been messing with a program that is inspried by a video on
> youtube that is about the vizualization of pi. I might make a post
> about that program someday, but I want to talk about something else.
> One of the ways of visualizing it is
2018-11-08 2:52 GMT+01:00, NoHaxAllSwagg :
> Hello,
> I have been experiencing difficulty while trying to run scripts on my IDLE
> software, considering that when I run my program, I get an error at the top
> of the page in the “Python 3.7.1” area, highlighting the seven telling me
> that there is
2018-07-24 3:52 GMT+02:00, Sayth Renshaw :
> I have data which is a list of lists of all the full paths in a json
> document.
>
> How can I change the format to be usable when selecting elements?
>
> data = [['glossary'],
> ['glossary', 'title'],
> ['glossary', 'GlossDiv'],
> ['glossary',
2018-03-15 12:54 GMT+01:00 Arkadiusz Bulski :
> I have a custom class (a lazy list-like container) that needs to support
> slicing. The __getitem__ checks if index is of slice type, and does a list
> comprehension over individual integer indexes. The code works fine on
>
Hi,
I can't comment, whether this is the right approach, as I have no
experiences with C++, but for the matching regular expression itself,
I believe, e.g. the following might work for your sample data (I am
not sure, however, what other details or variants should be taken into
account):
2017-11-01 13:49 GMT+01:00 Andrew Z :
> Wolfgang,
> I tried to ran from ide with no rwsults, so now im trying from a terminal
> in xwindow.
> The .plot is the last line in the script and it does hang trying to execute
> it.
>
>
> On Nov 1, 2017 05:44, "Wolfgang Maier" <
>
2017-03-12 17:22 GMT+01:00 :
> Hi All,
>
> I have a string which looks like
>
> a,b,c "4873898374", d, ee "3343,23,23,5,,5,45", f
> "5546,3434,345,34,34,5,34,543,7"
>
> It is comma saperated string, but some of the fields have a double quoted
>
2017-03-12 13:14 GMT+01:00 Chris Green :
...
>
> This question relates to how one communicates between windows/GUIs.
>
> When the program starts theres a main GUI, class name abookgui. If
> you want to add new entries or modify existing entries an edit GUI is
> started in a
2016-10-12 14:24 GMT+02:00 Karlheinz Hoening :
>Hello all,
>
>on my iMac I have installed Windows (7) and I am now trying to install
>Python 3.5.2 (32-bit) under Windows OS.
>Every time after having 'repaired' with the installation procedere I
>receive the
2016-10-01 12:09 GMT+02:00 Sayth Renshaw :
> My main issue is that usually its just x in ,,, for a generator.
>
> But if I change the code
> for meet in roots.iter("meeting"):
>
> to
> for meet in roots("meeting"):
>
> Well its invalid but I need to be able to reference the
2016-07-27 3:15 GMT+02:00 Larry Martell :
> On Tue, Jul 26, 2016 at 8:49 PM, Tom Brown wrote:
>> I used pyinstaller quite a bit 3 years ago. I could brush off the cobwebs
>> and see if I can help if you have not solved it already.
>>
>> What is the
2016-07-15 13:39 GMT+02:00 Steven D'Aprano :
> I'm experimenting with various implementations of product(values). Here's a
> naive version that easily suffers from overflow:
>
> from functools import reduce
> from operator import mul
>
> def product_naive(values):
> return
2016-06-15 5:28 GMT+02:00 Yubin Ruan :
> Hi everyone,
> I am struggling writing a right regex that match what I want:
>
> Problem Description:
>
> Given a string like this:
>
> >>>string = "false_head aaa bbb false_tail \
> true_head some_text_here ccc ddd
2016-04-21 5:07 GMT+02:00 Steven D'Aprano :
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
>
>
> from itertools import groupby
> for key, group in groupby("BBCDDEEE"):
> group
2016-02-08 11:42 GMT+01:00 <c...@isbd.net>:
> Vlastimil Brom <vlastimil.b...@gmail.com> wrote:
>>
>> Hi,
>> your code in
>> http://www.salstat.com/news/linking-wxgrid-to-sqlite-database-in-python-an-example
>>
>> seems to work for me after smal
2016-02-07 12:19 GMT+01:00 :
> I'm using this as a starting point for creating a grid to view and
> edit some sqlite data:-
>
> http://www.salstat.com/news/linking-wxgrid-to-sqlite-database-in-python-an-example
>
> I can actually understand most of it which is a good start.
>
2016-01-23 11:36 GMT+01:00 Marko Rauhamaa :
> rai...@gmail.com:
>
>> Can someone tell me why next code doesn't work?
>>
>> import locale; locale.setlocale(locale.LC_ALL, ""); for i in
>> range(1,20,4): print(locale.format("%2f", i, 1))
>>
>> It gives an error: SyntaxError:
2016-01-22 23:47 GMT+01:00 mg <no...@nowhere.com>:
> Il Fri, 22 Jan 2016 21:10:44 +0100, Vlastimil Brom ha scritto:
>
>> [...]
>
> You explanation of re.findall() results is correct. My point is that the
> documentation states:
>
> re.findall(pattern, stri
2016-01-22 16:50 GMT+01:00 mg :
> Il Fri, 22 Jan 2016 15:32:57 +, mg ha scritto:
>
>> python 3.4.3
>>
>> import re re.search('(ab){2}','abzzabab')
>> <_sre.SRE_Match object; span=(4, 8), match='abab'>
>>
> re.findall('(ab){2}','abzzabab')
>> ['ab']
>>
>> Why for search()
2016-01-02 12:49 GMT+01:00 :
> Hi, newbie here!
> I'm trying to write a python program to find how many trailing zeros are in
> 100! (factorial of 100).
> I used factorial from the math module, but my efforts to continue failed.
> Please help.
>
> Thank you,
> Yehuda
> --
>
2016-01-02 18:34 GMT+01:00 yehudak . <katye2...@gmail.com>:
[partly edited for bottom posting]
> On Sat, Jan 2, 2016 at 5:24 PM, Vlastimil Brom <vlastimil.b...@gmail.com>
> wrote:
>>
>> 2016-01-02 14:14 GMT+01:00 yehudak . <katye2...@gmail.com>:
>>
2016-01-02 14:14 GMT+01:00 yehudak . <katye2...@gmail.com>:
> Vlastimil,
> Thank you so much, but...
> All that is Chinese for me.
> Can you show a 'normal' Python code for me?
>
> Yehuda
>
> On Sat, Jan 2, 2016 at 2:44 PM, Vlastimil Brom <vlastimil.b...@gmail.com
2015-12-21 4:01 GMT+01:00 Steven D'Aprano :
> I have a large number of strings (originally file names) which tend to fall
> into two groups. Some are human-meaningful, but not necessarily dictionary
> words e.g.:
>
>
> baby lions at play
> saturday_morning12
> Fukushima
>
2015-09-10 13:18 GMT+02:00 Gerald :
> Hey,
>
> is there a easy way to copy the content between 2 unique keywords in a .txt
> file?
>
> example.txt
>
> 1, 2, 3, 4
> #keyword1
> 3, 4, 5, 6
> 2, 3, 4, 5
> #keyword2
> 4, 5, 6 ,7
>
>
> Thank you very much
Hi,
just to add
Hi all,
I'd like to as for advise about posibilities of redirecting error
traceback via sys.excepthook in a gui (wxpython in my case) with a
requirement, that the errors from the code typed in the interactive
interpreter (as part of my app) are printed there directly and are not
catched from the
2014-08-09 2:38 GMT+02:00 Nicholas Cannon nicholascann...@gmail.com:
Ok so I am working on a little project and I cant seem to solve something
with it. I have a label and then a clear button and I want all the numbers in
the label to clear when I push the button. This button is on a separate
2014-07-24 14:53 GMT+02:00 fl rxjw...@gmail.com:
Hi,
I have read a lot about Python, but it still has a problem now on a simple
exercise. For example, I want to generate a sine curve. First, I get a time
sequence:
index=range(100)
I import math module, try to calculate sine with
2014-06-11 14:23 GMT+02:00 BrJohan brjo...@gmail.com:
For some genealogical purposes I consider using Python's re module.
...
Now, my problem: Is there a way to decide whether any two - or more - of
those regular expressions will match the same string?
Or, stated a little differently:
Can
2014-05-27 12:59 GMT+02:00 Aman Kashyap amankashyap1...@gmail.com:
I would like to create a regular expression in which i can match the |
special character too.
e.g.
start=|ID=ter54rt543d|SID=ter54rt543d|end=|
I want to only |ID=ter54rt543d| from the above string but i am unable to
2014-05-01 3:57 GMT+02:00 Chris Angelico ros...@gmail.com:
On Thu, May 1, 2014 at 9:46 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
It also works if your starting point is (precisely) the north pole. I
believe that's the canonical answer to the riddle, since there are no
bears in Antarctica.
2014-04-28 18:00 GMT+02:00 Roy Smith r...@panix.com:
I'm using Python 2.7
I have a bunch of floating point values. For example, here's a few (printed
as reprs):
38.0
41.2586
40.752801
49.25
33.7951994
36.8371996
34.1489
45.5
Fundamentally, these numbers
2014-04-22 4:38 GMT+02:00 Igor Korot ikoro...@gmail.com:
...
datetime.datetime.fromtimestamp(1092787200/1000.0)
datetime.datetime(1970, 1, 13, 7, 33, 7, 20)
Is there a way to know if the timestamp has a microseconds?
Thank you.
--
Hi,
I believe, in these cases, you can just test,
2014-03-26 10:40 GMT+01:00 Martin Landa landa.mar...@gmail.com:
Hi all,
I am trying to fix a bug in the project which I am working for. The program
starts on Windows via bat file which calls a Python script to set up the
environment including GUI and allow to launch program-specific tools.
2014-02-11 6:42 GMT+01:00 Igor Korot ikoro...@gmail.com:
Hi, ALL,
I am woking on an application for digital forensic.
In this application I am getting this 2 pieces of information:
atime - long representing the time stamp
atime_nano - long representing the nanoseconds.
What I'd like to do
2014/1/3 eneskri...@gmail.com:
@Rick
I found some solutions for python 2.x, but still, as I am with the future, I
need a futuristic solution or 2, so if anyone else could help me, I'd be
grateful!
--
Hi,
I usually don't use tkinter myself, hence others may have more
idiomatic suggestions,
2013/11/8 Yaşar Arabacı yasar11...@gmail.com:
Hi,
I have a function that returns something like this;
[[[1, 5, 9], [2, 6, 7], [3, 4, 8]], [[1, 6, 8], [2, 4, 9], [3, 5, 7]]]
It is a list of list of lists. Each uppermost list is called a result.
I want to write a code that
shows that each
2013/10/1 cerr ron.egg...@gmail.com:
Hi,
I want to write an extraction tool using CRF++
(http://crfpp.googlecode.com/svn/trunk/doc/index.html).
I have written a trainings file and a template:
training:
banana FOODB-NP
bread FOODI-NP
template:
U01:%x[0,1]
U02:%x[1,1]
and
2013/9/20 Jugurtha Hadjar jugurtha.had...@gmail.com:
Hello,
# I posted this on the tutor list, but my message wasn't displayed
I shared some assembly code (microcontrollers) and I had a comment wit my
e-mail address for contact purposes.
Supposing my name is John Doe and the e-mail is
2013/9/20 Shyam Parimal Katti spk...@nyu.edu:
I have a list of tuples where the number of rows in the list and the number
of columns in tuples of the list will not be constant. i.e.
... i.e.
list_value = [(‘name1’, 1234, ‘address1’ ), (‘name2’, 5678, ‘address2’),
(‘name3’, 1011,
2013/9/18 Venkat Addala venkat.bof...@gmail.com
Hi all,
I have a tuple in this format, which is retrived using MySQLdb, now i want
to remove \n and extra spaces in this.
13L, 'ssDsC', 'CEs5s1, DsC', 'srylscetsmight\nghtscetylsse', '3',
'3q25.1', 151531861L, 151546276L, '+', '1
2013/9/4 vnkumbh...@gmail.com:
example:
print hello # print comment +world= single line comment
print hello '''print comment''' +world = multiple line comment
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
python only has single line comments, which apply from a # to the
2013/9/2 Anthony Papillion papill...@gmail.com:
Hello Everyone,
I have a multi-line string and I need to remove the very first line from
it. How can I do that? I looked at StringIO but I can't seem to figure
out how to properly use it to remove the first line. Basically, I want
to toss the
2013/8/25 David M. Cotter m...@davecotter.com:
i'm sorry this is so confusing, let me try to re-state the problem in as
clear a way as i can.
I have a C++ program, with very well tested unicode support. All logging is
done in utf8. I have conversion routines that work flawlessly, so i can
2013/8/23 Jake Angulo jake.ang...@gmail.com:
Sorry this is a very basic question.
I have a list var which after some evaluation I need to refer to var as a
string.
Pseudocode:
var = ['a', 'b' , 'c' , 'd']
adict = dict(var='string', anothervar='anotherstring')
anotherdict = dict()
if
2013/8/6 Gilles nos...@nospam.com:
Hello
I need to write a small GUI application that should run on Windows and
Mac.
What open-source framework would you recommend? I just need basic
widgets (button, listbox, etc.) and would rather a solution that can
get me up and running fast.
I know
2013/7/7 Steven D'Aprano steve+comp.lang.pyt...@pearwood.info:
I sometimes find myself needing to promote[1] arbitrary numbers
(Decimals, Fractions, ints) to floats. E.g. I might say:
numbers = [float(num) for num in numbers]
or if you prefer:
numbers = map(float, numbers)
The problem
2013/6/27 rusi rustompm...@gmail.com:
I am looking for a quote
(from Whorf/Sapir/Wittgenstein/Humboldt dunno... that 'school')
It goes something like this:
What characterizes a language is not what we can say in it but what we must
-- like it or not -- say.
[...]
Hi,
I belive, the author
2013/4/25 ஆமாச்சு ama...@amachu.me
Hi,
Are there equivalent in any Python libraries that could match function
like PMT in libreoffice?
Refer: https://help.libreoffice.org/Calc/Financial_Functions_Part_Two#PMT
--
Amachu
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
you
2013/3/13 Jiewei Huang jiewe...@gmail.com:
Hi all,
I'm currently stuck at this question on
Writing a function len_str that takes a string as an argument and returns a
pair consisting of the length of the string and the string itself.
Example: len_str('Meaning of life') should return the
2013/3/5 Eric Johansson e...@harvee.org:
I need a simple GUI toolkits like easygui pythoncard. The main reason I
discount both of those is that they are effectively dead as I can see. Last
updates in the 2010/2011 range. Has there been some toolkit to replace them?
And no, the existing
2013/3/5 Ana Dionísio anadionisio...@gmail.com:
Hello!
I have to make a script that calculates temperature, but one of the
parameters is the temperature in the iteration before, for example:
temp = (temp_-1)+1
it = 0
temp = 3
it = 1
temp = 3+1
it = 2
temp = 4+1
How can I do this in
2013/3/4 yomnasala...@gmail.com:
I have a problem with encoding in python 27 shell.
when i write this in the python shell:
w=u'العربى'
It gives me the following error:
Unsupported characters in input
any help?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I guess, you
2013/3/2 andydtay...@gmail.com:
Hi,
I need to create a list of equally spaced times (as in hh:mm AM/PM) within a
day to loop through. Having selected 30 minute intervals I figured I could:
* Create a list from 1 to 48
* Multiply each value by 30
* Convert minutes to a time.
2013/2/23 Devin Jeanpierre jeanpierr...@gmail.com:
Hi folks,
I'm pretty unsure of myself when it comes to unicode. As I understand
it, you're generally supposed to compare things in a case insensitive
manner by case folding, right? So instead of a.lower() == b.lower()
(the ASCII way), you do
2013/1/2 Victor Hooi victorh...@gmail.com:
Hi,
I'm using pysvn to checkout a specific revision based on date - pysvn will
only accept a date in terms of seconds since the epoch.
I'm attempting to use time.mktime() to convert a date (e.g. 2012-02-01) to
seconds since epoch.
According to
2013/1/1 Steven D'Aprano steve+comp.lang.pyt...@pearwood.info:
On Sun, 30 Dec 2012 10:20:19 -0500, Roy Smith wrote:
The way I would typically do something like this is build my regexes in
all lower case and .lower() the text I was matching against them. I'm
curious what you're doing where
2013/1/2 Usama Khan usamazo...@gmail.com:
my question is can we import newtonsmethod from nympy or sciPy?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
After successfully installing SciPy
http://www.scipy.org/Download
you should be able to import the respective modules and use
2013/1/2 Usama Khan usamazo...@gmail.com:
thanks. .
but how to instal scipy. because its in .rar form. .i have extracted the
files to the place where python2.7 is installed. . but everytime i write
import sciPy. .it give me error. .
nd regarding ur question. .
its a long story telling u
2013/1/1 worldsbiggestsabres...@gmail.com:
Hey :)
I'm trying to help my son with an assignment and spending hours making an
inch of progress. I know nothing about programming and I'm trying to learn,
on my own, at a rate faster than possible. I would love a little help!
My son is taking
2012/12/30 Helmut Jarausch jarau...@skynet.be:
Hi,
is there a means to specify that 'ignore-case' should only apply to a part
of a regex?
E.g.
the regex should match Msg-id:, Msg-Id, ... but not msg-id: and so on.
I've tried the pattern
r'^Msg-(?:(?i)id):'
but (?i) makes the whole
2012/12/30 Alvaro Lacerda alacerda...@gmail.com:
The code I wrote is supposed to ask the user to enter a number;
Then tell the user what's going to happen to that number (x / 2 + 5) ;
Then give the user an answer;
I succeeded getting results from even numbers, but when I try diving an
2012/12/19 loïc Lauréote laureote-l...@hotmail.fr:
hi,
I
have a question,
is there a tool to calculate on list ?
something like :
a= [1,1,1,1]
b = [5,9,8,4]
c = a+b*a
print c
[6,10,9,5]
Thx
==
Hi,
for such simpler cases, you may try list comprehensions and probably
the zip(...) function
2012/12/19 loïc Lauréote laureote-l...@hotmail.fr:
hi,
I
have a question,
is there a tool to calculate on list ?
something like :
a= [1,1,1,1]
b = [5,9,8,4]
c = a+b*a
print c
[6,10,9,5]
Thx
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I guess, if you are interested in
2012/12/18 Colin J. Williams c...@ncf.ca:
...
Yes, but py2exe appears limited to Python 2.6.
PyInstaller is another option with similar functionality.
Colin W.
--
http://mail.python.org/mailman/listinfo/python-list
There are versions for python 2.3 - 2.7:
2012/12/17 Anatoli Hristov toli...@gmail.com:
if you only see encoding problems on printing results to your
terminal, its settings or unicode capability might be the cause,
however, if you also get badly encoding items in the database, you are
likely using an inappropriate encoding in some
2012/12/17 Netrick netr...@o2.pl:
So, we have now in python 3 the tile module
http://tktable.sourceforge.net/tile/screenshots/unix.html integrated as
tkinter.ttk. However, in the python and tk docs there is a lot about that
tkk, but only how to set your own style for specific widgets. There is
2012/12/10 qbai...@ihets.org:
I need help with a program i am doing. it is a cryptography program. i am
given a regular alphabet and a key. i need to use the user input and use the
regular alphabet and use the corresponding letter in the key and that becomes
the new letter. i have the
2012/12/5 Nick Mellor thebalance...@gmail.com:
Neil,
Further down the data, found another edge case:
Spring ONION from QLD
Following the spec, the whole line should be description (description starts
at first word that is not all caps.) This case breaks the latest groupby.
N
--
2012/12/6 Neil Cerutti ne...@norwich.edu:
On 2012-12-05, Vlastimil Brom vlastimil.b...@gmail.com wrote:
... PARSNIP, certified organic
I'm not sure on this one.
('PARSNIP', ', certified organic')
--
Neil Cerutti
--
Well, I wasn't either, when I noticed this item, but given
2012/12/4 Nick Mellor thebalance...@gmail.com:
I love the way you guys can write a line of code that does the same as 20 of
mine :)
I can turn up the heat on your regex by feeding it a null description or
multiple white space (both in the original file.) I'm sure you'd adjust, but
at the
2012/10/23 MartinD. cyberdi...@gmail.com:
Hi,
I'm new to Python.
Does someone has an idea what's wrong. I tried everything. The only regex
that is tested is the last one in a whole list of regex in keywords.txt
Thanks!
Martin
def checkKeywords( str, lstKeywords ):
2012/10/21 Vincent Davis vinc...@vincentdavis.net:
I am looking for a good way to get every pair from a string. For example,
input:
x = 'apple'
output
'ap'
'pp'
'pl'
'le'
I am not seeing a obvious way to do this without multiple for loops, but
maybe there is not :-)
In the end I am
2012/9/25 Levi Nie levinie...@gmail.com:
the code:
import wx
app=wx.App()
win=wx.Frame(None)
win.ShowFullScreen()
app.MainLoop()
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
win.ShowFullScreen(True)
should work, the boolean parameter appears to be required.
hth,
vbr
--
2012/9/14 Tim Chase python.l...@tim.thechases.com:
On 09/13/12 16:44, Vlastimil Brom wrote:
import unicodedata
unicodedata.normalize(NFD, userviço móvil).encode(ascii,
ignore).decode(ascii)
u'servico movil'
Works well for all the test-cases I threw at it. Thanks!
-tkc
Hi,
I am
2012/9/13 Tim Chase python.l...@tim.thechases.com:
I've got a bunch of text in Portuguese and to transmit them, need to
have them in us-ascii (7-bit). I'd like to keep as much information
as possible, just stripping accents, cedillas, tildes, etc. So
serviço móvil becomes servico movil. Is
2012/9/3 contro opinion contropin...@gmail.com:
Here is a string :
str1=ha,hihi,a,ok
I want to get the position of , in the str1,Which can count 3,8,14.
how can I get it in python ?
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
you can use re.finditer to match all , and
2012/8/18 Frank Koshti frank.kos...@gmail.com:
Hey Steven,
Thank you for the detailed (and well-written) tutorial on this very
issue. I actually learned a few things! Though, I still have
unresolved questions.
The reason I don't want to use an XML parser is because the tokens are
not
2012/8/5 John Mordecai Dildy jdild...@gmail.com:
Current Problem at the moment
Traceback (most recent call last):
File ex26.py, line 66, in module
beans, jars, crates = secret_formula(start-point)
NameError: name 'start' is not defined
anyone know how to make start defined
--
Thanks to all for further comments!
Just for completeness and in case somebody would like to provide some
suggestions or corrections;
the following trivial class should be able to deal with the initial
requirement of adding or subtracting dateless time values
(hour:minute).
regards,
vbr
# # # #
Many thanks to all for your suggestions!
@ChrisA
Yes, the calculations with seconds since the Unix epoch is very
convenient for real times, but trying to make it dateless seemed to
make it more complicated for me.
The expected output for the increments asked by Jason was already
correctly stated
,
Vlastimil Brom
--
http://mail.python.org/mailman/listinfo/python-list
2012/5/19 Steven D'Aprano steve+comp.lang.pyt...@pearwood.info:
I have matplotlib and iPython, and want to plot a function over an
equally-spaced range of points.
That is to say, I want to say something like this:
plot(func, start, end)
rather than generating the X and Y values by hand,
2012/3/10 sl33k ahsanbag...@gmail.com:
I'm trying project euler problem 3 and I've hit the wall with this
error. What could be the problem here?
l=[]
num=600851475143
i=1
while i=num:
... if num%i==0:
... l.append(i)
... i+=1
... print max(l)
File stdin, line 5
Vlastimil Brom vlastimil.b...@gmail.com added the comment:
Sorry for mixing the different problems, these were somehow things I noticed
at once in the new python version, but I should have noticed the different
domains myself.
I still might not understand the term crash properly - I just meant
New submission from Vlastimil Brom vlastimil.b...@gmail.com:
Hi,
while testing python 3.3a1 a bit, especially the new string handling of non-BMP
characters, I noticed a problem in Idle in this regard:
Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on
win32
Vlastimil Brom vlastimil.b...@gmail.com added the comment:
Hi,
thanks for the pointer, after invoking idle using python.exe, I don't see the
crash mentioned in the report:
Python 3.3.0a1 (default, Mar 4 2012, 17:27:59) [MSC v.1500 32 bit (Intel)] on
win32
Type copyright, credits or license
Vlastimil Brom vlastimil.b...@gmail.com added the comment:
I'd like to add some further observations to the mentioned issue;
it seems, that the crash is indeed not specific to idle.
In a sample tkinter app, where I just display e.g. chr(66352) in an Entry
widget, I also get the same immediate
2012/2/14 Devin Jeanpierre jeanpierr...@gmail.com:
Hey Pythonistas,
Consider the regular expression $*. Compilation fails with the
exception, sre_constants.error: nothing to repeat.
Consider the regular expression (?=$)*. As far as I know it is
equivalent. It does not fail to compile.
Why
2011/12/14 candide candide@free.invalid:
Consider the following code
#
import re
z=re.match('(Spam\d)+', 'Spam4Spam2Spam7Spam8')
print z.group(0)
print z.group(1)
#
outputting :
2011/12/14 candide candide@free.invalid:
...
Thanks for the reference and the example. I didn't know of this
reimplementation, hoping it offers the Aho-Corasick algorithm allowing
multiple keys search.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I am not sure about the
2011/10/10 galyle gal...@gmail.com:
HI, I've looked through this forum, but I haven't been able to find a
resolution to the problem I'm having (maybe I didn't look hard enough
-- I have to believe this has come up before). The problem is this:
I have a file which has 0, 2, or 3 groups that
2011/9/30 Ovidiu Deac ovidiud...@gmail.com:
This is only part of a regex taken from an old perl application which
we are trying to understand/port to our new Python implementation.
The original regex was considerably more complex and it didn't compile
in python so I removed all the parts I
2011/9/24 Chris Angelico ros...@gmail.com:
On Sat, Sep 24, 2011 at 11:53 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
#1 add multiples of the width to the starting value, 0.
#2 subtract multiples of width from the ending value, 2.1.
#3, go half and half - generate the
2011/9/15 Stef Mientki stef.mien...@gmail.com:
hello,
I need a nested list, like this
A= [ [None,None], [None,None], [None, None] ]
A[2][0] =77
A
[[None, None], [None, None], [77, None]]
...
thanks,
Stef
--
http://mail.python.org/mailman/listinfo/python-list
Besides the above
2011/9/13 ron vacor...@gmail.com:
Depending on the load, you can do something like:
.join([x for x in string if ord(x) 128])
It's worked great for me in cleaning input on webapps where there's a
lot of copy/paste from varied sources.
--
http://mail.python.org/mailman/listinfo/python-list
declared; see
http://www.python.org/peps/pep-0263.html for details
Exit Code: 1
Line 1: a=u'''≤'''.encode(ascii, ignore).decode(ascii)
On Tue, Sep 13, 2011 at 11:33 PM, Vlastimil Brom
vlastimil.b...@gmail.com wrote:
2011/9/13 ron vacor...@gmail.com:
Depending on the load, you can do something
2011/9/12 Alec Taylor alec.tayl...@gmail.com:
Good evening,
I have converted ODT to HTML using LibreOffice Writer, because I want
to convert from HTML to Creole using python-creole. Unfortunately I
get this error: File Convert to Creole.py, line 17
SyntaxError: Non-ASCII character '\xe2' in
1 - 100 of 312 matches
Mail list logo