python -m ipdb #3

Closed
sirex opened this Issue Jun 9, 2011 · 4 comments

Comments

Projects
None yet
2 participants
@sirex

sirex commented Jun 9, 2011

I can start pdb this way:

python -m pdb manage.py test tests

But with ipdb this does not work:

python -m ipdb manage.py test tests     
python: No module named ipdb.__main__; 'ipdb' is a package and cannot be directly executed
@gotcha

This comment has been minimized.

Show comment
Hide comment
@gotcha

gotcha Jun 10, 2011

Owner

ipdb is distributed as an egg : this enforces that it is a package.

At first sight, I see no way to fix this issue.

Owner

gotcha commented Jun 10, 2011

ipdb is distributed as an egg : this enforces that it is a package.

At first sight, I see no way to fix this issue.

@sirex

This comment has been minimized.

Show comment
Hide comment
@sirex

sirex Jun 10, 2011

As I understand, information about how module is searched and executed, when called with -m is described here:
http://docs.python.org/library/runpy.html

sirex commented Jun 10, 2011

As I understand, information about how module is searched and executed, when called with -m is described here:
http://docs.python.org/library/runpy.html

@gotcha

This comment has been minimized.

Show comment
Hide comment
@gotcha

gotcha Jun 10, 2011

Owner

Le 10/06/11 15:07, sirex a écrit :

As I understand, information about how module is searched and executed, when called with -m is described here:
http://docs.python.org/library/runpy.html

I tried to implement the feature : however, as documented in
http://docs.python.org/library/runpy.html, it will work only for 2.7

Would you try the code I pushed to confirm it works for you before I
release ?

Thanks

Godefroid Chapelle (aka __gotcha) http://bubblenet.be

Owner

gotcha commented Jun 10, 2011

Le 10/06/11 15:07, sirex a écrit :

As I understand, information about how module is searched and executed, when called with -m is described here:
http://docs.python.org/library/runpy.html

I tried to implement the feature : however, as documented in
http://docs.python.org/library/runpy.html, it will work only for 2.7

Would you try the code I pushed to confirm it works for you before I
release ?

Thanks

Godefroid Chapelle (aka __gotcha) http://bubblenet.be

@sirex

This comment has been minimized.

Show comment
Hide comment
@sirex

sirex Jun 11, 2011

It works!

$ bin/python -m ipdb boo.py
> /tmp/ipdb-test/boo.py(1)<module>()
----> 1 print('boo')
      2 
      3 for i in range(3):

ipdb> n
boo
> /tmp/ipdb-test/boo.py(3)<module>()
      2 
----> 3 for i in range(3):
      4     print(i)

ipdb> n
> /tmp/ipdb-test/boo.py(4)<module>()
      2 
      3 for i in range(3):
----> 4     print(i)

ipdb> p i
0
ipdb> c
0
1
2
The program finished and will be restarted
> /tmp/ipdb-test/boo.py(1)<module>()
----> 1 print('boo')
      2 
      3 for i in range(10):

ipdb> exit

$

Thanks!

sirex commented Jun 11, 2011

It works!

$ bin/python -m ipdb boo.py
> /tmp/ipdb-test/boo.py(1)<module>()
----> 1 print('boo')
      2 
      3 for i in range(3):

ipdb> n
boo
> /tmp/ipdb-test/boo.py(3)<module>()
      2 
----> 3 for i in range(3):
      4     print(i)

ipdb> n
> /tmp/ipdb-test/boo.py(4)<module>()
      2 
      3 for i in range(3):
----> 4     print(i)

ipdb> p i
0
ipdb> c
0
1
2
The program finished and will be restarted
> /tmp/ipdb-test/boo.py(1)<module>()
----> 1 print('boo')
      2 
      3 for i in range(10):

ipdb> exit

$

Thanks!

@sirex sirex closed this Jun 11, 2011

@pyup-bot pyup-bot referenced this issue in illagrenan/django-cookiecutter-template Sep 5, 2016

Merged

Initial Update #6

@pyup-bot pyup-bot referenced this issue in uktrade/data-hub-leeloo Jan 19, 2017

Merged

Pin ipdb to latest version 0.10.1 #53

@pyup-bot pyup-bot referenced this issue in nicfit/MishMash Feb 26, 2017

Merged

Pin ipdb to latest version 0.10.2 #22

@pyup-bot pyup-bot referenced this issue in oii/ogre Mar 5, 2017

Closed

Pin ipdb to latest version 0.10.2 #7

@pyup-bot pyup-bot referenced this issue in kobinpy/kobin Mar 21, 2017

Closed

Initial Update #70

@pyup-bot pyup-bot referenced this issue in aio-libs/aiologstash Oct 9, 2017

Closed

Scheduled weekly dependency update for week 41 #9

@pyup-bot pyup-bot referenced this issue in aio-libs/aiologstash Oct 16, 2017

Merged

Scheduled weekly dependency update for week 42 #10

@pyup-bot pyup-bot referenced this issue in theflyingturtle/BIGSdb-attributor Jan 8, 2018

Merged

Pin ipdb to latest version 0.10.3 #2

@pyup-bot pyup-bot referenced this issue in rochacbruno/quokka Feb 6, 2018

Closed

Pin ipdb to latest version 0.10.3 #526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment