Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Python training starting the 5th of April - Formation python le 5 avril
Post: Python training starting the 5th of April - Format...

Hello guys, a training for python discovery is about to start. It's in French, see the details below : Démarrage initiation au langage python le 5 avril à 18h15 au Centre d'Arts et Loisirs de Vaires-s...
jeanMichelBain Bar 1 2,249 Mar-19-2019, 09:07 AM
    Thread: Database operation exception handling
Post: RE: Database operation exception handling

I don't think so. You can put your commit or rollback inside its own 'try' block to check if it ran correctly, or you can use the same 'try' for all the transactions sequence.
jeanMichelBain General Coding Help 1 2,493 Jan-03-2019, 07:50 PM
    Thread: Algorithm effect on the CPU
Post: RE: Algorithm effect on the CPU

Hello, some thought I believe too things are imbricated in your program. 1 - It does loop and then after(5,loop), which stack again your loop into the system, probably increasing the stack, which is w...
jeanMichelBain General Coding Help 3 2,615 Dec-19-2018, 08:32 AM
    Thread: I need a serial device expert!
Post: RE: I need a serial device expert!

A couple of things are not very clear for me : Novatel has plenty of device and software, which one are you using ? Anyway, you get data, so your connection works. However, their doc mention to use 11...
jeanMichelBain General Coding Help 10 4,956 Dec-18-2018, 10:33 PM
    Thread: Match CSV files for difference
Post: RE: Match CSV files for difference

Hello, I tried quickly with 100k records, and I got a very quick result, < one second. Probably my test is wrong, so can you show your code and a sample of data ?
jeanMichelBain General Coding Help 4 3,542 Dec-17-2018, 10:31 PM
    Thread: help need with running python script on remote windows machine
Post: RE: help need with running python script on remote...

My understanding of wmi is you cannot use it on linux, because it's a wrapper on a windows dll. One way I see is to install cygwin, by this way you will have a linux emulation on your windows pc, et s...
jeanMichelBain General Coding Help 2 11,122 Dec-14-2018, 02:16 PM
    Thread: What will the following code output?
Post: RE: What will the following code output?

If you are on linux, just enter on your keyboard : python3 If you are on windows, download the last release on : https://www.python.org/downloads/windows/ If you cannot install because you don' have a...
jeanMichelBain General Coding Help 5 3,259 Dec-14-2018, 02:05 PM
    Thread: mysql database error
Post: RE: mysql database error

If I'm right, mysql is multi-threads, so you could manage the problem if, at the first step, you start a transaction, and commit (or rollback) after reading what you want. By this way the second step ...
jeanMichelBain Web Scraping & Web Development 1 5,028 Dec-14-2018, 01:25 PM
    Thread: Python Error in subprocess.py
Post: RE: Python Error in subprocess.py

'No such file or directory' from 'self.cmd('init', *args, **options)' Probably 'init' is not a command from where it runs. Check execution environment, and tell us more (os, code, etc) if you are not ...
jeanMichelBain General Coding Help 1 5,593 Dec-14-2018, 11:26 AM
    Thread: I need a serial device expert!
Post: RE: I need a serial device expert!

I'm not sure to fully understand, and specifically why you should need threading for that need. A serial line is 'serial' and so it looks not appropriate to read it from many parts. So why threading j...
jeanMichelBain General Coding Help 10 4,956 Dec-14-2018, 08:34 AM
    Thread: Step through process
Post: RE: Step through process

You can have a look on module pdb : https://docs.python.org/3/library/pdb.html It comes with python and it is extensible, so you can add your own debugging code and create automation if you wish. Also...
jeanMichelBain General Coding Help 4 3,045 Dec-12-2018, 08:06 AM
    Thread: I need a serial device expert!
Post: RE: I need a serial device expert!

If I understand correctly, the frequency (100hz) is for the data measure, wich should be different from the frequency used for the data transmission. Very often, the data sensors manage their data for...
jeanMichelBain General Coding Help 10 4,956 Dec-11-2018, 08:43 PM
    Thread: adding a string and an int
Post: RE: adding a string and an int

You cannot add numbers to string, and so you have to do combinations if you want to keep them together. For instance keeping both in a list, the firts part (index 0) keeping the string, and the second...
jeanMichelBain General Coding Help 3 2,341 Dec-10-2018, 04:41 PM
    Thread: What are Palindromes in Python?
Post: RE: What are Palindromes in Python?

Hi again, I realize my answer was silly. Of course, palindromes can be implemented as a python class. For instance, a very basic sample : '''The palindrome module is a very basic implementation of pal...
jeanMichelBain General Coding Help 5 3,791 Dec-09-2018, 04:16 PM
    Thread: Finding files
Post: RE: Finding files

You should give more details about the error. I tested your code, and I founded it works. The error in the first run is because there is no file (this is normal), and that was corrected by creating a ...
jeanMichelBain General Coding Help 2 60,205 Dec-09-2018, 07:57 AM
    Thread: Why am I getting this error?? Help me out!!!
Post: RE: Why am I getting this error?? Help me out!!!

Please say also the python version. It's important because, for instance, the format string used in your code does not work with python < 3.6. For those using 3.5 (as provided in debian) this is th...
jeanMichelBain General Coding Help 2 2,230 Dec-08-2018, 09:36 AM
    Thread: What are Palindromes in Python?
Post: RE: What are Palindromes in Python?

I don't know what is 'implement' is that case. You can easily get the palindromes in the first 1000 numbers: for p in range(1000): pa = list(str(p)) pa.reverse() pn = int(''.join(pa)) if pn == p: ...
jeanMichelBain General Coding Help 5 3,791 Dec-08-2018, 09:03 AM
    Thread: Rename folders as files inside
Post: RE: Rename folders as files inside

Maybe there is somewhere a magic module doing the job... Anyway, you can do it with the os module: import os,os.path for dirname in os.listdir('.'): if os.path.isdir(dirname): for filename in os.l...
jeanMichelBain General Coding Help 2 2,738 Dec-07-2018, 08:19 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020