On Sunday, October 9, 2022 at 12:09:45 PM UTC+2, Antoon Pardon wrote:
> I would like a tool that tries to find as many syntax errors as possible
> in a python file. I know there is the risk of false positives when a
> tool tries to recover from a syntax error and proceeds but I would
> prefer
New submission from Alex Hall :
In this script:
import inspect
import dis
def foo(**_):
frame = inspect.currentframe().f_back
print(frame.f_lasti)
dis.dis(frame.f_code)
d = {'a': 1, 'b': 2}
foo(**d)
dis shows these instructions for `foo
Alex Hall added the comment:
(meant to say "so I'm pulling in @Mark.Shannon)
--
___
Python tracker
<https://bugs.python.org/issue44576>
___
___
Pytho
Alex Hall added the comment:
I believe this is the outcome of https://bugs.python.org/issue39316 which I
filed, so I'm pulling in . Naturally I think the new behaviour is not a bug but
a feature.
I think it's more important for the traceback to show the attribute access
(`two`) than
New submission from Alex Hall :
Found on:
Python 3.9.5
GCC 11.1 on Linux (x86_64)
Reproduced on:
Python 3.9.5
Clang 9.0.8 Linux (arm)
When setting the recursion limit to a high enough amount, trying to reach that
recursion limit ends in a segmentation fault (stack overflow?)
code:
```py
Alex Hall added the comment:
Pablo, check out https://github.com/aroberge/friendly/discussions/197,
particularly the second bullet point which has a dataset of syntax errors.
--
nosy: +alexmojaki
___
Python tracker
<https://bugs.python.
Alex Hall added the comment:
I just came across https://www.python.org/dev/peps/pep-0626/, seems like this
would need to be fixed to satisfy the PEP, but on the latest CPython it's not:
```
➜ ~ python3.10 ~/Downloads/trace_skipping_lines_bug.py
14 slug = "doing_the_thing"
15 pri
Change by Alex Hall :
--
nosy: +Mark.Shannon
___
Python tracker
<https://bugs.python.org/issue39316>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Alex Hall :
See attached file. The summary is that I start a Process, which starts a
Thread, which puts some values on a Queue which was originally created by the
parent process and passed down. Usually this works but occasionally the parent
process doesn't see the items
New submission from Alex Hall :
Based on the discussion in
https://mail.python.org/archives/list/python-id...@python.org/thread/C6QEAEEAELUHMLB23OBRSQK2UYU3AF5O/
When unpacking fails with an error such as:
ValueError: too many values to unpack (expected 2)
the name of the type
New submission from Alex Hall :
Attached is a script which:
- Gets all the source code it can find from sys.modules
- Looks at every node in the parsed source
- Gets source text for that node using ast.get_source_segment
- Parses the source text again
- Compares the original node
Alex Hall added the comment:
I think this would be very useful in tracebacks. If a traceback line had a more
useful name like `MyClass.__init__` instead of just `__init__` or
`my_decorator..wrapper` instead of just `wrapper` it would provide
useful context to the frame.
--
nosy
Alex Hall added the comment:
Sorry, I should have looked around more, I think my problem is
https://bugs.python.org/issue22393
--
___
Python tracker
<https://bugs.python.org/issue33
Alex Hall added the comment:
I'm also experiencing hanging on terminate. I haven't made a debug build or
anything but it's happening to me consistently on 3.8, although I haven't
managed to create a small example to reproduce. Replacing pool.py with
https://raw.githubusercontent.com/python
New submission from Alex Hall :
When stepping through a multiline expression like this:
```
print(slug
.replace("_", " ")
.title()
.upper()
.replace("a", "b")
.lower()
.replace("The ", "the "))
```
Alex Hall added the comment:
I assume this also happens on 3.9, it's just a bit hard for me to test that now.
--
___
Python tracker
<https://bugs.python.org/issue38
New submission from Alex Hall :
In a decorator such as `@a()`, the ast.Call node has a col_offset starting from
the @ symbol. This doesn't happen for decorators without arguments (e.g. `@a`)
or with some arguments (e.g. `@a(x)`).
--
components: Interpreter Core
files
There is tkinter or WX for a gui solution. I use wx just because I
already know it and it does what I need it to do, so I see no reason
to switch to a different library to do the same thing.
On 10/28/10, brad...@hotmail.com brad...@hotmail.com wrote:
Thanks ill give it a try! Anyone know about
On 10/21/10, Baba raoul...@gmail.com wrote:
Hi everyone
i need a hint regarding the following exercise question:
Write a program that generates all Pythagorean triples whose small
sides are no larger than n.
Try it with n = 200.
what is n ? i am guessing that it is a way to give a bound
On 10/5/10, Sebastian Alonso alon.sebast...@gmail.com wrote:
Hey everyone, I've been working on an app that uses global hotkey and
it's a very important part of the app, so far I have been using
python-keybinder [0] and it's been working great on linux, but now I want to
make it work under
On 8/19/10, Peter Otten __pete...@web.de wrote:
Karsten Wutzke wrote:
I have an object which has a list of other complex objects. How do I
best achieve a complex contains comparison based on the object's
class? In Java terms, I'm looking for an equivalent to equals(Object)
in Python. Does a
It seems like seeing the code, or at least the bit in question, would
be easier, but what about:
for img in range(0, len(imagesToUpload:))
try:
#do the thumbnail / upload thing on images[i]
exceptIOError:
i=0
This will duplicate a lot of the images already processed, but you
said you are
On 6/11/10, yanhua gasf...@163.com wrote:
hi,all!
it's a simple question:
input two integers A and B in a line,output A+B?
this is my program:
s = input()
t = s.split()
a = int(t[0])
b = int(t[1])
print(a+b)
but i think it's too complex,can anybody tell to slove it with less code.
Just
I am not sure about a search feature for the archives, but I can tell
you about a tutor list for those new and somewhat new to Python
(like me). Of course, both that list and this one are excellent
resources, but the tutor list seems to be for questions generally
encountered by relatively new
On 5/22/10, MRAB pyt...@mrabarnett.plus.com wrote:
Lanny wrote:
The answer may be right infront of me but I really can't figure this
out.
I'm trying to build a interactive fiction kind of game, silly I know
but I
am a fan of the genre. I'm trying to build up an index of all the
rooms in
On 5/21/10, Peter Otten __pete...@web.de wrote:
Alex Hall wrote:
Hi all,
I am now trying to allow my classes, all of which subclass a single
class (if that is the term), to provide optional arguments. Here is
some of my code:
class Craft():
def __init__(self,
name,
isAircraft=False
On 5/21/10, Terry Reedy tjre...@udel.edu wrote:
On 5/20/2010 10:56 PM, Alex Hall wrote:
A couple of style comments for you to consider.
class Craft():
def __init__(self,
name,
isAircraft=False,
id=helpers.id(),
hits=0,
weapons=[]):
Not indenting lines after def makes
On 5/21/10, Christian Heimes li...@cheimes.de wrote:
Am 21.05.2010 04:56, schrieb Alex Hall:
Hi all,
I am now trying to allow my classes, all of which subclass a single
class (if that is the term), to provide optional arguments. Here is
some of my code:
class Craft():
def __init__(self
On 5/21/10, Ethan Furman et...@stoneleaf.us wrote:
Alex Hall wrote:
On 5/20/10, alex23 wuwe...@gmail.com wrote:
I have since updated each ship's
__init__ to accept all the arguments that Craft accepts so that I can
support all optional arguments,
Ick. Now you'll have to change several
On 5/21/10, Chris Rebert c...@rebertia.com wrote:
On Fri, May 21, 2010 at 1:09 PM, Alex Hall mehg...@gmail.com wrote:
On 5/21/10, Ethan Furman et...@stoneleaf.us wrote:
Alex Hall wrote:
On 5/20/10, alex23 wuwe...@gmail.com wrote:
I have since updated each ship's
__init__ to accept all
Hi all,
I am now trying to allow my classes, all of which subclass a single
class (if that is the term), to provide optional arguments. Here is
some of my code:
class Craft():
def __init__(self,
name,
isAircraft=False,
id=helpers.id(),
hits=0,
weapons=[]):
self.name=name
self.id=id
On 5/20/10, Patrick Maupin pmau...@gmail.com wrote:
On May 20, 9:56 pm, Alex Hall mehg...@gmail.com wrote:
Hi all,
I am now trying to allow my classes, all of which subclass a single
class (if that is the term), to provide optional arguments. Here is
some of my code:
class Craft():
def
On 5/20/10, alex23 wuwe...@gmail.com wrote:
Patrick Maupin pmau...@gmail.com wrote:
One thing you can do is in battleship, you can accept additional
keyword arguments:
def __init__(self, name, ..., **kw):
Then you could invoke the superclass's init:
Craft.__init__(self, name,
Hi again all,
More about classes. I am still looking into my battleship game, and I
will have several different craft. All craft have common attribs
(position, alive, and so on) but each craft may be a surface ship,
submarine, or airplane. All three are craft, but a submarine can be
submerged or
of organization; speed, memory usage, less
coding? Thanks.
On 5/18/10, Dave Angel da...@ieee.org wrote:
Alex Hall wrote:
Hi again all,
More about classes. I am still looking into my battleship game, and I
will have several different craft. All craft have common attribs
(position, alive, and so
On 5/18/10, Dave Angel da...@ieee.org wrote:
Alex Hall wrote:
Okay, that makes sense. So by calling submarine(craft) I am bringing
in all of craft's attribs (subclassing)? Or does calling craft's
__init__ method do that instead? Is there an advantage to doing it
this way, rather than just
Hi all,
I am a bit confused about classes. What do you pass a class, since all
the actual information is passed to __init__? For example, say you
have a dog class. The dog object has a name, a size, and a color. I
believe you would say this:
class dog():
def __init__(self, name, size, color):
On 5/17/10, Patrick Maupin pmau...@gmail.com wrote:
On May 17, 3:19 pm, Alex Hall mehg...@gmail.com wrote:
Hi all,
I am a bit confused about classes. What do you pass a class, since all
the actual information is passed to __init__? For example, say you
have a dog class. The dog object has
Hi all,
I am wondering if there is a way to generate a tone for the
motherboard speaker, like the call to Beep() in C++?
Also, is there a module to generate tones in Python using the sound
card? A module that can beep at a given frequency for a given time
using the usual sine wave is okay, but
An important question is: will you need this input stored across
multiple runs of the program? What I mean is, do you want the user to
set the data, then have those same settings even after closing and
re-opening the program?
On 5/14/10, Bruno Desthuilliers
Hi all,
I am sorry if this is the second message about this you get; I typed
this and hit send (on gmail website) but I got a 404 error, so I am
not sure if the previous message made it out or not.
Anyway, I have about fifteen vars in a function which have to be
global. Is there a faster and more
On 5/8/10, Jon Clements jon...@googlemail.com wrote:
On 8 May, 15:08, Alex Hall mehg...@gmail.com wrote:
Hi all,
I am sorry if this is the second message about this you get; I typed
this and hit send (on gmail website) but I got a 404 error, so I am
not sure if the previous message made
I have a main folder. Inside that I have a modes package (subfolder
holding __init__.py) as well as a misc package. When modes has to
import helpers.py from misc, I use this:
from .misc import helpers
The period makes Python look up one level for misc, then go into it to
find helpers.
On 5/7/10,
Hi all,
I have a file, pasted below for what good it will do, which makes a
couple conditional calls to a function called writeDefaults. However,
when I manually trigger a condition that causes the function to be
called, Python gives me a name error and says that my writeDefaults
does not exist. I
Changing the order so the function is first did it. Thanks. That is
what I get for working with Java all semester...
On 5/6/10, MRAB pyt...@mrabarnett.plus.com wrote:
Alex Hall wrote:
Hi all,
I have a file, pasted below for what good it will do, which makes a
couple conditional calls
Hi all,
I am stumped. The compiled version of my project works on my pc, but
when I put it on a thumb drive and try it on a laptop without python
installed I get this:
Traceback (most recent call last):
File sw.pyw, line 3, in module
File modes\arm.pyc, line 4, in module
File
...@gmail.com wrote:
Alex Hall mehg...@gmail.com wrote:
I am stumped. The compiled version of my project works on my pc, but
when I put it on a thumb drive and try it on a laptop without python
installed I get this:
ImportError: DLL load failed: The specified procedure could not be found
Hello all,
I have a compiled version of my project, but the wx functions do not
work. When run from the python source, instead of the compiled .exe
file, wx works as expected. I am including msvcr90.dll in the dist
folder. I looked for answers on Google, but I could not really follow
the tutorials
Hi all,
I am still fighting with py2exe; I keep getting error: msvcp90.dll:
no such file or directory right after it says it is searching for
required dlls. I have followed the py2exe tutorial, though, and I am
not sure why it is not finding the dlls, which are in both
c:\windows\system32 and in
Hi all,
I started a new thread as I already have several out there, all
talking about basically the same thing. After re-visiting a
StackOverflow post, thanks to the person who gave me that link, I
tossed msvcp90.dll and msvcr90.dll (I use wx) into c:\python26\dlls
and it now compiles! I think I
On 4/15/10, Mark Hammond skippy.hamm...@gmail.com wrote:
On 16/04/2010 10:52 AM, Alex Hall wrote:
1. Is there a way to start with no command line window popping up? My
main script is a pyw, but it still shows a dos window when the
generated .exe file is clicked. Leaving out the console
:20 pm, Alex Hall mehg...@gmail.com wrote:
Hi all,
While my project is still suffering from major import problems, I will
soon have to try to package it as a Windows executable file. I do not
want an installer; I want the user to be able to run the program for
as long as they want
Hi all,
For testing purposes, and because I am not yet distributing my
application (which, thanks to you all, is now running perfectly!), I
am going to just bundle msvcr90.dll. However, I cannot find it! I ran
vcredist_x86.exe (I have a 64-bit version of win7, but all I have is
the x86 version of
Hi again,
I said msvcr90.dll, but I meant msvcp90.dll. In either case, I
cannot locate the dll to include in my project and I am not sure what
else I can do. The vcredist_x86 was, I thought, supposed to give me
the dll, but it does not seem to have done so.
--
Have a great day,
Alex (msg sent
gagsl-...@yahoo.com.ar wrote:
En Wed, 14 Apr 2010 00:07:48 -0300, Alex Hall mehg...@gmail.com escribió:
For testing purposes, and because I am not yet distributing my
application (which, thanks to you all, is now running perfectly!), I
am going to just bundle msvcr90.dll. However, I cannot find
:
On 14.04.2010 13:22, Alex Hall wrote:
I tried both vcredist_x86.exe and vcredist_x64.exe, with no result; I
still do not have the required dll (I have 32-bit python, so the _x86
should have done the trick). I will try another poster's suggestion of
installing vcpp express 2005 and hope that will work
On 4/14/10, Christian Heimes li...@cheimes.de wrote:
On 14.04.2010 14:25, Alex Hall wrote:
I notice that I do not have the dll when py2exe says it cannot locate
the dll. If I need vs2008, then what good is vcredist_xxx.exe? It does
not seem to give me the dll, but the py2exe tutorial says
On 4/14/10, Enrico nos...@nospam.it wrote:
Il 14/04/2010 14:25, Alex Hall ha scritto:
I notice that I do not have the dll when py2exe says it cannot locate
the dll. If I need vs2008, then what good is vcredist_xxx.exe? It does
not seem to give me the dll, but the py2exe tutorial says
I do not see anything about redistribution, only installation, unless
I am missing something?
On 4/14/10, pyt...@bdurham.com pyt...@bdurham.com wrote:
I just stumbled across the following page which seems to indicate that
the MS VC 2008 runtime files[1] required to distribute Python
Hi all,
I am just curious: if Python3.x is already out, why is 2.7 being
released? Are there two main types of Python? Thanks.
--
Have a great day,
Alex (msg sent from GMail website)
mehg...@gmail.com; http://www.facebook.com/mehgcap
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
While my project is still suffering from major import problems, I will
soon have to try to package it as a Windows executable file. I do not
want an installer; I want the user to be able to run the program for
as long as they want, then to quit (by using a command from inside the
program)
. Steinbach al...@start.no wrote:
* Alex Hall:
Hi all,
I am just curious: if Python3.x is already out, why is 2.7 being
released? Are there two main types of Python? Thanks.
Old code and old programming habits may work as-is with 2.7 but not with a
3.x implementation.
So yes, there are two
On 4/10/10, vsoler vicente.so...@gmail.com wrote:
Still learning python, especially OOP.
While testing classes, I sometimes think of them as ordinary
containers of values and functions (methods). That is, values and
functions can be grouped together inside namespaces calles classes.
class
Hello all, once again:
http://www.gateway2somewhere.com/sw/sw.zip
The above link is to a project. I am new to using multiple files in
Python, and I have a lot of tangled imports where many files in the
same folder are importing each other. When I tried to follow the
manual to make some files into
Okay, what you all say makes sense, and I am going to try the package
thing again. The modes dir is from my last attempt, as is its
weather subdir. I think I see what I did wrong, at least I hope I
do. I will also remove the init file from the main dir. Yes, arm is
the main directory of the
.
-- Forwarded message --
From: Alex Hall mehg...@gmail.com
Date: Tue, 6 Apr 2010 13:06:24 -0400
Subject: imports again
To: python-us...@python.org
Hello all,
My project is stalled because of an import problem. I know my imports
are a tangled mess (1 imports 2 3 and 4, 2 imports 1 and 3, 3 imports
2
Because of compatibility, and many modules being built for 2.6 only, I
am still on 2.6.4 (updating to .5 soon).
On 3/26/10, Harishankar v.harishan...@gmail.com wrote:
Have you people embraced Python 3.x or still with 2.5 or 2.6?
I personally want to switch over but not too sure how many people
Thanks, this should work.
On 3/25/10, Tim Golden m...@timgolden.me.uk wrote:
On 25/03/2010 02:31, Alex Hall wrote:
Okay, I have my program and it has three different modes (there will
be more than that). Each mode will have a timer attached to it. If the
mode remains active and the timer runs
Hi all,
I have a program with a timer in it, therefore I have multiple
threads. My method of exiting by using user32.PostQuitMessage (0) no
longer seems to be doing the job since I added the timer. What else do
I have to do to close my program? I say it is not closing because,
before, I would be
Thanks, it seems to be working for now... Hopefully that trend continues!
On 3/24/10, Tim Golden m...@timgolden.me.uk wrote:
On 23/03/2010 17:01, Alex Hall wrote:
Hi all, but mainly Tim Golden:
Tim, I am using your wonderful message loop for keyboard input, the
one on your site that you
wrote:
On 24/03/2010 10:43, Alex Hall wrote:
Hi all,
I have a program with a timer in it, therefore I have multiple
threads. My method of exiting by using user32.PostQuitMessage (0) no
longer seems to be doing the job since I added the timer. What else do
I have to do to close my program? I say
Hi all,
I am having trouble with a timer I am trying to use. It is the same
timer, but I need to cancel it when a certain event happens, then
start it again when a second event happens. The below is from a shell
session, not a file, but it shows my problem: I call cancel on a
timer, then call
Okay, I have my program and it has three different modes (there will
be more than that). Each mode will have a timer attached to it. If the
mode remains active and the timer runs out, a function specific to
that mode is called. If that mode is switched away from, however, the
timer is canceled and
Hi all, but mainly Tim Golden:
Tim, I am using your wonderful message loop for keyboard input, the
one on your site that you pointed me to a few months ago. It has been
working perfectly as long as I had only one dictionary of keys mapping
to one dictionary of functions, but now I want two of
Sorry about that, it is fixed now.
On 3/23/10, Tim Golden m...@timgolden.me.uk wrote:
On 23/03/2010 17:01, Alex Hall wrote:
Hi all, but mainly Tim Golden:
Tim, I am using your wonderful message loop for keyboard input, the
one on your site that you pointed me to a few months ago. It has been
On 3/23/10, MRAB pyt...@mrabarnett.plus.com wrote:
Alex Hall wrote:
Hi all, but mainly Tim Golden:
Tim, I am using your wonderful message loop for keyboard input, the
one on your site that you pointed me to a few months ago. It has been
working perfectly as long as I had only one dictionary
On 3/15/10, Ulrich Eckhardt eckha...@satorlaser.com wrote:
Alex Hall wrote:
I have a dll I am trying to use, but I get a Windows error 126, the
specified module could not be found. Here is the code segment:
nvdaController=ctypes.windll.LoadLibrary(nvdaControllerClient32.dll)
In addition
Okay, I got a new copy and all seems well now. The dll is found and
loaded. The functions inside the dll are not working, but that is not
Python's fault. Thanks to everyone for your help and suggestions!
On 3/15/10, Ulrich Eckhardt eckha...@satorlaser.com wrote:
Alex Hall wrote:
On 3/15/10
Hi all,
I have a file with a dictionary and a function. The dictionary holds
the name of the function, and the function references the dictionary.
If I put the dictionary first, the function is happy but the
dictionary says the function is not defined. If I switch the two and
put the function
: arm.sayDisk1Info,
9 : arm.sayDisk2Info,
10 : nextMode,
11 : clipboard.toClipboard
})
HOTKEY_ACTIONS=funcs[mode]
On 3/14/10, Chris Rebert c...@rebertia.com wrote:
On Sun, Mar 14, 2010 at 10:26 AM, Alex Hall mehg...@gmail.com wrote:
Hi all,
I have a file with a dictionary and a function. The dictionary
; inline
posting is much harder to read when using a screen reader, as I do, so
I am used to top-posting.
On 3/14/10, Chris Rebert c...@rebertia.com wrote:
On 3/14/10, Chris Rebert c...@rebertia.com wrote:
On Sun, Mar 14, 2010 at 10:26 AM, Alex Hall mehg...@gmail.com wrote:
Hi all,
I have a file
Hi all,
I have a dll I am trying to use, but I get a Windows error 126, the
specified module could not be found. Here is the code segment:
nvdaController=ctypes.windll.LoadLibrary(nvdaControllerClient32.dll)
I have the specified dll file in the same directory as the file trying
to use said dll,
Hello all,
I am trying to make a gui out of xrc and wxpython, but I think my
understanding of Python's class/method structure is causing problems.
The below code returns an error on the line
panel=xrc.XRCCTRL(mf, dl)
The error goes back to wxPython itself and says attribute error:
'none' type
Hi all,
The manual says, for modules in a project stored in subdirectories, you can do:
import folderName.module
I have a couple questions, though:
1. Do I then have to call functions from module like
folder.module.function, or can I still use the normal module.function?
2. When I try to do
Hi all,
I am trying to run a file that should pop up a dialog. The dialog is
fine (I used XRCed to create it and running it from within that editor
brings up the dialog I want). When I run my file, though, I get this
traceback:
C:\Users\Alexc:\python26\python.exe i:\arm\dictionary.py
Traceback
Halfway there. It imports now, but it says that the module does not
have functions which I know it does have. I will just leave it all in
one folder for now and play with organization after I get the project
working better.
On 3/11/10, Steve Holden st...@holdenweb.com wrote:
Alex Hall wrote:
Hi
I am honestly a bit lost as to why keys.append() is not a good choice
here, but I have it working. I apparently have to use the ascii for
capital letters if I am capturing the shift modifier, not the
lowercase ascii. Using 67 instead of 99 works as expected.
I use append because the program has
this
be happening?
On 3/9/10, Ulrich Eckhardt eckha...@satorlaser.com wrote:
Alex Hall wrote:
Now, though, when I press ctrl-shift-c (keystroke 11), nothing
happens.
Control-C sends a special signal to the console, like Control-Break.
Pressing any other keystroke after that will crash the program
is not called, and this is a huge limitation for the rest of
the program since I am stuck with just the ten numbers available on
the keyboard. Any suggestions would be great!
On 3/9/10, Tim Golden m...@timgolden.me.uk wrote:
On 09/03/2010 13:55, Alex Hall wrote:
Hi all,
In the same program I
Hello all:
I have a project with many pyw files. One file holds a variable and a
function that I find myself using across many other pyw files, so I
called it helpers.pyw. The variable is mostRecent, which is a string
and is meant to hold a string so I know what the program most recently
output;
are out of a job... Thanks again.
On 3/8/10, Gary Herron gher...@islandtraining.com wrote:
Alex Hall wrote:
Hello all:
I have a project with many pyw files. One file holds a variable and a
function that I find myself using across many other pyw files, so I
called it helpers.pyw. The variable
Hello all,
My name is Alex. I am pretty new to Python, but I really like it.
I am trying to put my python and pythonw executables on my thumb
drive, along with packages, using Moveable Python, but I cannot figure
out how to run scripts using it. I would rather use a shell than the
script runner
92 matches
Mail list logo