Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: force a program to exit ?
Post: RE: force a program to exit ?

(May-12-2022, 12:42 PM)deanhystad Wrote: The preferred method is to exit because the program doesn't have anything left to do. for i in range(10): print(i) # Program exits after i counts up to 9...
Armandito General Coding Help 3 2,529 May-12-2022, 01:23 PM
    Thread: force a program to exit ?
Post: force a program to exit ?

Hello everyone! Here is my problem: I use a Python program that communicates with a device. Sometimes (for no apparent reason) it loses connection with the device and I can't communicate with it. Wh...
Armandito General Coding Help 3 2,529 May-12-2022, 12:37 PM
    Thread: UnicodeEncodeError: 'ascii' codec can't encode character '\xfd' in position 14: ordin
Post: RE: UnicodeEncodeError: 'ascii' codec can't encode...

Yes I am using Python 3
Armandito General Coding Help 6 2,729 Apr-29-2022, 12:36 PM
    Thread: UnicodeEncodeError: 'ascii' codec can't encode character '\xfd' in position 14: ordin
Post: RE: UnicodeEncodeError: 'ascii' codec can't encode...

(Apr-29-2022, 12:02 PM)Gribouillis Wrote: Have you tried afg.write_command(b'DATA EMEM,#14?\xfd?\xfd') ? What is the error message (if any). Yes i tried and it does not work : TypeError: endswith fi...
Armandito General Coding Help 6 2,729 Apr-29-2022, 12:13 PM
    Thread: UnicodeEncodeError: 'ascii' codec can't encode character '\xfd' in position 14: ordin
Post: RE: UnicodeEncodeError: 'ascii' codec can't encode...

(Apr-29-2022, 09:30 AM)supuflounder Wrote: Can you show the actual code you are using? All we need are the open and print calls, plus the way you form the data to be sent. I haven't looked at it i...
Armandito General Coding Help 6 2,729 Apr-29-2022, 09:36 AM
    Thread: UnicodeEncodeError: 'ascii' codec can't encode character '\xfd' in position 14: ordin
Post: UnicodeEncodeError: 'ascii' codec can't encode cha...

Hey everyone ! I have a strange problem. I would like to send this line to a waveform generator: 'DATA EMEM,#14?\xfd?\xfd'. I get this error : UnicodeEncodeError: 'ascii' codec can't encode charact...
Armandito General Coding Help 6 2,729 Apr-29-2022, 09:23 AM
    Thread: TimeOut a function in a class ?
Post: TimeOut a function in a class ?

Hey everyone ! Here is my problem : I have defined a class, where I have defined some functions. In the __init__ of my class I can call some of the defined functions . The problem is that some of the...
Armandito General Coding Help 1 1,651 Apr-25-2022, 01:06 PM
    Thread: Fourier series in Python
Post: RE: Fourier series in Python

(Mar-18-2022, 09:45 AM)Larz60+ Wrote: see: https://docs.scipy.org/doc/scipy/tutorial/fft.html and: https://numpy.org/doc/stable/reference/g....fft2.html Maybe I don't get it, but those links are the...
Armandito General Coding Help 3 2,061 Mar-18-2022, 09:54 AM
    Thread: Fourier series in Python
Post: Fourier series in Python

Hello everyone, I'm new here so I hope I'm in the right place to ask some questions ! I would like to get the equation of the Fourier series of a (complex) curve. There are a few scripts on the int...
Armandito General Coding Help 3 2,061 Mar-18-2022, 09:01 AM

User Panel Messages

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