Use the only odoo framework.. without addons .. will be the best choice
.. do not reinvent the whell
if you do not need web interface, you can have a look at
http://www.tryton.org/
otherwise you could have flask for the top of flexibility
regards,
Matteo
Il 09/09/2014 12:06, Vimal Rughani
The error is self expleined ..
print str(current_month) + '/' + str(current_day) + '/' +
str(current_year) +' *'+ *
this line have a + at the end,the interpreter need something to add ..
so remove it and it will work
regards,
Matteo
Il 02/05/2013 15:50, le
integrated with sympy ..
regards,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
..
if inside your module there is some code (no def or class) this code
will be executed, and if for example you have some loop or some db query
this will be executed too.
regards,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
gt;>>>>>
RefCount 15
>>>> 'python_version': 34014192, 'defaultUnnamedArg':
RefCount 6
>>>> win32com.gen_py.F4503A16-F637-11D2-BD55-00500400405Bx0x1x0.ITDProperty.I
RefCount 4
>>>> (u'ItemsListCreator', u'tri
but I do
know how..
the .__del__() method dose not work on this object...
there is someone that can give me some help on this ?
Regards,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
.
I can do it except for the interface with a shell script. Because
of the web interface I was told that python is the right language
but I have no knowledge in python.
Could you pl. give me the initial pointers for this scheme?
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
in the code2
aList=[1,2,3,4,5,6,7,8,9,10]
aList=str(aList) #<--- here you convert the list in a string
print aList
print aList[2] #<-- here you are printing the third caracter of the
string '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]' not the list '[1, 2, 3, 4, 5,
6, 7, 8, 9,
On Jun/02, Dennis Lee Bieber wrote:
> On Sat, 2 Jun 2012 14:57:17 +0200, Matteo Landi
> declaimed the following in gmane.comp.python.general:
>
>
> > Lesson learned: never invoke Tkinter functions / methods outside the
> > mainloop
> > thread.. NEVER!
> &g
On Jun/01, Matteo Landi wrote:
> On Thu, May 31, 2012 at 3:02 PM, Matteo Landi wrote:
> > On Thu, May 31, 2012 at 3:42 AM, Terry Reedy wrote:
> >> On 5/30/2012 6:19 PM, Matteo Landi wrote:
> >>>
> >>> On May/28, Matteo Landi wrote:
> >>>>
On Thu, May 31, 2012 at 3:02 PM, Matteo Landi wrote:
> On Thu, May 31, 2012 at 3:42 AM, Terry Reedy wrote:
>> On 5/30/2012 6:19 PM, Matteo Landi wrote:
>>>
>>> On May/28, Matteo Landi wrote:
>>>>
>>>> Hi list,
>>>> recently
On Thu, May 31, 2012 at 3:42 AM, Terry Reedy wrote:
> On 5/30/2012 6:19 PM, Matteo Landi wrote:
>>
>> On May/28, Matteo Landi wrote:
>>>
>>> Hi list,
>>> recently I started to work on an application [1] which makes use of the
>>> Tkinter
>>
On May/28, Matteo Landi wrote:
> Hi list,
> recently I started to work on an application [1] which makes use of the
> Tkinter
> module to handle interaction with the user. Simply put, the app is a text
> widget displaying a file filtered by given criteria, with a handy feature th
awner and the file processor are terminated correctly. The only
thread still active for some strange reasons, is the gui updater.
Do you see anything wrong with the description presented above? Please say so,
because I can't figure it out!
Regards,
Matteo
[1] https://bitbucket.org/iamF
Probably because of the fact it is possible to set True equal to False and
consequently then invalidate loop logic as presented below:
True = False
while True:
...
On the other hand `1' will always be evaluated as a constant.
Don't know, just guessing.
Matteo
ing-pdf-file-in-python&catid=38%3Aprogramming&Itemid=55&lang=en>
here I number some pdf files ..
regards,
Matteo
Il 07/12/2011 20:41, Hegedüs, Ervin ha scritto:
Hello Everyone,
I'm looking for a tool, which can add a trusted timestamp to an
existing PDF file (and can sign - but
to
debug it ..
any help is really appreciated.. it's the last dangerous bug in our
application ...
Regards,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
around the
source code, unless you are really interested in it :P. Instead, I’m here
looking for some feedback, suggestions or comments. I would really appreciate
your advices.
Thank you so much.
Cheers,
Matteo
[1] http://bitbucket.org/iamFIREcracker/osaic
[2] http://pypi.python.org/pypi/o
I imagine he is looking for a cross-platform solution: n this case, I guess the
most suitable solution is pygame.
Regards,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
I agree with Peter:
* iterate over the list directly
* use %10 instead of string conversion + slice
(*) use genexps
Good luck,
Matteo
On Tue, Nov 9, 2010 at 8:18 PM, Terry Reedy wrote:
> On 11/9/2010 2:00 PM, Matty Sarro wrote:
>
>> I'm working on one of the puzzles on pysch
])
The argument you pass which is used to fill the values of the new
dict, is created once; this means that the empty list is shared
between all the keys of the dict.
I think you need to create the new dict by hand.
Regards,
Matteo
> In [215]: rg
> Out[215]: {'a': [], 'b
Another situation in which I needed to disable such kind of warnings
is while working with graphics modules.
I often use variable names such as x, y, z for coordinates, or r,g,b for colors.
Would longer names make the reader's life easier?
Best regards,
Matteo
On Wed, Oct 20, 2010 at 9:
You can use the 'else' keyword outside the for loop:
for :
if :
break
else
The execution will step inside the else branch if the for loop ends
normally, i.e. without encountering a break keyword.
Hope it helps.
Regards,
Matteo
On Sun, Oct 17, 2010 at 6:58 PM, wrote:
>
I got one a couple of months ago. I answered back I was interested and
then we scheduled a phone conversation.
Good luck,
Matteo
On Thu, Oct 14, 2010 at 5:58 PM, Grant Edwards wrote:
> On 2010-10-14, Daniel Fetchinson wrote:
>
>> I keep getting recruiting emails from charlesngu..
Well, if you need to issue http POST/GET commands, you can take a look
at urllib/urllib2 modules. Instead if you want to take control of the
web-browser I've heard about selenium, but I've never used it.
Best regards,
Matteo
On Sat, Oct 9, 2010 at 11:39 AM, Johny wrote:
> Is i
What about using the json library? It could handle errors for you:
>>>import json
>>>s = '["1", "2"]'
>>>json.loads(s)
[u'1', u'2']
Now you can convert then to integer values.
Best regards,
Matteo
On Tue, Oct 5, 2010
Here you are:
http://en.wikipedia.org/wiki/Big_O_notation
Best regards,
Matteo
On Mon, Oct 4, 2010 at 8:38 PM, Tobiah wrote:
> It gets used here frequently, but not
> having majored in programming, I'm not
> familiar with it. One might say:
>
> Don't do it that way,
:
while True:
if str[i] != str[j]:
return False
i, j = i + 1, j - 1
return True
except IndexError:
return True
On Sun, Aug 29, 2010 at 12:36 PM, Arnaud Delobelle
wrote:
> Matteo Landi writes:
>
>> W
", min(t.repeat())
>
> t = Timer("is_palindrome_reversed('madamimadam')", "from __main__
> import is_palindrome_reversed")
> print "is_palindrome_reversed", min(t.repeat())
>
> The results:
> is_palindrome_recursive 6.32680866827
> is_pali
I suggest you to memoize results in order to prevent overlapping recursion.
Regards,
Matteo
On Sun, Aug 29, 2010 at 2:23 AM, Ben Finney wrote:
> Baba writes:
>
>> my brainstorming so far brought me to a stand still as i can't seem to
>> imagine a recursive way to code t
except IndexError:
return True
Regards,
Matteo
>
>> Here's a possible (and a
>> bit tricky) Python 2.x implementation:
>>
>> def is_palindrom(s):
>> s = s.lower()
>> slen = len(s)
>> until = slen / 2 # Python 2x integer
try), fantastic benefits and very generous relocation packages.
> Please contact me immediately with a resume!
>
> Send resumes to:
>
> Rich Moss
> r...@mossltd.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, Aug 1, 2010 at 12:27 PM, News123 wrote:
> Hi,
>
>
> On 07/31/2010 11:04 AM, Matteo Landi wrote:
>> What are the messages one should really care about while evaluating
>> its code using pylint? It's easy to get 5 scored with a "lot of public
>> me
CTORY/DSTNTN_FILE_NAME")
>
> WTF; modules aren't callable. Typo?
I suppose he/she would have written:
shutil.copyfile("YOUR_SOURCE_FILE_NAME","DESTINATION_DIRECTORY/DSTNTN_FILE_NAME")
Cheers.
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
;>
>>> Any help would be awesome : )
>>>
>>> Regards,
>>> Nav
>>>
>>> --
>>> http://mail.python.org/mailman/listinfo/python-list
>>
>>
>> This is a working code, streamlined, but it is where the problem is:
&
ally, so is definitely the way to go.
>
> http://docs.python.org/library/glob.html
>
> --
> Rory Campbell-Lange
> r...@campbell-lange.net
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
g/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
> Thank you in advance.
>
> Thanks.
> Navid
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
will normalize
> in more than one place. In fact, you may well want a vlen function.
>
> def vlen(seq): return math.sqrt(sum(x*x for x in seq))
>
> --
> Terry Jan Reedy
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
will need
> to work on your code), but tabs allow everyone to see code indented the way
> -they- want to see it, not just the way the original author wanted to see
> it.
> This script (./this-pylint) will also save output from the test in a text
> file, for make (or other dependency handling program) to use to avoid
> re-pylint'ing unmodified code. It'll give an error typically, if pytlint
> detects any errors other than FIXME's (excluding ones, as I mentioned
> before, that have a comment disabling the warning, of course).
> I'm more than a little sad that pylint doesn't seem to be moving to python 3
> in any big hurry.
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
t to do this (pseudocode):
> start_time = get_current_time;
> function();
> end_time = get_current_time;
> print (end_time - start_time)
>
> the output should be 7600 (s) for example. What is the best and easiest way
> to do that?
>
> Thanks,
>
> // Naderan *Mahmood;
>
found there is still "\n" . Could someone help me why it is not
> correct?
>
> Thank you
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
doing wrong?
>
> I tried this, too:
>
>>>> class C(P):
> def __init__(self):
> super(__class__).__init__(self)
> print("I am a member of class C")
>
>
>>>> x=C()
> Traceback (most recent call last):
> File "", line 1, in
> x=C()
> File "", line 3, in __init__
> super(__class__).__init__(self)
> TypeError: must be type, not C
>>>>
>
>
>
> --
> The missionaries go forth to Christianize the savages -
> as if the savages weren't dangerous enough already.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 2010-06-17 at 08:31 -0700, Stephen Hansen wrote:
> On 6/17/10 6:23 AM, Matteo Landi wrote:
> > itself. If you try and pickle a function, it is not pickled as a whole,
> > indeed, once you unpickle it, it will raise an exception telling you
> > that the target function
On Thu, 2010-06-17 at 07:37 -0700, Paul Rubin wrote:
> Matteo Landi writes:
> > If you try and pickle a function, it is not pickled as a whole,
> > indeed, once you unpickle it, it will raise an exception telling you
> > that the target function was not found in the current m
On Thu, 2010-06-17 at 07:37 -0700, Paul Rubin wrote:
> Matteo Landi writes:
> > If you try and pickle a function, it is not pickled as a whole,
> > indeed, once you unpickle it, it will raise an exception telling you
> > that the target function was not found in the current m
here, with nothing in my hands; how would you implement this?
Thanks in advance.
[1] http://www.picloud.com/
--
Matteo Landi
http://www.matteolandi.net
--
http://mail.python.org/mailman/listinfo/python-list
7445996L)
>>>>
>
>
> So what is the right way to initialize to 0 a 2D array ? Is that way correct
> :
>
>
>>>> t=[[0 for _ in range(2)] for _ in range(3)]
>
> It seems there is no more trouble now :
>
>>>> t
> [[0, 0], [0, 0]
gt; >>> b
>> [5,2,3,4]
>> >>> # here's the issue
>> >>> a
>> [5,2,3,4]
>> >>> # and the resolution
>> >>> c
>>
>> [1,2,3,4]
>>
>> Hope this helps.
>>
>> Geremy Condra
>
> Thank you for such fast answer! I quite catch, but:
> As I see, the d[:] is equal to sentence "get the d array from the
> first to the last element"? :)
>
> P.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
[1,2,3,4]
>>>> b = a
>>>> c = [:]
>>>> b[0] = 5
>>>> b
> [5,2,3,4]
>>>> # here's the issue
>>>> a
> [5,2,3,4]
>>>> # and the resolution
>>>> c
> [1,2,3,4]
>
> Hope this helps.
>
> Geremy Condra
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
t; have property x").
>
> If speed is important, the global lookups can be localized:
>
> def prttn(m, n, map=itertools.imap, int=int, str=str, range=range):
>return sum(m == sum(map(int, str(x))) for x in range(n))
>
> Raymond
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
a single
> tuple. What I'd like is to somehow put the tuple into a NumPy array
> with each value as one element. Then I can continue to do some
> numerical processing.
>
> Any advice/help?
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
Matteo Landi
http://www.matteolandi.net/
--
http://mail.python.org/mailman/listinfo/python-list
dow.
>
> when the code finishes, the window closes, i do a time.sleep(10) to
> see what has happened.
>
> unfortunately when there is an error it just closes the window.
> anyway of seeing the error messages?
>
> thanks
>
> a
> --
> http://mail.python.org/ma
interactively in Python, be sure
>>> > to call the function show() after all
>>> > graphs have been generated, as it enters a user interface main loop
>>> > that will stop execution of the rest of
>>> > your code. The reason behind this behavior is that matplotlib i
o be embedded in a GUI as well.
>> > In Windows, if you’re working from interactive Python, you need only
>> > issue show() once; close the figures
>> > (or figures) to return to the shell. Subsequent plots will be drawn
>> > automatically without issuing show(), an
> (or figures) to return to the shell. Subsequent plots will be drawn
> automatically without issuing show(), and
> you’ll be able to plot graphs interactively.
>
> Best Regards
> Sandy
> ____
> Hotmail: Free, trusted and rich email se
On Oct 30, 7:27 am, "Diez B. Roggisch" wrote:
[snip]
> Or even better, by
> not doing it at all - because usually, your datamodel is tied to your
> program, so the need for this kind of dynamicity shouldn't arise in the
> first place.
>
> Die
Perhaps that is true in the majority of cases, but the
On Oct 30, 7:10 am, Lacrima wrote:
> Hello!
>
> I use sqlite3 module for my sqlite database. I am trying to substitute
> table name in sql query.
>
> >>> import sqlite3
> >>> con = sqlite3.connect('mydb')
> >>> cur = con.execute("select * from table where name='Joe'")
>
> That's ok
>
> >>> cur = c
Hello-
I'm trying to find out if there is a way to share a sqlite database
connection between python and an extension module written in C or C+
+.
My setup is that I have some pretty intensive OpenGL rendering code
that gets its values from a largish sqlite database, performs a fair
bit of computat
On Sep 9, 6:02 pm, Tim Chase wrote:
> > For an application in an industrial environment where the workers are
> > not always sitting in front of the monitor, but are within earshot of
> > the PC I would need an sound / speech handler for the standard logging
> > system. It should beep or better sa
On 11 Mag, 23:06, Shawn Milochik wrote:
> How is the form "written in JavaScript"? Is it dynamically generated?
>
> In any case, can you just send a POST request if you know the values required?
The problem is indeed that the form is dynamically generated.
That's the .js file:
if (navigator.appV
Hi everybody,
I have to fill a web form to authenticate and connect to the internet.
I thought it would have been easy to make a script to do that
automatically
on startup.
Unfortunately, it turned out that the form is written in JavaScript,
and
urllib2 therefore fails to even fetch the form.
The
On 15 Apr, 19:25, Scott David Daniels wrote:
> Diez B. Roggisch wrote:
> > Matteo schrieb:
> >> I need to playback a sound on a linux machine of a pre-determined
> >> frequency like, say, 440 Hz. How can I do that with python? I found
> >> the ossau
I need to playback a sound on a linux machine of a pre-determined
frequency like, say, 440 Hz. How can I do that with python? I found
the ossaudiodev package, but it says that the ossaudiodev.write()
method accepts data as a raw string. It doesn't explain what the
string should be like, and the oss
Hi all,
let's see if there is a more "pythonic" way of doing what I'm trying
to do.
I have a lot of strings with numbers like this one:
string = "-1 1.3 100.136 1 2.6 100.726 1 3.9 101.464 -1 5.2 102.105"
I need to pass the numbers to a function, but three at a time, until
the string ends. The st
On Apr 3, 9:05 am, Linuxwell wrote:
> Starting today I would like to study Python,Wish me luck!
Good luck!
Don't forget to...
>>> print 'Hello World!'
;)
--
http://mail.python.org/mailman/listinfo/python-list
I don't really know, because I didn't write it myself ;)
I think it basically logs in into a service provider site with pycurl,
follows the right links, reads captcha's and writes an SMS, which is
then sent by the provider itself.
I can give you the direct link to the source code from the same sit
I use a programme, written in Python, which sends sms through the sms
providers. You might want to have a look to the source code:
http://www.moioli.net/Progetti___1/MoioSMS___Messaggi_GRATIS_da_Internet22.html
--
http://mail.python.org/mailman/listinfo/python-list
> srcdata = urlopen(url).read()
> dstfile = open(path,mode='wb')
> dstfile.write(srcdata)
> dstfile.close()
> print("Done!")
Have you tried reading all files first, then saving each one on the
appropriate directory? It might work if you have enough memory, i
lso is imported without
problems, but then...
mat...@matteo:~/lab/sandbox$ python
Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import dptest as dp
>>
On 14 Mar, 02:08, Aaron Brady wrote:
> On Mar 13, 5:42 pm, Matteo wrote:
>
>
>
> > On 13 Mar, 22:35, Aaron Brady wrote:
>
> > > On Mar 13, 1:34 pm, Matteo wrote:
>
> > > > hmmm... looks like SWIG has a problem with double pointers. I googled
On 13 Mar, 23:19, per wrote:
> hi all,
>
> what's the most efficient / preferred python way of parsing tab
> separated data into arrays? for example if i have a file containing
> two columns one corresponding to names the other numbers:
>
> col1 \t col 2
> joe \t 12.3
> jane \t 155.0
On 13 Mar, 22:35, Aaron Brady wrote:
> On Mar 13, 1:34 pm, Matteo wrote:
>
> > hmmm... looks like SWIG has a problem with double pointers. I googled
> > around a bit and found:
>
> >http://osdir.com/ml/programming.swig/2003-02/msg00029.html
>
> > anyone know
hmmm... looks like SWIG has a problem with double pointers. I googled
around a bit and found:
http://osdir.com/ml/programming.swig/2003-02/msg00029.html
anyone knows how to write a small wrapper to do the appropriate
dereferencing?
--
http://mail.python.org/mailman/listinfo/python-list
On 13 Mar, 18:19, Aaron Brady wrote:
> On Mar 13, 12:03 pm, Matteo wrote:
>
>
>
> > Hi all,
>
> > I wrote a few c++ classes for some data analysis on a physics
> > esperiment. Now I want to glue the lot with Python, so I built the
> > necessary wrap code
Hi all,
I wrote a few c++ classes for some data analysis on a physics
esperiment. Now I want to glue the lot with Python, so I built the
necessary wrap code with SWIG and compiled the library with Distutils.
All is fine, I can import the module and classes work as expected...
...but for one thing
.QTabWidget, Gui.QMenu, Core.QTimer, Gui.QLayout, Gui.QPalette,
Gui.QMenuBar, Gui.QLineEdit, Gui.QDialog, Gui.QInputDialog,
Gui.QCheckBox, Gui.QWidget, Gui.QTextEdit, Gui.QEvent, Gui.QSlider
Download
http://www.develer.com/oss/PyQt3Support
--
Matteo Bertini - [EMAIL PROTECTED]
Deve
Hello-
I am trying to get Python to extract attributes in full dotted form
from compiled expression. For instance, if I have the following:
param = compile('a.x + a.y','','single')
then I would like to retrieve the list consisting of ['a.x','a.y'].
I have tried using inspect to look at 'co_names'
On Jun 13, 2:32 pm, Lee Sander <[EMAIL PROTECTED]> wrote:
> hi,
> I have the following problem which is turning out to be non-trivial. I
> realize that this is not
> exactly a python problem but more of an algorithm problem -- but I
> post it here because
> I want to implement this in python.
>
> I
On May 30, 1:29 pm, Matteo <[EMAIL PROTECTED]> wrote:
> - Write an autoflush class:
> class AutoFlush:
> def __init__(self, stream):
> self.stream = stream
> def write(self, text):
> self.stream.write(text)
> self.stream.flush()
>
On May 30, 1:03 pm, "Karim Ali" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am writing a program that will take several days to execute :) and would
> like to append to a log file but be able to open that file at any time and
> see the errors that have occured.
>
> So this is what I am doing:
>
> --
Peter Maas wrote:
> I have noticed that in the language shootout at shootout.alioth.debian.org
> the Python program for the n-body problem is about 50% slower than the Perl
> program. This is an unusual big difference. I tried to make the Python program
> faster but without success. Has anybody an
Fabian Braennstroem wrote:
> Hi,
>
> I would like to remove certain lines from a log files. I had
> some sed/awk scripts for this, but now, I want to use python
> with its re module for this task.
>
> Actually, I have two different log files. The first file looks
> like:
>
>...
>'some text'
Fie Pye wrote:
> Hallo
>
> I would like to have a high class open source tools for scientific
> computing and powerful 2D and 3D data visualisation. Therefore I chose
> python, numpy and scipy as a base. Now I am in search for a visualisation
> tool. I tried matplotlib and py_opendx with
Josiah Manson wrote:
> In the following program I am trying to learn how to use functional
> programming aspects of python, but the following program will crash,
> claiming that the recursion depth is too great. I am attempting to make
> a list of polynomial functions such that poly[0](3) = 1, poly
n the number of substring in the master string, if we spoke about
substring i count 3 substring...
Can someone explain me this? And in which way i can count all the
occurrence of a substring in a master string? (yes all occurrence
reusing already counter character if needed)
Thanks a lot
Matteo R
www.scsh.net/docu/html/man-Z-H-6.html#node_sec_5.1
matteo
--
http://mail.python.org/mailman/listinfo/python-list
;, so it won't work. Doesn't look like a documented behaviour to
me, though.
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
set([0, 2]), 2: set([2,4]), 3: set([5]), 4: set([5]),
5: set([])}
If node ids are consecutive integers, you could also of course use a
list as the outer structure.
PS: we could also discuss this in italian in it.comp.lang.python :)
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
fails eventually not calling hash(s).
Why don't you just use "frozenset"?
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
same time.
The plotting the time VS number of queries I'd like to understand which
would be the critical number of simultaneous connection to the web
server.
Do you think that using the Threading module would be a good idea?
Any other suggestion?
Thank you very much
Matteo Memelli
--
http://
Python.
+1.
The Python Cookbook is really great, and being included in the
contributors, even if for a little tiny idea that got heavily
refactored, feels wonderful. I'm really grateful to the python community.
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
dn't it be easier to fill in default values when
you gather data as opposed to when you use it?
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
terables. I can imagine a list of iterables
of different types, and a default value of maybe [] or set([]).
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
turns a new default value? That's exactly what Duncan proposed
with the "function" keyword argument.
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
containers.
defaultdicts look to me as a solution that is more elegant and solves
more problems. What is the problem with them?
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
mprehension, but
sets are just more elegant...
--
Ciao,
Matteo
--
http://mail.python.org/mailman/listinfo/python-list
nt i to be "i-2" if i%2 is not equal to 0?
You could use
[(i-2, i+2)[bool(i%2 == 0)] for i in range(10)]
or, in a less general but shorter way
[(i+2, i-2)[i%2] for i in range(10)]
or even
[i%2 and i-2 or i+2 for i in range(10)]
The "if" clause in comprehensions is used as a filter
98 matches
Mail list logo