How to get the filename in the right case ?
Diez B. Roggisch
deets at nospam.web.de
Thu Sep 25 08:19:32 EDT 2008
> Yes I'm pretty sure, two reasons:
> 1. when I perform a step_into, jumping into a file that doesn't have
> breakpoints itself (meaning my program doesn't even know of this file),
> pdb returns a lowercase filename
What has that to do with potential output postprocessing?
> 2. rpdb2 (probably based or even inherited from pdb) has the same
> behavior. Asking the writer of rpdb2, I got some excuse (which I didn't
> understand) why he had done it that way.
rpdb2 is not pdb.
Below is the output of a Pdb-session I just had:
(eggbasket)dir at client8049:~/software/vc/EggBasket$ nosetests -s
eggbasket.tests.test_model
2008-09-25 14:13:10,374 turbogears.identity.saprovider INFO Loading:
eggbasket.model.VisitIdentity
.> /home/dir/software/vc/EggBasket/eggbasket/tests/test_model.py(59)test_versionsets()
-> vi1 = vset.add_pkg_info(p1)
(Pdb) n
> /home/dir/software/vc/EggBasket/eggbasket/tests/test_model.py(60)test_versionsets()
-> session.flush()
(Pdb) n
As you can see - mixed-case filenames. Linux though.
There is a *very* simple way for you to check: just create a file called
FooBar.py
and inside that, put
import pdb; pdb.set_trace()
print "hello"
Run that on the windows shell. See if that puts out all lowercase or not. I
can't do that right now as my VBox Windows won't start.
Then we know if PDB is really the culprit.
Apart from that, is that really a problem that the filenames are all lower
case? AFAIK Windows is case-insensitive regarding filenames anyway. So
opening the file by just passing the filename should work seamless.
Diez
More information about the Python-list
mailing list