Search Results: "Sandro Tosi"

27 December 2008

Sandro Tosi: Thinkpad T30, SmartLink modem and Teleconomy

Being left in the IT medieval, thanks to my lovely telco, the only way I can (very far away) simulate a broadband connection, is stipulating a flat 56k contract (don't laugh, please). The name of this "offer" is TeleconomyInternet.

Do you think that firing up gnome-ppp on a Thinkpad T30 laptop would work at the first try? Of course not... The problem seems to be in the telephone number to call, that badly interact with SmartLink 56k modem. Here's the story, in case you'll find yourself in the same situation.

The modem on the T30 is:
$ lspci   grep Modem
00:1f.6 Modem: Intel Corporation 82801CA/CAM AC'97 Modem Controller (rev 02)
that is a SmartLink modem, supported well by sl-modem-deamon package and by alsa:
$ ps -eo command   grep slm
/usr/sbin/slmodemd --alsa -c ITALY modem:1
Remember to edit /etc/default/sl-modem-daemon file and set the right country for you.

Now, I installed gnome-ppp (just to try an easy tool), that uses wvdial under the hood.

wvdial auto-detection utility works quite well, and the found Init2 string:
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
works well if the number to call is a local one (I tried it before, and worked). Since Teleconomy provides a state-wide number (702...) with the above string the connection will fail with a sad:
NO CARRIER
No Carrier! Trying again.
But there is a fix: first, the Init1 should be ATX3 (but it seems to be enbedded in the one below), and the last arguments must be changed (well, I think it has something to do with line speed (MS=34 will result in a 33.6k line) or protocol, but don't care too much as long as it works) resulting in this Init2:
ATX3Q0 V1 E1 S0=0 &C1 &D2 +MS=90
And remember to select the "stupid mode" in gnome-ppp, and you'll have a nice:
--> Initializing modem.
--> Sending: ATX3
ATX3
OK
--> Sending: ATX3Q0 V1 E1 S0=0 &C1 &D2 +MS=90
ATX3Q0 V1 E1 S0=0 &C1 &D2 +MS=90
OK
Modem initialized.
Sending: ATM1L3DT7020187187
Waiting for carrier.
ATM1L3DT7020187187
CONNECT 52000
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Fri Dec 26 19:12:23 2008
--> Pid of pppd: 4870
--> Using interface ppp0
--> local IP address ......
I'll move to ppp soon, since gnome-ppp seems to not understand "fsck, reconnect when disconnect, dude" option.

How nice is to be in the 21st century...

26 December 2008

Sandro Tosi: Biggest -doc packages

After loosing a lot of time (because I couldn't remember awk syntax correctly), now I know what are the biggest -doc packages in sid:

$ egrep "Package:.*-doc ^Size" /var/lib/dpkg/available grep -A1 "doc" grep -v "^--$" awk ' if ( $1 ~ "Package:" ) pkg = $2 else print $2" "pkg ' sort -n tail -n 3
77647098 vtk-doc
86947420 libxmpp4r-ruby-doc
107700626 sofa-doc

don't say it's ugly, I know ;)

What's the purpose of this? I wanted to know what medal new version (0.98.5) of python-matplotlib-doc package would win, and that would be silver!!

$ ls -l python-matplotlib-doc_0.98.5-1_all.deb
-rw-r--r-- 1 morph morph 91141234 2008-12-16 10:39 python-matplotlib-doc_0.98.5-1_all.deb

I really hope to reduce it before upload it...

25 December 2008

Sandro Tosi: It's Xmas, do a gift to Debian: fix a Lenny RC bug

I know, you usually spend this day with family/friends/whatever but think even a bit to Lenny.

Look at the unofficial RC bugs page and try to find something you can fix, some package that might not be ready for primetime (i.e. be released with Lenny) and ask its removal from testing to RT, try to replicate a bug or downgrade it if the reporter exaggerated a bit with severity.

It will all help Lenny.

Do a gift do Debian, do a gift to Lenny, do a gift to us all: fix an RC bug :)

I did my (little) part, fixing #509623 (well, quite easy, I know, but still). Do the same, if you can: we will all be thankful :) Thanks to Evgeni for the heads up right after midnight.

Oh-oh-oh...

23 December 2008

Emilio Pozuelo Monfort: Hello Planet Debian!

Hello Debian fans! I m Emilio Pozuelo Monfort (aka pochu), a Debian contributor coming from Ubuntu (where I m a MOTU), and hopefully a DD in the near future, as I m in NM. Sandro Tosi has added me to Planet Debian, so here I am! I ll be posting from time to time (don t expect me to flood your feed reader, I m more of a casual writter) with Debian-related topics. For those of you who don t know me, I m an Spanish guy contributing mostly to the GNOME packages and some Python applications. But if something breaks in your desktop, don t blame me, but my sponsor! :P

20 December 2008

Sandro Tosi: 4242331

FTWCAVotes

13 November 2008

Sandro Tosi: Parse Python files for "import" statements

My goal is to collect all the import statements in a Python code tree to identify what modules are needed to run that piece of code. So let's start from the lower level: parse one file for its import.

One simple solution could be to grep (or re.compile) something like "import (.*) from (.*) import .*" but what for import statement like:
from  import (
ABC,
DEF,
GHI)
or multiple import on one line?

So, if I had to rewrite the Python interpreter parser, why not use that exact parser?

I started with the parser module, but its output is not so parsable :) even if you can recall the structure (i.e. import statements are at nodes with id = 282, with imported module at id = 287 and so on). It's really powerful, but too low level for this task.

But there is another interesting module: compiler (it's deprecated in 2.6 and removed in 3.0, but I'm working with 2.5, so it's fine). Using parseFile and some objects from compiler.ast, I wrote a simple script that parses a file given in input and prints out the modules imported with "import mod" or with "from mod import xxx".

Suggestions are always welcome :)

UPDATE: please note that conditional imports are included in the list and the calls to __import__ are ignored.

24 October 2008

Sandro Tosi: Another month in bed

(for those who care about my health situation)

Today I had the scheduled exam at the hospital, one month later the scooter accident I had: the patella fracture is almost done (and the doctor had a lot of fun playing with it around my knee...grrr) with the tibia fracture is still on going, hence the need for another month in bed.

The advantage is that they removed the plater and now I have a donjoy support all around the leg: I can remove it (to wash the leg, thankgod) and I can "feel" the ground with the feet again, but I'm going pretty scary all the times, even if they told me it's hard I can compromise the situation (but, you know, lucky is not on my side...).

After that, I'll need 3 weeks of physiotherapy (and then I hope I've done!) just in time for Christmas.

Luckily, since some days I have a Debian laptop to use, so I can keep up with some Debian duties, tasks, flamewars and so :)

Sandro Tosi: Bits from the reportbug side of Debian

Things are evolving under the hood for reportbug, and we are preparing a version targetted for squeeze.

The version 3.99.0 has just been released to experimental; the main goals for this release are:
Other goals we'd like to archive for the 4.0 version (for which 3.99.x are the pre-releases) are:
Since this is a development version, you can experience some bugs/regressions, so please try it, stress it and "reportbug reportbug" if needed :) You're help is really appreciated! (and we have cookies ;) )

2 October 2008

Sandro Tosi: Scooters are harder than bones

On Sep 23rd I had an accident coming back home from work, and I've been hospitalized until this afternoon, with no internet access.

Nothing too dramatic, but my right knee is broken, so I got to stay put for another month or so.

I'm spending this period away from my home, hence even from my usually Debian box (with my tools, GPG keys, and so); that said, my contribution to Debian in these days will be a little bit "restricted".

I'll be catching up with emails soon: I already saw some needing an input from me, so just wait a little longer and I'll be back to you.

Don't worry, I'll be back!! :)

21 September 2008

Frank S. Thomas: Goddies with bts status and select

Since I was watching Don Armstrong’s talk about Debbugs’ SOAP interface I wanted to use devscripts' bts to get a list of boinc’s top five bug reporter. Finally, this is possible with devscripts (>= 2.10.36):
bts status file:-  bts select source:boinc archive:both  \
    egrep "^originator"   cut -f2-   sort   uniq -ci   sort -n \
    tail -n5
 2 Riccardo Stagni <unriccio@email.it>
 3 Martin Michlmayr <tbm@cyrius.com>
 6 Robert Millan <rmh@aybabtu.com>
 6 Thibaut VARENE <varenet@debian.org>
10 Sandro Tosi <matrixhasu@gmail.com>
Sweet - Thanks Debbugs and Devscripts maintainers!
And congratulations Sandro (or thank you - whatever you find appropriate)!

17 September 2008

Sandro Tosi: Now you're a DD, but how to migrate from your previous account?

Ok, it's not something happening every day (at least not to you), but I think it would be nice to have a sort of guide about migrating from pre-DD to DD account, and that's why I started this wiki.d.o page.

Currently it's under my namespace, and contains some tips I used during my recent migration, but it would be welcome to see other's collaboration to it.

16 September 2008

Sandro Tosi: Ignition sequence. All engines are started. We have ignition. 2, 1, zero. We have a DD!! We have a DD!!

I just receive The Mail (tm) from weasel, and I can't be happier that this (mh, is my life too boring?): I just become a DD!!!!!!! Please join my happiness in this achievement!!

I'd like to thank all the people helped me in my way to Debian, both for a long and fruitful collaboration or for just a mail exchange, both for kind people and rude ones (ah, we all have our own character, so never mind :) ) and in doing this I'm sure I'll forget someone (so please excuse me for this, you're in my mind tough): so thank you Tony, Bernd, Piotr, Thomas, Vincent, Adeodato, Lucas, Luk, Sune, Joerg (yeah, I'm brave :) ), Paul, and many others!

Of course, congrats go also to my other colleagues that "laureate" with me in Mid September DD Class :D

Lucas Nussbaum: New Debian Developers!

We got a lot of (>= 10) new Debian developers recently. I’m really happy to see that the bottlenecks in the New Maintainer process were (at least partially) solved. My first NM (actually my second, my first one is on hold) also became a DD today. So, how long does it take to become a DD ? Let’s take 2 examples. Both are very active and skilled new contributors, that probably were quite close from being the faster you can be through NM:
Name Applied AM assigned Approved by AM Account created
Chris Lamb 2008-05-01 2008-06-12 2008-07-22 2008-09-16
Sandro Tosi 2008-03-24 2008-05-06 2008-06-22 2008-09-16
We have the proof: provided you have all the required skills, you can become a DD in less than 6 months! Of course, some things are not perfect yet:

19 August 2008

Sandro Tosi: Display the progress of long operations in Python

I'm developing a tool that will take a loooong time to complete, so I'd like to know what's the progress of its execution. Basically I'd like something to tell me "Processed: x of y" where x is the current position and y is the total to process.

On Python Cookbook there are three articles about it, but none of them satisfied me.

The I remembered that there's a program, written in Python, that does what I need: dput! So I wrote a simple script (if you want to look at it, use wget, not open with browser) to mimic what dput does.

At the end, I finally find a really nice module: progressbar. I'm preparing a package for Debian for it, since it contains many nice kind of progress bars. Anyhow, I needed to create a patch to add "Processed: 5 of 47"-kinda output, but it's really useful even as it is, even for you.

Sandro Tosi: Debugging Python scripts

I was trying to squash a bug (for the reference, #494545) of reportbug and I felt I needed a tool to help me debugging that Python script.

So googling up a bit, I came across pdb: it's a really powerful tool, and this guide helped me getting used to it (another one, with extended examples, is here).

Whilst for sure the power of import pdb;pdb.set_trace() is huge and keep adding it in the right places let me fix the bug, but what I was really searching for was something like set -x for a shell script, something that without touching the code, would allow me to debug it. Any suggestions?

Sandro Tosi: Reportbug 3.40 in unstable

I'm happy that we were able to upload reportbug 3.40 in unstable this night!

Now there is a team to work on reportbug (thanks to Chris to let it go), so more workpower, more thinking heads, more bugs closed ;)

So, since this is the transition upload, please let us know asap if something went wrong; or if you want a new feature, something you feel needs to be change etc etc.

There was even an article on FreeSoftwareMagazine some days ago, so let's spread the word! :D

9 August 2008

Sandro Tosi: Generate all the couples

Is there a more pythonic way to generate all the couples (unordered) that this?

def genCouples(l):
"""returns a list of couples (item1, item2) with all the pairs from l"""
resList = []
if len(l) > 1:
for item in l[1:]:
resList.append((l[0],item))
resList = resList + genCouples(l[1:])
return resList

7 August 2008

Sandro Tosi: Another info source for Debian

It seems that #debian-devel@OFTC channel topic is used to inform for some particular situations, even grave ones (like HP Fort Collins outage of today).

But what to do if you'd like to be alerted for such situation and you can't check IRC, or you prefer different communication medium (like mails or feeds)?

There is a nice page on wiki.d.o that's been updated every time that #debian-devel@OFTC topic is changed. So, go there and simply subscribe to it (and you'll receive emails every time the page is changed). There should be a way to get an RSS feed from a MoinMoin page, but can't find a way: suggestions?

3 August 2008

Sandro Tosi: Minimal debian/rules for dh7+dpatch

I got a new package to start from scratch (amule-emc, ITP) so I wanted to try debhelper 7. In need of patching upstream source code, I used my old friend dpatch, but then started to have some problems putting things together; so, here below is the minimal debian/rules to use dh7+dpatch:

#!/usr/bin/make -f
include /usr/share/dpatch/dpatch.make

build: build-stamp
build-stamp: patch-stamp
dh build
touch $@

clean:
dh clean

%:
dh $@

Thanks to jcristau and noshadow from #debian-devel@OFTC for opening my eyes ;)Edited: thanks to Joey's comment, I was able to reduce it again down to:

#!/usr/bin/make -f

include /usr/share/dpatch/dpatch.make

build: patch-stamp
dh build

clean: unpatch
dh clean

%:
dh $@

23 July 2008

Kartik Mistry: sitecopy


* Sandro Tosi uploaded latest version of sitecopy. Give it try, test it, so it will have enough testing for our dear Lenny. Thanks a lot Sandro and Joe (upstream) for taking care!

Next.

Previous.