PythonWin version etc

13 thoughts on “PythonWin version etc

  1. What is the latest version of PythonWin please? Mine is "win32all build 143" if I get it right, from "About PythonWin". It has been around for some years already.

     

    Why I am asking in the first place, is because I am now struggling with a nasty edit issue, which I guess is a bug of PythonWin. It is about indentation, my "Nanny" is not happy with me although the listing looks good. She is not telling me the exact cause so I went into HexEdit of the source file and now try to understand what is wrong. Not yet clear…

     

    Generally speaking, would be nice if I could prerun a script on the PC, with some rudimentary handling of IO and COM ports. Then I would not need to test run always the lengthy way all through theGSM module. And then catch some stupid errors like NameError, and get back to PC again for editing and so on.

     

    Any possibility to run on PC with some tool, other than PythonWin Interactive Window (which seems not capable of handling any IO)?

  2. Yep Python proper indentation is an issue with almost all editors and I am finding myself fighting the issue from time to time, usually solved by editing again the offending lines and rebuilding tabs and spaces again manually.

     

     In the on PC debugging matter, I think you are aware of the current already existing possibilities, with their possibilities and limitations?  Again speaking for myself, I am using on module debugging and have never touch PC debugging since years now – not that won’t work for someone else, is a matter of taste and the environment one creates during times and gets used to.

     

     

    1. Cosmin, tahnks for your comments.

       

      Understood, there are issues with the editors. After studying the matter further, I think also it is about TAB vs. space issue. And also found myself the best way to be rewriting some offending parts of the code.

       

      How about  PythonWin, is my old "win32all build 143"just the best available?

       

      "In the on PC debugging matter, I think you are aware of the current
      already existing possibilities, with their possibilities and
      limitations? " Not sure, please tell us all 🙂

       

       

        1. So, that build 143 is the one included in the Telit package, which must be installed to obtain the specific goodies (libraries, utilities, examples). I think you can then pick the latest editor from here:

           

          http://starship.python.net/crew/mhammond/win32/Downloads.html

           

           But this will also upgrade Python and you’ll have a lot of work to figure how to use only 1.5.2+syntax, functions etc..

           

          Regarding PC debugging look into Telit provided libraries in Lib folder of Python installation, some of them are fully implemented some have dummy code.

           

           

          1. Thank you for these new ideas. But re Lib folder of Python installation, could you point me closer to something useful for debugging? Seems a lot of stuff… any written descriptions or documents available?

          2. I don’t know any but what are you looking for? If you intend for example to debug programs that use the built-in GPS module go and open GPS.py in Lib folder and you’ll see what functions are emulated and how – in this case AT commands are used so might not be perfect match with the built-in lib. The same for GPIO etc.

            And the timings are completely different this being a possible death trap sometimes.

             

             

          3. Basically, I am dreaming of a possibility to run small Python scripts on a PC before downloading to any GSM module. This just for correcting "stupid" errors faster. The online Interactive Window part of PythonWin is a step towards that, but usually stops at something like "COM port busy" or similar. So it serves the purpose of checking some very simple structures.

             

            A tiny IO emulator piece of sw on the PC would help overcome such IO and COM port problems. Would not matter if and when timing is wrong, just proofing logical operation is what I am looking for here.

             

            Maybe there is such a package already, but I have not found.

          4. Igor, looks great, thank you! I will dig into the "groundlab" right away 🙂

             

            Re I2C, sorry to say, not yet. Too busy with other things, but sure will need to look at the I2C issue soon. I was considering to buy a low cost logic analyzer, as proposed by Luca Marcato: http://www.saleae.com  It might prove useful in debugging the I2C interface. Quite affordable stuff from Saleae, as it seems to me.

          5. Igor, looks great, thank you! I will dig into the "groundlab" right away 🙂

             

            Re I2C, sorry to say, not yet. Too busy with other things, but sure will need to look at the I2C issue soon. I was considering to buy a low cost logic analyzer, as proposed by Luca Marcato: http://www.saleae.com  It might prove useful in debugging the I2C interface. Quite affordable stuff from Saleae, as it seems to me.

            Tom, for logical analyzer look@

             

            http://tigal.com/product/2054

            http://tigal.com/brand/37 

             

            It costly , but soft pretty good

             

            When you will be in St.Petersburg let have a coffee my mob.+7964 320 8000 

          6. Thank you for your kind message. Also, if you come to Helsinki, please let me know.

             

            You can contact me via private mail through this forum, just click the letter symbol to the right of my name!

          7.  

            Basically, I am dreaming of a possibility to run small Python scripts on a PC before downloading to any GSM module. This just for correcting "stupid" errors faster. The online Interactive Window part of PythonWin is a step towards that, but usually stops at something like "COM port busy" or similar. So it serves the purpose of checking some very simple structures.

             

             

            I concur and share the same sentiment with Tom; esp serial coms application!

             

            Before, i could run pythonwin coms (MDM, SER) script  on my laptop running windows 7 (doesn’t work either on my Windows XP SP2 PC)  using a USB to Serial RS232 adapter but after the mobo was replaced, i can’t anymore (attribute: send error) nor figure out the workaround, which i used to use. I thought it was a flow control issue but that doesn’t seems to be the trick i was using 6 months ago 🙁

             

            Anyway, i’m not surprised why Telit is not making that much of an effort to improve things; as per Cosmin workaround, it’s better to debug using the module it self (great 🙂 if you’re an expert) but if you’re still learning, it’s much more easier and less frustrating using the PC to bebug as pointed by Tom. 

             

            However, what i normally do is to double click on the pythonwin file while the module is connected and see the debug output on the DOS screen; which is still time consuming. (Noentheless, it’s a trade-off between running the script on the PC or using the module).

             

            I guess, one advantage of using python over C during programming / debugging is to avoid now and then frustrating compilations 🙂

             

            Well, it has been long time and i hope a better Telit Pythonwin ver is made avaialble without such hazzles.