2013/6/27 rusi :
> 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 is Roman Jako
2013/7/7 Steven D'Aprano :
> 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 with this is that if a string
git hours formatted without the leading zero?
Thanks in advance for any suggestions or remarks;
regards,
Vlastimil Brom
--
http://mail.python.org/mailman/listinfo/python-list
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
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
# # # #
2012/8/5 John Mordecai Dildy :
> Current Problem at the moment
>
> Traceback (most recent call last):
> File "ex26.py", line 66, in
> beans, jars, crates = secret_formula(start-point)
> NameError: name 'start' is not defined
>
> anyone know how to make start defined
> --
> http://mail.python
2012/8/18 Frank Koshti :
> 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 always placed in HTM
2012/9/3 contro opinion :
> 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 the start()
2012/9/13 Tim Chase :
> 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 there anything stock
>
2012/9/14 Tim Chase :
> On 09/13/12 16:44, Vlastimil Brom wrote:
>> >>> import unicodedata
>> >>> unicodedata.normalize("NFD", u"serviço móvil").encode("ascii",
>> >>> "ignore").decode("ascii")
>
2012/9/25 Levi Nie :
> 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
--
http://m
2012/10/21 Vincent Davis :
> 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 going to what to
2012/10/23 MartinD. :
> 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 ):
>
> for regex
2012/12/4 Nick Mellor :
> 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 cost of a more compl
2012/12/5 Nick Mellor :
> 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
> --
> http://mail.pyth
2012/12/6 Neil Cerutti :
> On 2012-12-05, Vlastimil Brom wrote:
>> ... PARSNIP, certified organic
>
> I'm not sure on this one.
>
>> ('PARSNIP', ', certified organic')
>
> --
> Neil Cerutti
> --
Well, I wasn't either, when I noti
2012/12/10 :
> 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 basic code but nee
2012/12/17 Anatoli Hristov :
>> 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 step.
>
> I g
2012/12/17 Netrick :
> 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
> nothing
2012/12/18 Colin J. Williams :
...
> 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:
http://sourceforge.net/projects/py2exe/
2012/12/19 loïc Lauréote :
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
>>> [a+b*a for a,b
2012/12/19 loïc Lauréote :
> 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 ef
2012/12/30 Helmut Jarausch :
> 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 pattern
2012/12/30 Alvaro Lacerda :
> 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
> uneven number (i.e. 5
2013/1/1 :
> 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 an introductory course an
2013/1/1 Steven D'Aprano :
> 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 you want to enforce case sensit
2013/1/2 Usama Khan :
> 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 this
functionality su
2013/1/2 Usama Khan :
> 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 why i have ju
2013/1/2 Victor Hooi :
> 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 the docs, m
2012/2/14 Devin Jeanpierre :
> 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 the inc
2012/3/10 sl33k :
> 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 "", line 5
> prin
2012/5/19 Steven D'Aprano :
> 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, and plotting a scatter
> graph.
2011/6/16 TheSaint :
> Hello,
> Is it possible to compile a regex by supplying a list?
>
> lst= ['good', 'brilliant'. 'solid']
> re.compile(r'^'(any_of_lst))
>
> without to go into a *for* cicle?
>
In simple cases, you can just join the list of alternatives on "|" and
incorporate it in the pattern
2011/6/21 John Salerno :
> However, even after reading the Wikipedia page about prime numbers and
> trial division, I'm still a little unclear as to why the square root
> of the number is the upper bound of the range you need to check.
> --
There are likely be some more elaborated proofs, but it s
2011/6/22 Saul Spatz :
> Hi,
>
> I'm just starting to learn a bit about Unicode. I want to be able to read a
> utf-8 encoded file, and print out the codepoints it encodes. After many
> false starts, here's a script that seems to work, but it strikes me as
> awfully awkward and unpythonic. Have
2011/6/22 Saul Spatz :
> Thanks. I agree with you about the generator. Using your first suggestion,
> code points above U+ get separated into two "surrogate pair" characters
> fron UTF-16. So instead of U=10 I get U+DBFF and U+DFFF.
> --
> http://mail.python.org/mailman/listinfo/python
2011/7/13 Benji Benjokal :
> What is the simplist way to get the value you entered from the Entry widget
> in Tkinter?
> Thanks Benji
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
Hi,
you can use the get() method of that widget;
see e.g.
http://effbot.org/tkinterbook/entry.htm
fo
ng difflib) for this task (i.e character-wise comparing of
texts - detecting insertion, deletion, substitution and move of text
blocks)?
Thanks in advance,
Vlastimil Brom
--
http://mail.python.org/mailman/listinfo/python-list
2011/7/14 Chris Torek :
> In article
> Vlastimil Brom wrote:
>>I'd like to ask about the availability of a text diff library, like
>>difflib, which would support the detection of moved text blocks.
>
> If you allow arbitrary moves, the "minimal edit distance
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
2011/8/5 Geoff Wright :
> Hi,
>
> I use Mac OSX for development but deploy on a Linux server. (Platform
> details provided below).
>
> When the locale is set to FR_CA, I am not able to display a u circumflex
> consistently across the two machines even though the default encoding is set
> to "as
2011/8/17 Benji Ara. :
> Hello
> I wonder how you package a Tkinter gui with py2exe?
> Thanks
> Benji
>
>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
Hi,
check the necessary steps on the py2exe homepage
http://www.py2exe.org/index.cgi/Tutorial
in your setup script, you ha
2011/8/18 Matt Funk :
> Hi,
> i am sorry if this doesn't quite match the subject of the list. If someone
> takes offense please point me to where this question should go. Anyway, i have
> a problem using regular expressions. I would like to match the line:
>
> 1.002000e+01 2.037000e+01 2.128000e+01
Sorry, if I missed some further specification in the earlier thread or
if the following is oversimplification of the original problem (using
3 numbers instead of 32),
would something like the following work for your data?
>>> import re
>>> data = """2.201000e+01 2.15e+01 2.199000e+01 : (instan
gex-hg/wiki/GeneralDetails#Additional_features
for an overview of the additions.
Personally I am very happy with regex, both with its features as well
as with the support and maintenance by its developer;
however I am mostly using it for manually entered patterns, and less
for hardcoded operation.
regards,
Vlastimil Brom
--
http://mail.python.org/mailman/listinfo/python-list
2011/9/6 ssegvic :
> Hi,
>
> I am musing on how to write portable Python3 code which would
> take advantage of the standard locale module.
>
> For instance, it would be very nice if we could say something like:
>
> # does not work!
> myISOCountryCode='hr'
> locale.setlocale(locale.LC_ALL, (myISOCou
2011/3/8 Cross :
> On 03/08/2011 06:09 PM, Heather Brown wrote:
>>
>> The keywords are an attribute in a tag called , in the section
>> called
>> . Are you having trouble parsing the xhtml to that point?
>>
>> Be more specific in your question, and somebody is likely to chime in.
>> Although
>> I'm
2011/3/19 Manatee :
> I hope this is the place to post this question. I am a really new
> pythonista. I am studying Tkinter and when I run this basic code, I
> get a syntax error on line 20, print "hi there, everyone". Its a
> simple print line, but I can't see the problem. I am using Python
> 2.
2011/4/5 Martin De Kauwe :
> Hi,
>
> So i want to replace multiple lines in a text file and I have reasoned
> the best way to do this is with a dictionary. I have simplified my
> example and broadly I get what I want however I am now printing my
> replacement string and part of the original express
2011/4/16 Alec Taylor :
> Thanks, but non of the IDEs so far suggested have an embedded python
> interpreter AND tabs... a few of the editors (such as Editra) have
> really nice interfaces, however are missing the embedded
> interpreter... emacs having the opposite problem, missing tabs (also,
> se
2011/4/19 Alec Taylor :
> SPE looks good, however I couldn't get it running (svn'd it). Do you
> know if there's an installer?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
There are source archives
http://pythonide.blogspot.com/2008/02/spe-084c-python-ide-editor-released.html
dow
2011/4/20 John Nagle :
> Here's something that surprised me about Python regular expressions.
>
krex = re.compile(r"^([a-z])+$")
s = "abcdef"
ms = krex.match(s)
ms.groups()
> ('f',)
>
>...
> "If a group is contained in a part of the pattern that matched multiple
> times, the la
2011/4/20 MRAB :
> On 20/04/2011 20:20, John Nagle wrote:
>>
>> Here's something that surprised me about Python regular expressions.
>>
>> ...
> You should take a look at the regex module on PyPI. :-)
> --
>
Ah well...
sorry for possibly destroying the point and the aha! effect ...
vbr
--
htt
Hi all,
I'd like to ask for comments or advice on a simple code for testing a
"subdict", i.e. check whether all items of a given dictionary are
present in a reference dictionary.
Sofar I have:
def is_subdict(test_dct, base_dct):
"""Test whether all the items of test_dct are present in base_dct
Thanks everyone for your opinions and suggestions!
I especially like the all(...) approaches of MRAB and Peter Otten,
however, the set conversion like
>>> set(test_dct.items()) <= set(base_dct.items())
True
looks elegant too.
In both approaches I can get rid of the negated comparison and the
additi
2011/5/13 MRAB :
> The latest release is here:
>
> http://pypi.python.org/pypi/regex
> --
Wow, set operators were added recently ...
https://code.google.com/p/mrab-regex-hg/wiki/GeneralDetails
ok, it might be not necassary to sove this exact problem with respect
to the solutions already mentione
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" <
> wolfgang.ma...@biologie.u
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):
(?s)struc
č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 m
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 node, how do I
> achiev
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 following message when
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
> Python 3 but fails on 2.7,
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', 'Gloss
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
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 = list(group)
> pr
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 eee
> true_tail"
>
> I w
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 reduce(mul, values)
>
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 issue you are having?
>
> If I import the request
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 to
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
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 tryin
2014/1/3 :
> @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,
but you can of
2014-02-11 6:42 GMT+01:00 Igor Korot :
> 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 is to have
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
> ImpossibleFork
>
>
> (note
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
> --
> https://mail.python.o
2016-01-02 14:14 GMT+01:00 yehudak . :
> 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
> wrote:
>>
>> 2016-01-02
2016-01-02 18:34 GMT+01:00 yehudak . :
[partly edited for bottom posting]
> On Sat, Jan 2, 2016 at 5:24 PM, Vlastimil Brom
> wrote:
>>
>> 2016-01-02 14:14 GMT+01:00 yehudak . :
>> >
[...]>> > On Sat, Jan 2, 2016 at 2:44 PM, Vlastimil Brom
>> >
>&
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() the match is 'abab'
2016-01-22 23:47 GMT+01:00 mg :
> 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, string, flags=0)
> Return
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: invalid syntax --> indica
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.
>
> However my dat
2016-02-08 11:42 GMT+01:00 :
> Vlastimil Brom 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 small changes with both python 2.7 and 3.4
>> (using
2014-03-26 10:40 GMT+01:00 Martin Landa :
> 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. Some of
> the too
2014-04-22 4:38 GMT+02:00 Igor Korot :
...
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, whether there i
2014-04-28 18:00 GMT+02:00 Roy Smith :
> 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 hav
2014-05-01 3:57 GMT+02:00 Chris Angelico :
> On Thu, May 1, 2014 at 9:46 AM, Ian Kelly 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.
>
> Yeah but that's way too obvio
2014-05-27 12:59 GMT+02:00 Aman Kashyap :
> 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
> write the pattern
2013/8/6 Gilles :
> 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 about wxW
2013/8/23 Jake Angulo :
> 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 :
> anothe
2013/8/25 David M. Cotter :
> 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
> assure you
2013/9/2 Anthony Papillion :
> 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 first line but
2013/9/4 :
> 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
en
2013/9/18 Venkat Addala
> 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 kjafhkfhlad\fdfdsdf ghtscetyl
2013/9/20 Jugurtha Hadjar :
> 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 john@hotmail.com, my
> e
2013/9/20 Shyam Parimal Katti :
> 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, ‘addre”ss3’)]
>
>
2013/10/1 cerr :
> 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 now I want
2013/11/8 Yaşar Arabacı :
> 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 elem in subli
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 ex
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 another possible approach, you
2014-06-11 14:23 GMT+02:00 BrJohan :
> 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 it, for a
1 - 100 of 260 matches
Mail list logo