First time here? Check out the FAQ!

Chris Curvey's profile - activity

2024-04-07 08:58:33 -0500 asked a question block comments and Black

block comments and Black has anyone found a block comment style that "Plays nice" with the Black formatter? Every time

2023-12-04 07:19:48 -0500 answered a question Automatic python module header

let's see... If I make my snippet look like this: __author__ = "%(MYNAME||$(USERNAME))s" I can't quite figure out whe

2023-12-04 06:22:19 -0500 answered a question Automatic python module header

I think what you're looking for is "every time I create a new python file, populate it with a standard template." That

2023-04-25 09:25:14 -0500 received badge Popular Question (source)
2023-04-25 09:25:14 -0500 received badge Famous Question (source)
2023-04-25 09:25:14 -0500 received badge Notable Question (source)
2022-05-05 09:56:29 -0500 received badge Nice Question (source)
2022-05-05 09:34:46 -0500 marked best answer search in selected -> 0 matches in 0 files

I'm having a recurring problem with Wing across lots of versions (since v6) and lots of projects. (And on lots of different computers).

I go into the Project tool, right click on a directory, and choose "Search In Selected". Then I will search for a string.

But sometimes the string (which I know exists) will not be found. And if I look at the top of the search-in-files tool, it will say "Found 0 matches in 0 files".

If I go back to the Project tool and choose the parent directory of where I was searching...voila, it finds everything I was looking for.

Am I the only one having this problem?

2022-04-30 09:24:46 -0500 received badge Famous Question (source)
2022-03-15 00:15:01 -0500 received badge Notable Question (source)
2022-03-15 00:15:01 -0500 received badge Famous Question (source)
2022-03-15 00:15:01 -0500 received badge Popular Question (source)
2022-01-31 05:23:18 -0500 received badge Notable Question (source)
2022-01-27 20:51:52 -0500 marked best answer django shell and wingdbstub

my current client runs scripts against their Django site using this pattern

 $ python manage.py shell < path-to-script-file.py

If I put this in my script file

import wingdbstub
print("Hello World!")

and set a breakpoint at "print", I see that Wing switches into debug mode, but it does not stop at the breakpoint.

Any known issues with trying to use this pattern?

UPDATE: strange...if I have more advanced code in there, and it raises an exception, Wing stops at the exception...but still does not respect the breakpoint.

UPDATE 2: I think I see what's happening. Because the script itself is just "stdin" (due to the redirect), the "import wingdbstub" gets run, but then there no knowledge of what's in the script itself.

2022-01-26 10:28:53 -0500 edited question django shell and wingdbstub

django shell and wingdbstub my current client runs scripts against their Django site using this pattern $ python manag

2022-01-26 10:14:57 -0500 edited question django shell and wingdbstub

django shell and wingdbstub my current client runs scripts against their Django site using this pattern $ python manag

2022-01-26 10:10:36 -0500 asked a question django shell and wingdbstub

django shell and wingdbstub my current client runs scripts against their Django site using this pattern $ python manag

2022-01-24 10:16:41 -0500 marked best answer pep8 reformatter configuration?

I seem to recall that Wing delegates reformatting to an outside executable (pep8, black, yapf, etc) , and that there's a configuration panel for the reformatters, but I can't find it. Can anyone point me in the right direction?

UPDATE:

TL;DR - can we change the autopep8formatter to respect the new binary operator + line break recommendations: https://www.python.org/dev/peps/pep-0...

Long Version:

My organization requires code to pass a pycodestyle check before being accepted. But Wing sometimes seems to be reformatting some bits of code like:

    if (
        val is None
        or not val.isdigit()
        or int(val) <= 0
    ):

to

    if (
        val is None or
        not val.isdigit() or
        int(val) <= 0
    ):

And then pycodestyle complains about

./src/dashboard/utils.py:39:25: W504 line break after binary operator

The "sometimes" part is interesting. After the reformatting, pycodestyle complains about two blocks of code. If I fix the first block, save, and check, the first block is not reformatted, and then pycodestyle only complains about the second block. But when I fix the second block, the first block is reformatted, and pycodestyle complains again. If I edit BOTH blocks of code and then hit save, neither one is reformatted

Now that I look into it, the docs say that

Wing uses its own copy of autopep8 for PEP 8 style formatting

And if I dig into the docs for autopep8, it apparently depends on pycodestyle itself!

2022-01-18 13:07:34 -0500 received badge Popular Question (source)
2022-01-12 09:40:38 -0500 edited question pep8 reformatter configuration?

pep8 reformatter configuration? I seem to recall that Wing delegates reformatting to an outside executable (pep8, black,

2022-01-12 09:19:16 -0500 edited question pep8 reformatter configuration?

pep8 reformatter configuration? I seem to recall that Wing delegates reformatting to an outside executable (pep8, black,

2022-01-12 09:19:16 -0500 received badge Editor (source)
2022-01-07 06:51:32 -0500 asked a question pep8 reformatter configuration?

pep8 reformatter configuration? I seem to recall that Wing delegates reformatting to an outside executable (pep8, black,

2021-10-11 12:14:17 -0500 marked best answer Remote debugging on Heroku

For today's adventure, I'm going to try setting up remote debugging on a Heroku dyno. If anyone has gotten this to work (or determined that it will not work), I'd love to hear about it.

So here's what I've found so far.

I found instructions on SSH tunneling to my dyno at https://devcenter.heroku.com/articles.... Heroku does not permit a straight "ssh" command, but it does have a command to set up port forwarding from the local host to the dyno. (heroku ps:forward). It does not look like that command also sets up the reverse tunnel :(

So I think the set of steps that I will need is:

  1. Set a value for kSecurityToken in my wingdbstub.py
  2. Add wingdbstub.py to my git repository, so that it gets pushed with the rest of my deployment
  3. Set up the appropriate DNS & Firewall rules so that the dyno can open a connection to my development host

Do I need to add some base level of Wing code (the "remote" stuff) into my git repo so that it gets installed on the dyno?

2021-10-11 12:14:10 -0500 received badge Notable Question (source)
2021-10-05 06:36:53 -0500 received badge Popular Question (source)
2021-09-30 11:44:50 -0500 commented question Remote debugging on Heroku

hmm...I'm trying to make sure I can make this work locally before I add the remote complication. Put "import wingdbs

2021-09-30 10:50:40 -0500 commented question Remote debugging on Heroku

okay, so how would I do that? Is it add "import wingdbstub" somewhere in my server code where it gets processed on st

2021-09-30 07:49:00 -0500 asked a question Remote debugging on Heroku

remote debugging on Heroku For today's adventure, I'm going to try setting up remote debugging on a Heroku dyno. If any

2021-09-22 09:19:09 -0500 marked best answer how to clear file magnification (aka zoom) settings?

Wing does a nice job of remembering what my "zoom" settings were for each file in my project. Very slick.

But of course, I'm never satisfied! Is there a way for me to say "clear all the zoom settings for the different files and just go back to whatever is set in my preferences?"

2021-09-13 17:44:05 -0500 commented answer how to clear file magnification (aka zoom) settings?

I'm just looking for a way to say, "I got a new monitor and now none of my zoom settings make sense, so let's make every

2021-09-12 16:04:20 -0500 asked a question how to clear file magnification (aka zoom) settings?

how to clear file magnification (aka zoom) settings? Wing does a nice job of remembering what my "zoom" settings were fo

2021-09-06 08:32:34 -0500 commented question search in selected -> 0 matches in 0 files

They are all local files. Two other things that I think I'm seeing (although it's not consistent/repeatable, so this co

2021-09-05 10:44:54 -0500 commented question search in selected -> 0 matches in 0 files

I don't think so -- I count on the "search in location" selection to set the "Look In:" value. I guess the only other t

2021-09-01 16:39:55 -0500 received badge Famous Question (source)
2021-08-31 12:20:17 -0500 commented question search in selected -> 0 matches in 0 files

Yeah, it's not consistent. 80% of the time it works fine. And when it doesn't work, changing the search location seems

2021-08-30 06:15:55 -0500 marked best answer get a list of all keybindings?

Is there a place where I can get a list of all the current key bindings? I'd like to create a new binding for "format file with black", and I'd like to find something that is not already in use.

2021-08-30 06:15:21 -0500 received badge Popular Question (source)
2021-08-30 06:15:21 -0500 received badge Notable Question (source)
2021-08-30 06:15:05 -0500 received badge Notable Question (source)
2021-08-30 06:15:05 -0500 received badge Popular Question (source)
2021-08-28 09:57:57 -0500 asked a question search in selected -> 0 matches in 0 files

search in selected -> 0 matches in 0 files I'm having a recurring problem with Wing across lots of versions (since v6

2021-08-19 09:16:12 -0500 commented answer get a list of all keybindings?

perfect. the documentation link was what I was after

2021-08-19 07:57:02 -0500 asked a question get a list of all keybindings?

get a list of all keybindings? Is there a place where I can get a list of all the current key bindings? I'd like to cre

2021-08-11 06:13:48 -0500 answered a question debug for django-admin

I have not tried it with makemigrations, but if I am trying to set a breakpoint in the django code, I've found that addi

2021-08-11 06:13:48 -0500 received badge Rapid Responder ( source )
2020-07-01 21:32:17 -0500 marked best answer Turn off auto-evaluate in debugger?

Is there a way to tell Wing not to auto-evaluate a variable in the debugger? Here's my use case: I have a complicate Django ORM query....something like this:

my_results = Foo.objects.filter(....)

And I'm apparently getting a very bad query plan when I execute it. So what I want to do is set a breakpoint and look at my_results.query, but as soon as I type

>>> my_results

Wing stops. I'm assuming it is trying to evaluate the value of my_results so that it can help with auto-completion, but it's actually causing the underlying query to execute.

UPDATE: I think I have a little workaround. If I type str(my_results.query) into a text editor, then copy-and-paste that into the debug console, I get my SQL.

2020-06-30 10:05:29 -0500 asked a question Turn off auto-evaluate in debugger?

turn off auto-evaluate in debugger? Is there a way to tell Wing not to auto-evaluate a variable in the debugger? Here'

2020-05-05 18:11:02 -0500 received badge Necromancer ( source )